Tracing SharePoint adapter requests

How to track SharePoint requests

SharePoint adapter does not allow for configuring a proxy. So I will configure SharePoint proxy in BizTalk configuration file. And use Fiddler as the proxy to trace SharePoint web requests and responses.

Purpose of doing the steps below

The purpose is to force SharePoint Adapter to send data through Fiddler proxy. Only one SharePoint host instance will send the data through the proxy.


The default proxy defined in the BizTalk configuration file will work for all web requests. Make sure you restore the original BizTalk config file as soon as you restart SharePoint host instance.

To list the steps needed to trace SharePoint requests:

  1. Create ne 32 bit host, i.e. SharePointTestHost
  2. Create a host instance for the SharePointTestHost on a machine where you have Fiddler application installed
  3. Save original BTSNTSvc.exe.config file as original_BTSNTSvc.exe.config
  4. Modify BTSNTSvc.exe.config file by adding defaultProxy section at proper position
  5. Start SharePointTestHost host instance
  6. Save modified BTSNTSvc.exe.config as withproxy_BTSNTSvc.exe.config
  7. Rename original_BTSNTSvc.exe.config file back to BTSNTSvc.exe.config
  8. Now you are sure that only the host instance that you created will use the Fiddler proxy settings
  9. Configure a receive location, i.e. RecLoc1 to use the SharePointTestHost
  10. Start Fiddler
  11. Configure in Fiddler an option to decrypt https traffic (if BizTalk commuinicates with SharePoint using https protocol)
  12. Enable the receive location “RecLoc1”
  13. Wait for results

Note: if you trace 64 bit host instance, modify BTSNTSvc64.exe.config config file and not BTSNTS.exe.config file.

BizTalk Configuration section

The local proxy on port 8888 is the Fiddler proxy. Make sure the default proxy uses default credentials of the host instance by setting the useDefaultCredentials attribute to true.

    <!-- Setting to let SharePoint Web Requests go through Fiddler proxy -->
    <defaultProxy useDefaultCredentials="true">
      <proxy usesystemdefault="true" proxyaddress="" />

Sample Fiddler results


Full contents of BTSNTSvc.exe.config file

Don’t just copy and paste the config file to your environment. I am also using SharePoint assemblies redirection from version 14 to version 15. Copy only the section.

<?xml version="1.0" ?>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="BizTalk Assemblies;Developer Tools;Tracking;Tracking\interop" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.SharePoint.Client" publicKeyToken="71e9bce111e9429c" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion=""/>
        <assemblyIdentity name="Microsoft.SharePoint.Client.Runtime" publicKeyToken="71e9bce111e9429c" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion=""/>
    <!-- Setting to let SharePoint Web Requests go through Fiddler proxy -->
    <defaultProxy useDefaultCredentials="true">
      <proxy usesystemdefault="true" proxyaddress="" />
  <!-- End of SharePoint proxy settings -->
        <provider id="sspi" type="Microsoft.BizTalk.XLANGs.BTXEngine.SecurityServerChannelSinkProvider,Microsoft.XLANGs.BizTalk.Engine" securityPackage="ntlm" authenticationLevel="packetPrivacy" />
        <channel ref="tcp" port="0" name="">
            <provider ref="sspi" />
            <formatter ref="binary" typeFilterLevel="Full"/>

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s