According to

You can find the WCF Test Client (WcfTestClient.exe) in the following location: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\

If you have Visual Studio 2010 installed on a 64bit OS, it is found here:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe


There are two binding files included in the ESB toolkit 2.1 that are made available if you want to make changes to the bindings.


You will make the modifications, import the binding file, and it will import it correctly, and when you go to start the Microsoft.Practices.ESB, you will get this error:

Exception 0xC00CE557

The issue is that it changes the filter from:

<Filter>&lt;?xml version="1.0" encoding="utf-16"?&gt;
	&lt;Filter xmlns:xsi="" xmlns:xsd=""&gt;
	&lt;Statement Property="ErrorReport.FailureCode" Operator="6" /&gt;
	&lt;Statement Property="Microsoft.Practices.ESB.ExceptionHandling.Schemas.Property.FaultCode" Operator="6" /&gt;


        &lt;?xml version="1.0" encoding="utf-16"?&gt;
	&lt;Filter xmlns:xsi="" xmlns:xsd=""&gt;
	&lt;Statement Property="ErrorReport.FailureCode" Operator="6" /&gt;
	&lt;Statement Property="Microsoft.Practices.ESB.ExceptionHandling.Schemas.Property.FaultCode" Operator="6" /&gt;

Lesson to learn: the filter settings within the binding file need to be correctly formatted xml (spaces before the first open carrot is illegal)


If you look at the arguments of the setup.exe to do an install of BizTalk you can install everything by using the following switch: /ADDLOCAL ALL. However, you will notice that you can supply an xml to tell the setup what components to install:


But where is a sample configuration file? (I could not find it anywhere on MSDN)

You could use the following xml file to install all components, which is the tail of the configuration file that is created after the setup.exe completes.


And your batch script could look like this (notice you can’t use /quiet or /passive, but it can still be hands free):

"\\BizTalk Server 2010 Enterprise\BizTalk Server\setup.exe" /s "\\BizTalk Server 2010 Enterprise\BizTalk Server\CompleteSetup.xml"  /l c:\biztalksetupSSO.log /CompanyName Company /Username Developer /cabpath "\\BizTalk Server 2010 Enterprise\BizTalk Server\"

Option 2:

If you look deep in the log files you can see that on a full install has the following options:

MSI (s) (B8:0C) [01:30:32:802]: Command Line: ADDLOCAL=MsEDIAS2,MsEDIAS2StatusReporting,WCFAdapter,InfoWorkerApps,BAMPortal,WcfAdapterAdminTools,PAM,Development,MsEDISchemaExtension,MsEDISDK,MsEDIMigration,Documentation,SDK,WMI,BizTalk,MOT,Engine,MSMQ,Runtime,RfidEventForwarderMessageTransform,AdminAndMonitoring,MonitoringAndTracking,AdminTools,BizTalkAdminSnapIn,HealthActivityClient,BAMTools,Migration,BizTalkExplorer,BizTalkExtensions,OrchestrationDesigner,Designer,PipelineDesigner,XMLTools,AdapterImportWizard,VSTools,WCFDevTools,DeploymentWizard,TrackingProfileEditor,SSOAdmin,AdditionalApps,SSOServer,RulesEngine,OLAPNS,FBAMCLIENT,BAMEVENTAPI,ProjectBuildComponent COMPANYNAME=Company USERNAME=Developer FILESINUSEERROR= CEIP=0 CURRENTDIRECTORY=C:\Users\estott\AppData\Local\Temp\EBZ30319.tmp CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 CLIENTPROCESSID=5024 

I would like to tell you that I have figured out all of the combinations of what you want to install, but Trace Young beat me to it.


At a recent client I was at, we were installing BizTalk 2010, but the servers did not have access to the internet. None of the development machines were the same build as the servers that were locked down behind the firewall.

This made getting the CAB file for that server type a little challenging.

Here is a list of the version and the links to download the cab files directly





Does anyone know what FutureNT means? By the link provided, it appears to be the same as the latest version of Windows.


I wanted a script that post a new BizTalk build, I could run and it could create new hosts, host instances, create new receive and send handlers and finally start the host instances

'Create the new host
CreateHost "App2Host", InProcess, "CORP\BTSAppUsers-Dev", False, False, False, False

'Make the new host the default host
UpdateHost "App2Host",True,True

'Turn the tracking off of the initially installed host
UpdateHost "App1Host",False,False

'Create the host instance
FinalizeInstallHostInstance "App2Host","CORP\svcBTSHost-Dev","P4ssw0rd!"

ReConfigureReceiveHandler "App1Host","WCF-SQL"
CreateReceiveHandler "App2Host","WCF-SQL"
CreateSendHandler "App2Host","WCF-SQL"

'Start all of the host instances that are not currently running

Sub CreateHost (HostName, HostType, NTGroupName, AuthTrusted, Isdefault, IsHost32BitOnly, HostTracking )
   On Error Resume Next

   Dim objLocator, objService, objHostSetting, objHS

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_HostSetting
   Set objHostSetting = objService.Get ("MSBTS_HostSetting")

   Set objHS = objHostSetting.SpawnInstance_

   objHS.Name = HostName
   objHS.HostType = HostType
   objHS.NTGroupName = NTGroupName
   objHS.AuthTrusted = AuthTrusted
   objHS.Isdefault = IsDefault
   objHS.IsHost32BitOnly = IsHost32BitOnly
   objHS.HostTracking = HostTracking

   ' Create instance

   wscript.echo "Host - " & HostName & " - has been created successfully"

end Sub

Sub UpdateHost (HostName, HostTracking, IsDefault)
   On Error Resume Next

   Dim objLocator, objService, objHS

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Look for WMI Class MSBTS_HostSetting with name equals HostName value
   Set objHS = objService.Get("MSBTS_HostSetting.Name='" & HostName & "'")

   objHS.HostTracking = HostTracking
   objHS.IsDefault = IsDefault

   ' Update instance properties

   ' Check for error condition before continuing.
   wscript.echo "Host - " & HostName & " - has been updated successfully"

end Sub
Sub FinalizeInstallHostInstance (HostName, uid, pwd)
 On Error Resume Next
 Dim ServerName, objSysInfo
 Set objSysInfo = CreateObject( "WinNTSystemInfo" )
 ServerName = objSysInfo.ComputerName
 MapInstallHostInstance HostName,ServerName,uid,pwd
end Sub

Sub MapInstallHostInstance (HostName, ServerName, uid, pwd)
'Sub MapInstallHostInstance (HostName, uid, pwd)
   On Error Resume Next

   Dim objLocator, objService, objServerHost, objSH
   Dim objHostInstance, objHI
   'Dim ServerName, wshShell

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")
   Set objServerHost = objService.Get ("MSBTS_ServerHost")

   Set objSH = objServerHost.SpawnInstance_

   objSH.HostName = HostName
   objSH.ServerName = ServerName

   ' Invoke MSBTS_ServerHost Map method

   wscript.echo "Host - " & HostName & " - has been mapped successfully to server - " & ServerName

   Set objHostInstance = objService.Get ("MSBTS_HostInstance")

   Set objHI = objHostInstance.SpawnInstance_

   objHI.Name = "Microsoft BizTalk Server " & HostName & " " & ServerName

   ' Invoke MSBTS_HostInstance Install method
   objHI.Install uid, pwd, true   ' Calling MSBTS_HostInstance::Install(string Logon, string Password, boolean GrantLogOnAsService) method

   wscript.echo "HostInstance - " & HostName & " - has been installed successfully on server - " & ServerName

end Sub
Sub ReConfigureReceiveHandler(HostName,AdapterName)
	'error handling is done by explicity checking the err object rather than using
	'the VB ON ERROR construct, so set to resume next on error.
	On Error Resume Next

	'Get the command line arguments entered for the script
	Dim objArgs: Set objArgs = WScript.Arguments

	'Make sure the expected number of arguments were provided on the command line.
	'if not, print usage text and exit.

	Dim objInstSet, objInst, strQuery

	'set up a WMI query to acquire a list of send handlers with the given Name key value.
	'This should be a list of zero or one send handlers.
	strQuery = "SELECT * FROM MSBTS_ReceiveHandler WHERE AdapterName =""" & AdapterName & """"
	Set objInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(strQuery)

	'If send handler found, set configuration information, otherwise print error and end.
	If objInstSet.Count > 0 then
		For Each objInst in objInstSet

			'Commit the change to the database
			If Err <> 0	Then
				PrintWMIErrorThenExit Err.Description, Err.Number
			End If
			WScript.Echo "The "& AdapterName &" Receive Handler was successfully configured."
		WScript.Echo "No Receive Handler was found matching that AdapterName."
	End If
End Sub
' Sample to show MSBTS_ReceiveHandler instance creation with CustomCfg property
Sub CreateReceiveHandler (HostName, AdapterName)
   On Error Resume Next

   Dim objLocator, objService, objReceiveHandler, objRH, objSendHandler, objSH

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_ReceiveHandler
   Set objReceiveHandler = objService.Get ("MSBTS_ReceiveHandler")

   Set objRH = objReceiveHandler.SpawnInstance_

   objRH.AdapterName = AdapterName
   objRH.HostName = HostName

   ' Create instance

   wscript.echo "Receive Handler - " & AdapterName & " " & HostName & " - has been created successfully"

end Sub
Sub CreateSendHandler (HostName, AdapterName)
   On Error Resume Next

   Dim objLocator, objService, objSendHandler, objSH

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_ReceiveHandler
   'Insert the Send Handler make sure you use SendHandler2 as SendHandler is a throwback to BTS 2004 which does not allow updates
   Set objSendHandler = objService.Get ("MSBTS_SendHandler2")

   Set objSH = objSendHandler.SpawnInstance_

   objSH.AdapterName = AdapterName
   objSH.HostName = HostName

   ' Create instance

   wscript.echo "Send Handler - " & AdapterName & " " & HostName & " - has been created successfully"

end Sub
Sub StartAllInProcessHostInstance ()
   On Error Resume Next

   Dim Query, HostInstSet, Inst

   ' Enumerate all InProcess type Host Instance
   Query = "SELECT * FROM MSBTS_HostInstance WHERE HostType =1"
   Set HostInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(Query)

   For Each Inst in HostInstSet

      ' If host instance is stopped, then it'll start it
      If( HostInstServiceState_Stopped = Inst.ServiceState ) Then
         wscript.echo "Starting host instance..."
             Inst.Start   ' Calling MSBTS_HostInstance::Start() method
         wscript.echo "HostInstance - " & Inst.HostName & " - has been started successfully on server - " & Inst.RunningServer
      End If

end Sub

'This subroutine deals with all errors using the WbemScripting object.  Error descriptions
'are returned to the user by printing to the console.
Sub   CheckWMIError()

   If Err <> 0   Then
      On Error Resume   Next

      Dim strErrDesc: strErrDesc = Err.Description
      Dim ErrNum: ErrNum = Err.Number
      Dim WMIError : Set WMIError = CreateObject("WbemScripting.SwbemLastError")

      If ( TypeName(WMIError) = "Empty" ) Then
         wscript.echo strErrDesc & " (HRESULT: "   & Hex(ErrNum) & ")."
         wscript.echo WMIError.Description & "(HRESULT: " & Hex(ErrNum) & ")."
         Set WMIError = nothing
      End   If

      wscript.quit 0
   End If

End Sub


Here is the components that need to be enabled for UDDI to run properly

Task 3: Install Internet Information Services When installing IIS on Windows Server 2008 R2, you must enable following IIS features:
  • Basic Authentication
  • Windows Authentication
  • IIS 6 Metabase Compatibility

You simply create a batch file with the following command:

start /w pkgmgr /iu:IIS-ASPNET;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-IIS6ManagementCompatibility;IIS-Metabase

If you are going to install the WFC adapters for SQL, SAP, and Oracle, there is not a way that the install can be complete during a silent install.

The adapters don’t show up in the management console without having to manually add them.

Until now…

All you need to do is run this AddAdapter.vbs (BizTalk 2010)

AddAdapter "WCF-SQL", "WCF-SQL adapter", "{59b35d03-6a06-4734-a249-ef561254ecf7}"
AddAdapter "WCF-SAP", "WCF-SAP adapter", "{a5f15999-8879-472d-8c62-3b5ea9406504}"
AddAdapter "WCF-OracleDB", "WCF-OracleDB adapter", "{d7127586-e851-412e-8a8a-2428aeddc219}"
AddAdapter "WCF-OracleEBS", "WCF-OracleEBS adapter", "{f452bb15-7a0d-495d-9395-c630d3fd29cd}"

Sub AddAdapter(strAdapterName, strAdapterComment, strAdapterMgmtCLSID)
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")
Set objAdapterClass = objService.Get("MSBTS_AdapterSetting")

On Error Resume Next
Set objAdapterInstance = objService.Get("MSBTS_AdapterSetting.Name='" & strAdapterName & "'")
If (objAdapterInstance is Nothing) Then
On Error Goto 0
Set objAdapterInstance = objAdapterClass.SpawnInstance_
On Error Goto 0
End If

objAdapterInstance.Name = strAdapterName
objAdapterInstance.Comment = strAdapterComment
objAdapterInstance.MgmtCLSID = strAdapterMgmtCLSID

On Error Resume Next
If (Err.Number <> 0) Then
End If
End Sub

So this is what the batch file looks like:

"\\BizTalk Server 2010 Enterprise\WCF-LOB-Adapter-SDK-2010-x86\AdapterFramework.msi" /quiet MUOPTIN="Yes"
"\\BizTalk Server 2010 Enterprise\WCF-LOB-Adapter-SDK-2010-x64\AdapterFramework64.msi" /quiet MUOPTIN="Yes"
msiexec /i "\\BizTalk Server 2010 Enterprise\BizTalk Server\AdapterPack_x86\AdaptersSetup.msi" /qn ADDLOCAL=ALL
msiexec /i "\\BizTalk Server 2010 Enterprise\BizTalk Server\AdapterPack_x64\AdaptersSetup64.msi" /qn ADDLOCAL=ALL
cscript.exe "\\BizTalk Server 2010 Enterprise\BizTalk Server\AddAdapter.vbs"

And you get something that looks like this:



Error: 1 (Field level error)
SegmentID: CLM
Position in TS: 22
Data Element ID: CLM02__TotalClaimChargeAmount
Position in Segment: 2
Data Value: 8888.99
6: Invalid character in data element

This can be resolved by changing the party definition to allow leading and trailing spaces and zeros.





I deal quite a lot with AS2 and BizTalk.  I sometimes lose track of the different types of files when dealing with the certificates.  I found a nice description of all the file types and a nice little converter online.

Here is the good description:

PEM Format
The PEM format is the most common format that Certificate Authorities issue certificates in. PEM certificates usually have extentions such as .pem, .crt, .cer, and .key. They are Base64 encoded ASCII files and contain “—–BEGIN CERTIFICATE—–” and “—–END CERTIFICATE—–” statements. Server certificates, intermediate certificates, and private keys can all be put into the PEM format.

Apache and other similar servers use PEM format certificates. Several PEM certificates, and even the private key, can be included in one file, one below the other, but most platforms, such as Apache, expect the certificates and private key to be in separate files.

DER Format
The DER format is simply a binary form of a certificate instead of the ASCII PEM format. It sometimes has a file extension of .der but it often has a file extension of .cer so the only way to tell the difference between a DER .cer file and a PEM .cer file is to open it in a text editor and look for the BEGIN/END statements. All types of certificates and private keys can be encoded in DER format. DER is typically used with Java platforms. The SSL Converter can only convert certificates to DER format. If you need to convert a private key to DER, please use the OpenSSL commands on this page.

PKCS#7/P7B Format
The PKCS#7 or P7B format is usually stored in Base64 ASCII format and has a file extention of .p7b or .p7c. P7B certificates contain “—–BEGIN PKCS7—–” and “—–END PKCS7—–” statements. A P7B file only contains certificates and chain certificates, not the private key. Several platforms support P7B files including Microsoft Windows and Java Tomcat.

PKCS#12/PFX Format
The PKCS#12 or PFX format is a binary format for storing the server certificate, any intermediate certificates, and the private key in one encryptable file. PFX files usually have extensions such as .pfx and .p12. PFX files are typically used on Windows machines to import and export certificates and private keys.

When converting a PFX file to PEM format, OpenSSL will put all the certificates and the private key into a single file. You will need to open the file in a text editor and copy each certificate and private key (including the BEGIN/END statments) to its own individual text file and save them as certificate.cer, CACert.cer, and privateKey.key respectively.

OpenSSL Commands to Convert SSL Certificates on Your Machine
It is highly recommended that you convert to and from .pfx files on your own machine using OpenSSL so you can keep the private key there. Use the following OpenSSL commands to convert SSL certificate to different formats on your own machine:

OpenSSL Convert PEM
Convert PEM to DER

openssl x509 -outform der -in certificate.pem -out certificate.der

Convert PEM to P7B

openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer

Convert PEM to PFX

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

OpenSSL Convert DER
Convert DER to PEM

openssl x509 -inform der -in certificate.cer -out certificate.pem

OpenSSL Convert P7B
Convert P7B to PEM

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

Convert P7B to PFX

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

OpenSSL Convert PFX
Convert PFX to PEM

openssl pkcs12 -in certificate.pfx -out certificate.cer –nodes

Here is their little certificate converter:


I had a requirement to consume .PDFs and attach all of them that arrived within 30 minutes to an email with the PDFs as attachments.  I created a multi part message that I named msg_Email of type System.Xml.XmlDocument.  I created the message using a Construct Message shape.  I then loaded the body of the message using the .LoadXML() method.  I then used a helper class named EmailAttacher to attach the new messages needing to be attachments to the existing multi part email message.  Here is the helper class code.

namespace EmailAttacher
    public class MessageHelper
        public static void AddAttachment(XLANGMessage destination, XLANGMessage attachment, string filename)
                int count = destination.Count;
                destination.AddPart(attachment[0], string.Format(“Attachment_{0}”, count));
                destination[count].SetPartProperty(typeof(MIME.FileName), filename);
                //decrement reference count


The message assignment shape has the following code to add the newest message to the existing message.

EmailAttacher.MessageHelper.AddAttachment(msg_Email, msg_ToAddAsAttachment,”NameOfAttachedFile”);

Don’t forget to add this, to ensure all message parts that aren’t the body are attachments.

msg_Email(SMTP.MessagePartsAttachments) = 2;

© 2016 BizTalk Blog Suffusion theme by Sayontan Sinha