tags:

views:

258

answers:

1

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 00000000 in Microsoft Service Trace Viewer but the messages tab is empty. C:\temp\Web_tracelog.svclog is being written but C:\temp\Web_messages.svclog is not.

I'm probably missing something simple here, but can't put my finger on it.

The Diagnostics tab of Microsoft Service Configuration Editor says everything is on. Relevant portions of web.config follow.

<system.diagnostics>
  <sources>
   <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing"
    propagateActivity="true">
    <listeners>
     <add type="System.Diagnostics.DefaultTraceListener" name="Default">
      <filter type="" />
     </add>
     <add name="ServiceModelTraceListener">
      <filter type="" />
     </add>
    </listeners>
   </source>
   <source name="System.ServiceModel.MessageLogging" switchValue="Verbose, ActivityTracing">
    <listeners>
     <add type="System.Diagnostics.DefaultTraceListener" name="Default">
      <filter type="" />
     </add>
     <add name="ServiceModelMessageLoggingListener">
      <filter type="" />
     </add>
    </listeners>
   </source>
  </sources>
  <sharedListeners>
   <add initializeData="C:\temp\Web_tracelog.svclog"
    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
    <filter type="" />
   </add>
   <add initializeData="C:\temp\Web_messages.svclog"
    type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
    <filter type="" />
   </add>
  </sharedListeners>
  <trace autoflush="true" />
</system.diagnostics>

 <system.serviceModel>
  <diagnostics>
   <messageLogging logEntireMessage="true" logMalformedMessages="true"
    logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
  </diagnostics>
 </system.serviceModel>
+2  A: 

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.serviceModel>
    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true"
              logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
    </diagnostics>
</system.serviceModel>
Tanner
When I use this config, I get an "AppDomain unloading" entry and a "Get configuration section" entry. I'm expecting to see the content of my SOAP messages. Do you see SOAP messages with this configuration?
Eric J.
I get results like those displayed on here: http://msdn.microsoft.com/en-us/library/aa751795.aspx
Tanner