Use Fiddler with BizTalk Adapters to view exchanged messages

Introduction

To exchange information between Microsoft BizTalk Server and an application by means of the HTTP(S) protocol, in BizTalk we have many adapters like HTTP, SOAP, WCF adapters. When you send a message to the target application using HTTP(S) protocol, it’s always useful to see the content of message that’s being exchanged over the wire.

How to use Fiddler with BizTalk

You can use many online tool to see the content of message, here I am using Fiddler in scenario for a while now. Fiddler is a free HTTP debugging proxy server application/tool, which captures the HTTP(s) traffic and logs the content for us to view.

First download and install fiddler if you dont have it.

In order to make fiddler intercept BizTalk messages:

You first need to identify which port fiddler listens to.

For this, go to Tools -> Fiddler Options -> Connections Tab, 

Please refer below screen shot and make the configuration accordingly.

 
 
  • Keep default Port value is 8888.
  • Also keep default Server Name is: 127.0.0.1

Now, you can click on “Copy Browser Proxy Configuration URL” and paste in Internet explorer to see more details.

 

Next, Configure BizTalk Adapter. With server name and port details we can configure the BizTalk send ports.

In Static Send Port

In BizTalk’s static send port which has been configured to use HTTP/SOAP/WCF adapter you have to set the proxy setting (Send port, adapter –> Configure –> Proxy).  Choose “Use Proxy” and give the proxy details as shown in below screen shots;

In Send Port with WCF-BasicHttp adapter:

 

In Send Port with HTTP Adapter:

 

In Send Port with SOAP Adapter:

 

In Dynamic Send port

For dynamic send port, the proxy details are resolved from the context of the outbound message. Hence you have to construct the outbound message context as follows below;

For WCF adapter:

msgOrder(WCF.ProxyAddress) = <a href=”http://localhost:8888″>http://localhost:8888</a>;
msgOrder(WCF.ProxyToUse)  = “UserSpecified”;

For SOAP/HTT adapter (Change SOAP to HTTP based on adapter used):

msgOutboundRequest(SOAP.UseProxy) = true;
msgOutboundRequest(SOAP.ProxyAddress) = “locahost”;
msgOutboundRequest(SOAP.ProxyPort) = “8888”;

Note: You don’t want to execute this code in production, so ensure these codes are executed only in debug mode.

Now with everything configured in BizTalk for fiddlers, you can start the Fiddler to trace the traffic. If you have configured BizTalk to use Fiddler, but if you have not started the Fiddler then your message would suspend with following error.

Unable to connect to the remote server —> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888

So you have to make sure your Fiddler is started when BizTalk (which is configured to use proxy) sends the message.

Summary

We have configured Fiddler to trace the information between BizTalk Server and application which uses the HTTP(S) protocol. And this way we can debug proxy server application/tool and logs the content for us to view.

See Also

One thought on “Use Fiddler with BizTalk Adapters to view exchanged messages

  • April 9, 2018 at 6:17 pm
    Permalink

    • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updatingAzure Online Training hyderabad

    Reply

Leave a Reply

Your email address will not be published.