Delen via


Tracing WCF Messages

Every time I tried WCF tracing and svctraceviewer I got stucked with the vast amount of information it generates.

If you just need to inspect your messages, here is the simplest configuration I’ve found:

 

<configuration>

  <system.diagnostics>

    <sources>

      <source name="System.ServiceModel.MessageLogging">

        <listeners>

          <add   name="xml"

                 type="System.Diagnostics.XmlWriterTraceListener"

                 initializeData="Traces.svclog"/>

        </listeners>

      </source>

    </sources>

  </system.diagnostics>

  <system.serviceModel>

    <diagnostics>

      <messageLogging logEntireMessage="true" logMessagesAtServiceLevel="true" />

    </diagnostics>

     <!-- your wcf config-->

  </system.serviceModel>

  </configuration>