Tool: BizTalk Send Port Duplicator

Often times during development, and even in production, you have a need to create new BizTalk ports that are virtually identical to an existing one.

For instance, in a “content based routing” scenario, odds are you would test this by creating multiple send ports, all with a slight deviation in subscription criteria and destination path. We also have a case where data received by SAP is sent to a series of virtually identical send ports. Because all the SOAP send ports use the same proxy class for transmitting the service, the ONLY difference is the URL itself. But, it’s a hassle to create a new send port each time.

So, I took a few minutes yesterday, and using a BizTalk SDK example as inspiration, wrote a small tool that duplicates existing send ports. If I felt more ambitious I’d make it a custom MMC action, but alas, I’m not that motivated.

When you fire the BizTalk Send Port Duplicator (patent pending) up, the first thing you do is set the server where the BizTalk Management Database resides.

Then, you optionally choose which BizTalk “application” has the port you wish to copy. If you don’t choose an application from the drop down list, then you’ll get all send ports in your BizTalk environment.

Next, select the send port from the listbox, and type in a name that will be used for the port copy.

The copied send port shows up in the BizTalk Administration Console in the same “application” as the source send port. You can open it up and see nearly all properties copied across. What properties are included? You can copy one-way or two-way ports, filter/subscription, primary transport details (address, retry, handlers), maps, and pipelines. At the moment, I’m not copying secondary transport details, certificates, tracking details, or dynamic ports.

You can download the BizTalk Send Port Duplicator here. I’ve included the source code as well, so feel free to mess around with it.

[UPDATE (10/02/2007)] I’ve updated the application to also support choosing the name of the Management database. Prior, I had hard-coded this value.

Technorati Tags:

Author: Richard Seroter

Richard Seroter is currently the Chief Evangelist at Google Cloud and leads the Developer Relations program. He’s also an instructor at Pluralsight, a frequent public speaker, the author of multiple books on software design and development, and a former InfoQ.com editor plus former 12-time Microsoft MVP for cloud. As Chief Evangelist at Google Cloud, Richard leads the team of developer advocates, developer engineers, outbound product managers, and technical writers who ensure that people find, use, and enjoy Google Cloud. Richard maintains a regularly updated blog on topics of architecture and solution design and can be found on Twitter as @rseroter.

19 thoughts

  1. Nice tool Richard. However, it looks like it has an issue running under 64-bit BizTalk 2009 machines. I get the following exception:
    Error occurred: Details: Microsoft.BizTalk.ExplorerOM.BtsException: Explorer OM is not supported in a 64bit process. Do you know of a workaround?

      1. Monish,
        You just need to recompile the project from the source code, under Project Properties > Build > Set platform target to x86. Then this works very well.

        Also seems to work on BizTalk 2009.

        Thanks for the tool Richard.

      2. I a running ESB 1.0
        Getting the following error when I try to browse the Portal:

        Event Type: Error
        Event Source: Microsoft.Practices.ESB
        Event Category: None
        Event ID: 6010
        Date: 2009/06/17
        Time: 12:25:14 PM
        User: N/A
        Computer: ZAGBLCPTBPM01
        Description:
        Explorer OM is not supported in a 64bit process.

        Source: Microsoft.Practices.ESB.BizTalkOperations.BizTalkQuery

        Method: Void .ctor()

        Error Source: Microsoft.BizTalk.ExplorerOM

        Error TargetSite: Void .ctor()

        Error StackTrace: at Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer..ctor()
        at Microsoft.Practices.ESB.BizTalkOperations.BizTalkQuery..ctor()

    1. Pavel, is your orchestration doing a synchronous communication or async? If your orchestration is sending out a message and not waiting for a response, you can use Direct Binding and have any number of ports listen to that message and send something out.

  2. Great little tool, I used it for the first time yesterday and it saved me significant amounts of time. I’m wondering if it would be easily feasible to set this up to copy ports between Biztalk servers (ie, from TEST to QA). I haven’t studied your code yet, but if your using the Explorer OM l i’m guessing I could just instantiate another OM object to the 2nd server and change the code to copy to this OM…?

  3. Hey very cool tool ! The only thing that is missing is the copy of the pipepline parameters ! Cheers

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.