Custom SOAP headers with the BizTalk SOAP adapter

I recently had to add a custom SOAP header to a request sent to a web serivce from BizTalk, and had to research how to do it.
  1. Add a property schema and change target namespace to http://schemas.microsoft.com/BizTalk/2003/SOAPHeader.
  2. Add an element to this schema with the name of the custom header (in my case "CustomCredentials") and Property Schema Base = MessageContextPropertyBase.
  3. In orchestration, in a message assignment shape, assign the content of the header to the property, e.g.:

MessageX(Namespace.CustomCredentials) = "<CustomCredentials xmlns="<namespace>"><Username>foo</Username><Password>bar</Password></CustomCredentials>";

BizTalk/SQL Server General network error

One of my customer sometimes got an error saying BizTalk was unable to communicate with SQL Server 2005. More specifically:
 

Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 6912
Date:  2008-02-20
Time:  13:45:42
User:  N/A
Computer: VAX-VS131
Description:
The following stored procedure call failed: " { call admsvr_ReceiveLocation_GetAllInApp( ?)}". SQL Server returned error string: "[DBNETLIB][ConnectionWrite (send()).]General network error. Check your network documentation.".

 

Event Type: Error
Event Source: BizTalk Server 2006
Event Category: BizTalk Server 2006
Event ID: 5641
Date:  2008-02-20
Time:  13:45:42
User:  N/A
Computer: VAX-VS131
Description:
The Messaging Engine failed to retrieve the configuration from the database. Details:"Connection failure".

 

I turned out to be network card issue that could we worked around by turning off TCP Chimney using the following command:
Netsh int ip set chimney DISABLED
 
For more information, see Microsoft support article 942861.