View un-encrypted SOAP xml when calling CRM2011 WCF end point

If you've ever used an HTTP Proxy (like Fiddler) to debug web service calls to ASMX endpoints, you'll probably try the same with the CRM2011 WCF web services only to be greeted with an encrypted soap packet. If you want to see the plain soap xml calls your client application or web application is making you can use WCF logging.

1) Add the following to the configuration section of your web.config or app.config:

      <trace autoflush="true" />

        <source name ="System.ServiceModel.MessageLogging"
              switchValue="Verbose, ActivityTracing">
                <add name="xml" />

      <add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
           initializeData="C:\CrmLogFile.svclog" />



2) Now make your call and look for the Log File generated (defined via the initializeData attribute).

3) If you've got Visual Studio installed, you should be able to double click on the file and open the Microsoft Service Trace Viewer and examine the un-encrypted soap messages – both sent and received.

See for more information.

Comments are closed