Server-side tracing of SOAP messages for WCF service

前端 未结 1 936
南旧
南旧 2021-01-24 06:37

I\'m trying to follow this tutorial on configuring server-side SOAP tracing for my WCF service, as well as the MSDN documentation.

When I run a test, I see Activity 0000

相关标签:
1条回答
  • 2021-01-24 07:05

    Can't see what's wrong with that config, but here's the config I use that works without a problem if it's of any use:

    <system.diagnostics>
      <sources>
        <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing">
          <listeners>
            <add name="ServiceModelTraceListener"
             initializeData="c:\MyTracelog.svclog"
             type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
             traceOutputOptions="Timestamp"/>
          </listeners>
        </source>
      </sources>
      <trace autoflush="true" />
    </system.diagnostics>
    
    <system.serviceModel>
        <diagnostics>
          <messageLogging logEntireMessage="true" logMalformedMessages="true"
                  logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
        </diagnostics>
    </system.serviceModel>
    
    0 讨论(0)
提交回复
热议问题