Thursday, September 18, 2014

This property cannot be currently changed. Please unelist the send port before changing this property.

Yesterday we ran into this error while importing a BizTalk binding file for an existing application:

Failed to update binding information. (mscorlib)

This property cannot be currently changed.  Please unelist the send port before changing this property. (Microsoft.BizTalk.ExplorerOM)

(The typo is Microsoft's, not mine)

That is the same error you get when trying to change an enlisted send port to (or from) ordered delivery.

Our situation was weird though, as the existing application had been created using the exact same binding file. Meaning, we have a binding file that can be imported once, but not twice.

The reason for this is rather subtle. Created by a hand the binding file configuring the ordered send port looked somewhat like this:

<SendPort ...>
   ...
  <PrimaryTransport>
   ...
   <OrderedDelivery>false</OrderedDelivery>
   ...
  </PrimaryTransport>
  <SecondaryTransport>
   ...
  </SecondaryTransport>
   ...     
  <OrderedDelivery>true</OrderedDelivery>
   ...
</SendPort>

Note how ordered delivery of the primary transport is set to false while ordered delivery is set to true on the send port itself. This will create a send port with an ordered primary transport on first import, but a second import will make the import fail with the error above.

The solution is to keep the OrderedDelivery tag of the send port in sync with that of the Primary transport

<SendPort ...>
   ...
  <PrimaryTransport>
   ...
   <OrderedDelivery>true</OrderedDelivery>
   ...
  </PrimaryTransport>
  <SecondaryTransport>
   ...
  </SecondaryTransport>
   ...     
  <OrderedDelivery>true</OrderedDelivery>
   ...
</SendPort>

This is however not very clear from the documentation:


Finally a word of caution: import binding can change a send ports delivery status to and from ordered delivery without first having to unenlist the port. I'm investigate whether this is safe or not:

Safe to change sendport delivery status to and from ordered delivery using import binding?


Wednesday, September 3, 2014

How-to move BizTalk databases

Even though Microsoft has provided scripts to help moving BizTalk databases it's still a cumbersome.

For reference please see:
I've created the script below to ease the pain after database restore. The script will:
  1. create the config file used by UpdateDatabase.vbs and UpdateRegistry.vbs
  2. stop all running host instances by stopping ESSO
  3. update the BizTalk databases content
  4. update the BizTalk frontend registry values
  5. start ESSO
  6. start all previously running host instances
Please note, the script will only work in the simple case of no BAM and all databases residing on one database server only.