Life is a journey

Who Dares Wins
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

How can I use Fiddler to debug BizTalk messages?

Posted on 2011-01-27 14:02  zhaobin  阅读(222)  评论(0编辑  收藏  举报

When using HTTP, SOAP or WCF send ports it can be incredibly useful to view the content of messages that are sent on the wire. This allows you to inspect the headers (SOAP or HTTP). Fiddler is a simple but fantastic tool to allow you to do this.

By default, Fiddler will not trace any messages sent to endpoints by BizTalk as it does not use WinInet. However, BizTalk send ports can be configured to use a proxy allowing Fiddler to intercept them. On the Send Port tick the Use Proxy checkbox and set the Server to 127.0.0.1 and the port to 8888. For dynamic ports, set the following properties (as applicable to the adapter being used)

// Debug via fiddler
msgSendRequest(SOAP.UseProxy) = true;
msgSendRequest(SOAP.ProxyAddress) = "127.0.0.1";
msgSendRequest(SOAP.ProxyPort) = 8888;

Note that this needs to be removed when Fiddler is not running since traffic directed to the proxy will not be received by anything.

 

// Set Fidder as proxy for .NET application

<system.net>
<defaultProxy> <proxy usesystemdefault="False" bypassonlocal="True"
proxyaddress="http://127.0.0.1:8888"/> </defaultProxy>
</system.net>