BizTalk WCF Tracing

Working on a client site part of our test phase involves tracing SOAP 1.2 messages coming out of the WCF-WSHttp adapter.  First thing was to enable logging on the adatper by adding the following fragment to the BTSNTSvc.exe.config and BTSNTSvc64.exe.config files. Once you’ve done that and restarted your BizTalk host instances you should see “messages.svclog” which can be opened in the Microsoft WCF Service Trace Viewer.

<system.diagnostics>
  <sources>
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
                 <add name="messages"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="c:\logs\messages.svclog" />
          </listeners>
      </source>
    </sources>
</system.diagnostics>

<system.serviceModel>
  <diagnostics>
    <messageLogging
         logEntireMessage="true"
         logMalformedMessages="false"
         logMessagesAtServiceLevel="true"
         logMessagesAtTransportLevel="false"
         maxMessagesToLog="3000"
         maxSizeOfMessageToLog="2000"/>
  </diagnostics>
</system.serviceModel>

Also for any HTTP sessions you can use one of my favorite tools, Fiddler. This time around I had some issues with Fiddler not seeing my sessions. A colleague reminded me Fiddler just acts as a proxy and to take a look at the proxy settings on my WCF-WSHttp BizTalk send port. First check your proxy settings under Internet Options and note down the HTTP proxy address and port number. e.g. 127.0.0.1:8888. Now configure the WCF-WSHttp adapter to use the proxy. Enable “Use Proxy” on the Proxy tab of the send port then add the proxy address. e.g. http://127.0.0.1:8888/.

Advertisements
This entry was posted in BizTalk Server. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s