This project is read-only.

How to enable WCF tracing

J.D. Meier, Jason Taylor, Prashant Bansode, Carlos Farre, Madhu Sundararajan, Steve Gregersen.

Use following steps to enable Tracing
  1. Open the web.config file of the WCF service using the Configuration editor tool (SvcConfigEditor.exe).
  2. In the Configuration editor, navigate to the Diagnostics node, and click the Enable Tracing link.
  3. This enables Tracing your WCF service and it also creates a listener (ServiceModelTraceListener) and a source (System.ServiceModel) under the Listeners and Sources folder respectively.

To determine where the traces will be written select ServiceModelTraceListener under the Listeners node and note the value of the InitData attribute. The default location where trace messages are written is c:\inetpub\wwwroot\auditingwcf\web_tracelog.svclog.

The configuration file should look as follows:
        <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
                <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                    <filter type="" />
                <add name="ServiceModelTraceListener">
                    <filter type="" />
        <add *initializeData="c:\inetpub\wwwroot\auditingwcf\web_tracelog.svclog"*
            type="System.Diagnostics.XmlWriterTraceListener, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"
            name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
            <filter type="" />

Last edited May 8, 2008 at 12:35 AM by prashantbansode, version 1


No comments yet.