Wcf Tracing

11. November 2010

I was having some issues with Wcf in my input message being SOAP 12 and my Wcf Service accepting SOAP 11, so after I created my custom binding using HttpsTransport. I was still getting a few problems and decided to enable tracing by adding this code to my web.config.

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "c:\logs\Traces.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
 

Then I just browse to my .svclog open it up and I an view it in the MS Trace Viewer. Pretty easy, thanks Microsoft.

TechArticle

Add comment




biuquote
  • Comment
  • Preview
Loading