Everywhere I go now, the first thing I do before I do anything else, is install these two hotfixes. They solve a bunch of extremely painful BizTalk 2009 development issues.

BizTalk Server 2009 Orchestration Designer incorrectly indicates that there is an error in a BizTalk Server 2009 project http://support.microsoft.com/?kbid=979153

 

You experience various problems when you develop a BizTalk project that references another BizTalk project in Visual Studio on a computer that is running BizTalk Server 2009
http://support.microsoft.com/?kbid=977428

 

One gotchya to watch out for is that if you do a repair of either BizTalk or Visual Studio, (or in our case recently, reinstalled VS2008 SP1 in order to get the TFS client working) you will have to reinstall these hotfixes as well.

 

EDIT: June 22 2010. Not long after posting this I became aware of this tool from Microsoft. Unbelievably Microsoft seems to have released this last year and not told anybody about it. As far as I can tell hardly anyone is using this yet. I would suggest using this tool is probably a better solution than the Seroter style one we at Burch Consulting built. END EDIT

 

In the BizTalk world we’ve been using the BizTalk SSO configuration tool for about 3 years now. Richard Seroter supplied the original here: http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/

The problem with this tool was that you couldn’t add fields to an existing application and you couldn’t export/import the field values (only the field list). So we’ve fixed all that. We’ve also added a pick list of configured applications (which behind the scenes is also stored in SSO) so you can use a drop down to retrieve applications settings. (Only applications that this tool saves will be available in the pick list. For pre-existing applications you’ll have to type in the application name to retrieve them the first time).

The tool is for download at

www.burch.com.au/tools/BizTalk.Tools.SSO.zip

(Visual Studio 2008 webforms application)

Let me know if you’ve got any feedback.

 

Had a problem recently with the JDE Adapter (OneWorld) where the devenv send port worked for design time discovery but wouldn’t work at runtime.

Here is the error message (for all that google index goodness)

The Messaging Engine failed to create the transport adapter "JDEAdapter".

OutboundAssemblyPath: "NULL"

OutboundTypeName: "Microsoft.BizTalk.Adapters.JDEOneWorldTransmitter, Microsoft.BizTalk.Adapters.CoreTransmitter, Version=1.0.5025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Exception Details: "Could not load file or assembly 'Microsoft.BizTalk.Adapters.CoreTransmitter, Version=1.0.5025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The resolution was to switch the BizTalk host from 64bit to 32bit.

A good example of a time when I wish BizTalk would have better error messages.

 

 

Here’s something that is going to keep everyone wondering about the future for a while.

http://blogs.zdnet.com/microsoft/?p=6071

“Company officials have said Microsoft also is working on a new “major” version of BizTalk, which it is calling BizTalk Server vNext. This release will be built on top of Microsoft’s Windows AppFabric platform. So far, the Softies have not provided a release target for BizTalk Server vNext.”

 

This is one of those ‘duh’ things that you feel silly for spending 20 minutes on. Okay okay. 30 minutes…okay 45 minutes.

With the ESB toolkit the Itinerary Designer doesn’t live in a BizTalk project, it goes in a C# project. If you click on a BizTalk project and “Add –> New Itinerary” you don’t get a error, but the normal BizTalk add item dialog appears. Stupidly, the add item dialog has “Add New Itinerary” in the title bar, but there is no itinerary to choose. For 20 minutes it looked like the ESB Toolkit Visual Studio addin’s were corrupted or not installed correctly. Okay, 45 minutes…sheesh.

This is the thread that wised me up.

http://social.msdn.microsoft.com/Forums/en/biztalkesb/thread/050cc72d-0313-4ac7-ade5-d4da5cc3f014

I was just running the ESBConfigurationTool.exe to install the ESB Toolkit and I got the following exception.

“Could not load file or assembly ‘System.Management.Automation’ etc”

The configuration tool expects that Powershell is installed and it turns out on this particular server it wasn’t. Through the server manager I added PowerShell under “Features” and I was back in business.

 

The BizTalk product group has announced that the next release of BizTalk will be 2010 and not 2009 R2.

This name change reflects the fact that the next release has more value in it than just a minor release.

BizTalk 2010 is still scheduled to RTM in H1 FY11 (H2 CY2010). This name change will not impact the RTM dates.

 

Following is list of key capabilities added to the release

1. Enhanced trading partner management that will enable our customers to manage complex B2B relationships with ease

2. Increase productivity through enhanced BizTalk Mapper. These enhancements are critical in increasing productivity in both EAI and B2B solutions; and a favorite feature of our customers.

3. Enable secure data transfer across business partners with FTPS adapter

4. Updated adapters for SAP 7, Oracle eBusiness Suite 12.1, SharePoint 2010 and SQL Server 2008 R2

5. Improved and simplified management with updated System Center management pack

6. Simplified management through single dashboard which enables IT Pros to backup and restore BizTalk configuration

7. Enhanced performance tuning capabilities at Host and Host Instance level

8. Continued innovation in RFID Space with out of box event filtering and delivery of RFID events

 

I parachute into a lot of different BizTalk environments and every time I have to go locate the terminate script on MSDN and modify it etc.

So I’m posting it here for my own future short cuts.

The Terminate.vbs file:   (this a copy of the msdn sample but without the popups http://msdn.microsoft.com/en-us/library/bb203857(BTS.20).aspx)

dim objBtsWmiNS, objMsg, svcinsts, inst, msg, ndx, size

Dim aryClassIDs()
Dim aryTypeIDs()
Dim aryInstanceIDs()
Dim aryHostNames()
Dim aryObjQueues()
Dim aryHostBatchSize()

Dim strKey2Instance
Dim strQuery2Msg
maxBatchSize = 200 'Terminate in batches. Max supported batch size is 2K-1 (2047)

On Error Resume Next
Dim objArgs: Set objArgs = WScript.Arguments
If ( objArgs.Count = 0 OR objArgs.Count > 2) Then
     PrintUsage()
     wscript.quit 0
End If

wmiQuery = ""

'ServiceStatus = 16 - 'Completed With Discarded Messages' in BizTalk Server 2004
'ServiceStatus = 32 - 'Suspended (not resumable)'
'ServiceStatus = 4 - 'Suspended (resumable)'
'ServiceClass = 64 - 'Routing Failure Report'
'ErrorId = "0xC0C01B4C" - is how 'Completed With Discarded Messages' are exposed in BizTalk Server 2006

If (objArgs(0) = "-Z" OR objArgs(0) = "-z") Then
     wmiQuery = "select * from MSBTS_serviceinstance where ServiceStatus=16"
End If

If (objArgs(0) = "-A" or objArgs(0) = "-a") Then
     wmiQuery = "select * from MSBTS_serviceinstance where ServiceStatus=4 OR ServiceStatus=32 OR ServiceStatus=16 OR ErrorId='0xC0C01B4C' OR ServiceClass=64"
End If

If (objArgs(0) = "-SR" or objArgs(0) = "-sr") Then
     wmiQuery = "select * from MSBTS_serviceinstance where ServiceStatus=4"
End If

If (objArgs(0) = "-SNR" or objArgs(0) = "-snr") Then
     wmiQuery = "select * from MSBTS_serviceinstance where ServiceStatus=32"
End If

If (objArgs(0) = "-DIS" or objArgs(0) = "-dis") Then
     wmiQuery = "select * from MSBTS_serviceinstance where ServiceClass=32 AND ServiceStatus=8"
'ServiceClass = 32 'Isolated Adapter
'ServiceStatus = 8 'Dehydrated
End If

saveMessagesBeforeTermination = True
If ( objArgs.Count > 1) Then
     If (objArgs(1) = "-NOSAVE" OR objArgs(1) = "-nosave") Then
          saveMessagesBeforeTermination = False
     Else
          PrintUsage()
          wscript.quit 0
     End If
End If

If(wmiQuery = "") Then
     PrintUsage()
     wscript.quit 0
End If

'wscript.echo "-->Connecting to BizTalk WMI namespace"
Set objBtsWmiNS = GetObject("WinMgmts:{impersonationLevel=impersonate, (security)}\\.\root\MicrosoftBizTalkServer")
If Err <> 0 Then
     CheckWMIError
     wscript.quit 0
End If       

'wscript.echo "-->Getting BizTalk host collection"
Set hosts = objBtsWmiNS.ExecQuery("select * from MSBTS_HostSetting")
If Err <> 0 Then
     CheckWMIError
     wscript.quit 0
End If       

hostCount = hosts.count

ReDim aryHostNames(hostCount - 1)
ReDim aryObjQueues(hostCount - 1)
ReDim aryHostBatchSize(hostCount - 1)

'wscript.echo "-->Retrieve BizTalk host names and loading host queues"
ndx = 0
For Each host in hosts
'     wscript.echo "Found host " & host.Properties_("Name")
     aryHostNames(ndx) = host.Properties_("Name")
     Set aryObjQueues(ndx) = objBtsWmiNS.Get("MSBTS_HostQueue.HostName=""" & aryHostNames(ndx) & """")
     If Err <> 0 Then
          CheckWMIError
          wscript.quit 0
     End If       
     ndx = ndx + 1
Next

'wscript.echo "-->Getting collection of service instances"
Set svcinsts = objBtsWmiNS.ExecQuery(wmiQuery)

ReDim aryClassIDs(hostCount, maxBatchSize-1)
ReDim aryTypeIDs(hostCount, maxBatchSize-1)
ReDim aryInstanceIDs(hostCount, maxBatchSize-1)

'Iterate through instances and save them in host-specific arrays.
'Terminate instances from host-specific array when array gets to a maxBatchSize
'wscript.echo "-->Start iterating service instances"
totalCount = 0
For Each inst in svcinsts
     'wscript.echo "Found suspended instance """ & inst.Properties_("ServiceName") & """ on host " & inst.Properties_("HostName")
     'Resolve host index
     For hostIdx = 0 To hostCount-1
          If aryHostNames(hostIdx) = inst.Properties_("HostName") Then
               Exit For
          End If
     Next

    '16 is an internal service class that cannot be terminated
     If 16 = inst.Properties_("ServiceClass") Then
          wscript.echo "Skipping BizTalk internal service instances (they cannot be terminated anyway)"
     Else
          '64 is a routing failure report and doesn't have messages that can be saved
          If 64 = inst.Properties_("ServiceClass") Or 16 = inst.Properties_("ServiceClass") Then
               saveMessagesBeforeTermination = False
          End If

          errorCountSavingMessages = 0
          If saveMessagesBeforeTermination Then
               strQuery2Msg = "select * from MSBTS_MessageInstance where ServiceInstanceID=""" & inst.Properties_("InstanceId") & """"
               Set msgInsts = objBtsWmiNS.ExecQuery(strQuery2Msg)
               For Each msg in msgInsts
                    msg.SaveToFile "C:\Temp"
                  If Err <> 0 Then
                         CheckWMIError
                       wscript.echo "Failed to save MSBTS_MessageInstance"
                       wscript.echo Err.Description & Err.Number
                       errorCountSavingMessages = errorCountSavingMessages + 1
                  Else
                         wscript.echo "Saved message " & msg.Properties_("MessageInstanceID")
                  End If       
              Next
         End If
         If 0 = errorCountSavingMessages Then 'Only terminate when we had no problems saving messages
               aryClassIDs(hostIdx, aryHostBatchSize(hostIdx)) = inst.Properties_("ServiceClassId")
               aryTypeIDs(hostIdx, aryHostBatchSize(hostIdx)) = inst.Properties_("ServiceTypeId")
               aryInstanceIDs(hostIdx, aryHostBatchSize(hostIdx)) = inst.Properties_("InstanceId")
               aryHostBatchSize(hostIdx) = aryHostBatchSize(hostIdx) + 1 'Keep track of newly added instace for that host
          Else
               wscript.echo "Skipping the instance since couldn't save its messages"
          End If
          totalCount = totalCount + 1
          If(aryHostBatchSize(hostIdx) = maxBatchSize) Then
               TerminateAccumulatedInstacesForHost hostIdx
          End If
     End If
Next

' Delete whatever is left
For hostIdx = 0 To hostCount-1
     If aryHostBatchSize(hostIdx) > 0 Then
          TerminateAccumulatedInstacesForHost hostIdx
     End If
Next

wscript.echo "SUCCESS> " & totalCount & " instances were found and attempted to be terminated"

Sub     TerminateAccumulatedInstacesForHost(hostIdx)
     wscript.echo "Sending termination request for host " & aryHostNames(hostIdx) & " service instances"
     Dim aryClassIDs4Host()
     Dim aryTypeIDs4Host()
     Dim aryInstanceIDs4Host()
     ReDim aryClassIDs4Host(aryHostBatchSize(hostIdx)-1)
     ReDim aryTypeIDs4Host(aryHostBatchSize(hostIdx)-1)
     ReDim aryInstanceIDs4Host(aryHostBatchSize(hostIdx)-1)
     For i = 0 to aryHostBatchSize(hostIdx)-1
          aryClassIDs4Host(i) = aryClassIDs(hostIdx, i)
          aryTypeIDs4Host(i) = aryTypeIDs(hostIdx, i)
          aryInstanceIDs4Host(i) = aryInstanceIDs(hostIdx, i)
     Next
     aryObjQueues(hostIdx).TerminateServiceInstancesByID aryClassIDs4Host, aryTypeIDs4Host, aryInstanceIDs4Host
     CheckWMIError
     aryHostBatchSize(hostIdx) = 0
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) & ")."
          Else
               wscript.echo WMIError.Description & "(HRESULT: " & Hex(ErrNum) & ")."
               Set WMIError = nothing
          End If
          'wscript.quit 0
     End If

End Sub

Sub PrintUsage()
     wscript.echo "Usage:"
     wscript.echo "cscript Terminate.vbs < -Z | -A | -DIS | -SR | -SNR > [-nosave]"
     wscript.echo
     wscript.echo "  -Z terminates all ""Zombie"" instances (e.g. completed with discarded messages)"
     wscript.echo "  -A terminates all suspended and zombie instances as well as all routing failure reports"
     wscript.echo "  -SR terminates suspended resumable instances only"
     wscript.echo "  -SNR terminates suspended non-resumable instances only"
     wscript.echo "  -DIS terminates all dehydrated 'isolated adapter' instances"
     wscript.echo "  -nosave terminates instances without saving messages they reference"
     wscript.echo "  Default action is to save instances to the C:\Temp folder on the local computer"
     wscript.echo
     wscript.echo "  Ensure that the C:\Temp folder exists before running terminate if you want to save instances"
     wscript.echo
     wscript.echo "  Example: cscript Terminate.vbs -z -nosave"
     wscript.echo
End Sub

The batch file I put in the quick launch taskbar.

terminate.vbs -a -nosave

 

I always forget the exact syntax for this so I’m posting it here for my own quick finding.

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)"