Home » General » Using Service Trace Viewer Tool to debug WCF service

Using Service Trace Viewer Tool to debug WCF service

Microsoft provides a free tool to test your WCF service. This tool let you see a lot of thing that you can define at which level you want to see.

The first step to configure the tool is to go inside your service project and open the configuration file.

You should add into the Configuration tag the code below:

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
            <source name="System.ServiceModel" 
                    switchValue="Information, ActivityTracing" 
                    propagateActivity="true">
            <listeners>
               <add name="sdt" 
                    type="System.Diagnostics.XmlWriterTraceListener" 
                    initializeData= "yourFileName.log" />
            </listeners>
         </source>
    </sources>
</system.diagnostics>

Your file can contain any extension. The tools be default will search for few ones but you can at the end select All and see every extensions.

fileExtension

You can also specify to log only error instead of information. ActivityTracing will trace every activity which can be heavy on the log file.

To use this tool, open a developer console and type : SvcTracerViewer.

svctracer

A windows application will start and will let you select your tracing file and apply several filters.

svctracerTool

From here you should be able to get what’s wrong with your WCF without having to attach any process to a remove WCF service.

If you like my article, think to buy my annual book, professionally edited by a proofreader. directly from me or on Amazon. I also wrote a TypeScript book called Holistic TypeScript

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.