Install WCF SQL Adapter

Following steps must be done on a 64 Bit system to install the WCF SQL Adapter:

1) \\OrgFiles\BT Server\ASDK_x64\AdapterFramework64.msi –> complete
2) \\OrgFiles\BT Server\AdapterPack_x64\AdapterSetup64.msi –> custom, select only Microsoft BizTalk Adapter for Microsoft SQL Server
3) \\OrgFiles\BT Server\AdapterPack_x86\AdapterSetup.msi –> custom, select only Microsoft BizTalk Adapter for Microsoft SQL Server

Background: Administration console and the integration for Visual Studio are based on 32 Bit, so you also need the 32 bit version of the adapter to finalize the setup process.

4) Biztalk Server Administration / BizTalk Group / Platform Settings / Adapters –> context menu –> new–> Adapter

5) Insert a name, e.g. WCF-SQL
6) Select WCF Sql Adapters from the dropdown list
7) OK

Binding an orchestration to multiple receive ports

In the BizTalk Server Management Console, it’s only possible to bind 1 physical Receive Port to 1 logical (Orchestration-)Receive Port.
To bind multiple receive ports to an orchestration, you could follow these steps:

1) Create receive ports with unique and approviate names in the correct biztalk application.

2) Create a new one way port in your orchestration, which can receive messages. As port binding please use “direct”. In this example please make sure, that “Routing between ports will be defined by filter expressions on incoming messages in the Messagebox database” is selected.

3) Create or select your activating Receive Shape and configure the “Filter Expression” by clicking the ellipsis. In the Filter Expression add as many “BTS.ReceivePortName”-properties as Receive Ports you have created eralier. Set the values of the properties to the portnames of the Receive Ports and group each row by “OR”.
The Filter Expression should resemble something like this: (BTS.ReceivePortName == “ReceiveMsgPort1”) (BTS.ReceivePortName == “ReceiveMsgPort2”)

All the messages which originate from the filtered ports will be processed by the Orchestration

Basic authentification in a soap / webservice call

You have a webservice (based on a wsdl), which you have to call? The owner of the webservice has set basic authentification as security requirement. You have added the webservice via “Add Web Reference” in Visual Studio with the name “WebServiceName”. The generated class MyServiceClass is a derived class of SoapHttpClientProtocol out of namespace System.Web.Services.Protocols. You have no access to the via wsdl prompted definitions and classes.

Unfortunatly it is not sufficient to add the credentials in this way:

ICredentials creds;
creds = new NetworkCredential(username, password);
WebServiceName.MyServiceClass client = new WebServiceName.MyServiceClass();
client.Credentials = creds;
client.PreAuthenticate = true;



You have to add a new class file to your project, which contains the same namespace as MyServiceClass is a member, e.g. WebServiceNameExtended.cs. Next, you create a new dervied class of MyServiceClass in this file, e.g. MyServiceClassExtended. Into the class you insert a method called GetWebRequest(), which overrides the standard class of System.Net.
So, every Request, which is sent to the webservice will be changed and the request header will contain the credentials and will integrate Basic Authentification.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net;
using System.Text;
using System.Web.Services.Protocols;

namespace WebServiceName
    public class MyServiceClassExtended : MyServiceClass
        protected override WebRequest GetWebRequest(Uri address)
            WebRequest request = (WebRequest)base.GetWebRequest(address);

            if (request.PreAuthenticate)
                NetworkCredential networkCredentials = request.Credentials.GetCredential(address, "Basic ");
                if (networkCredentials != null)
                    byte[] credentialBuffer = new UTF8Encoding().GetBytes(networkCredentials.UserName + ":" + networkCredentials.Password);
                    request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(credentialBuffer);
                    throw new ApplicationException("No network credentials");

            return request;

EDI schemas supported with Biztalk Server 2006 R2ff

Industry Segment Encoding Standard Version/ Release Count of Transaction Set XSD/Schemas
General Industry EDIFACT D93A 55
D94A 68
D94B 75
D95A 101
D95B 115
D96A 125
D96B 136
D97A 143
D97B 151
D98A 157
D98B 165
D99A 169
D99B 180
D00A 187
D00B 191
D01A 194
D01B 194
D02A 194
D02B 194
D03A 192
D03B 192
D04A 192
D04B 192
D05A 193
D05B 193
X12 2040 29
3010 39
3020 104
3030 161
3040 187
3050 225
3060 245
3070 273
4010 293
4020 302
4030 309
4040 314
4050 314
5010 318
5020 317
5030 317
Retail UCS 4010 46
4040 65
5020 67
VICS 4010 27
4050 36
5020 45
EAN97 46
EAN02 46
Health Care HIPAA X12N 4010A1 16

More information:

Access to a Stored Procedure on a remote SQL Server via Microsoft Biztalk SQL Adapter

If it is neccesary to access a stored procedure on a remote SQL Server by SQL Adapter, you have to activate the DTC Network access in the security options of component services.

Error message: “Transaction could not enlist in the Transaction coordinator”.

Security setting:

Further informations:

Maintaining and Troubleshooting BizTalk Server Databases

If you have problems with large databases in biztalk 2006 or higher, I recommend this site:

Special recommendation: MsgBoxViewer and Terminator!

Den Terminator now at the official downloads:

Activate a Biztalk Receive Location using Code

With this code yo can (re)activate a Biztalk Server Receive Location with e.g. a surveillance service. This may make sense if you use a POP3 Receive Location where the pop3 server casually is not reachable.

System.Management.ManagementObject requiredRLObj = null;
System.Management.ObjectGetOptions objGetOptions = new ObjectGetOptions();
System.Management.ManagementClass rlObjectClass = new ManagementClass("root\\MicrosoftBizTalkServer", "MSBTS_ReceiveLocation", objGetOptions);

System.Management.EnumerationOptions enumObjOptions = new EnumerationOptions();
enumObjOptions.ReturnImmediately = false;
System.Management.ManagementObjectCollection rlObjColl = rlObjectClass.GetInstances(enumObjOptions);

foreach (ManagementObject rlObjInstance in rlObjColl)
if (rlObjInstance["Name"] != null)
if (string.Compare("ReceiveLocationName", rlObjInstance["Name"].ToString(), true, System.Globalization.CultureInfo.CurrentUICulture) == 0)
requiredRLObj = rlObjInstance;

requiredRLObj.InvokeMethod("Disable", null);
requiredRLObj.InvokeMethod("Enable", null);
Console.Write("Enabling Receive Location failed");

Receive attachments with content type text/xml via pop3

Receiving attachments via pop3 adapter of Microsoft Biztalk Server 2006 is possible using f.ex. an orchestration ( Receiving text/xml attachments you have to set the property BodyPart Contentelement in the pop3 configuration of your receive port to text/plain. With this options it is possible to receive any kind of attachments.

Without this configuration you wil get a XLANG error: WrongBodyPartException.

Problems with strict message validation of EDI Receive Pipeline

One Solution could be to unset EDI Validation strictness in EDI properties of a party. Just select EDI Properties->Party as Interchange Sender, then ACK Generation and Validation Settings. There is a checkbox labelled EDI type. If you uncheck this checkbox, Biztalk Server 2006 R2 EDI receive pipeline d’ont proove message on EDI conformness anymore.