Rv Singh

Rv Singh

  • 1.5k
  • 245
  • 90.2k

WCF Tracing: Can we view Request and Response body?

Jan 21 2014 6:00 AM

I have a WCF service and i want to view the actual request & response (the content) from the service. So i enabled WCF Tracing with Verbose. After adding tracing, the service started logging into .svclog file, when i open the file into viewer

i do not see actual content of the message in any of the logged messages.

For example, in logviewer, under description column, i see "Received a message over a channel", but it only logs Message Header. Is there anyway to see entire body without changing the code.(WCF service hosted in IIS and but we don't have access to code)

<system.diagnostics>       <sources>             <source name="System.ServiceModel"                      switchValue="Verbose"                     propagateActivity="true">             <listeners>                <add name="traceListener"                     type="System.Diagnostics.XmlWriterTraceListener"                     initializeData= "C:\logs\Traces.svclog" />             </listeners>          </source>       </sources>    </system.diagnostics>