BizTalk Server Port Export

BizTalk Server Best practices, Tips, and Tricks: #12 Export Bindings of a Single Port

Published on : Mar 14, 2023

Category : BizTalk Server

Sandro

Author

Welcome again to another BizTalk Server Best practices, Tips, and Tricks blog post! In my previous blog posts, I discussed some essential tips and tricks for BizTalk Server administrators:

And for BizTalk Server Developers:

Today I will speak about another critical Best practice, Tips, and Tricks, this time for BizTalk Server administrators: How to export a binding file for a single BizTalk Server Port.

BizTalk Server Port Export

Export Bindings of a Single Port

Exporting a BizTalk Server Application binding is, at first sight, a simple and quick task that can be done using the BizTalk Server Administration Console. But even in simple tasks, we may encounter challenges requiring us to perform monotonous and boring manual operations that consume some of our precious time and are always subject to failures.

Unfortunately, out-of-the-box, BizTalk Server doesn’t provide any simple and direct way to export the bindings of a single BizTalk receive or send port, which leaves us with only one option:

  • We can export the application binding files and manually clean the file to get only the binding of the desired port – which can be quite laborious and easy to perform mistakes.

Why is this important?

Often during development and even production, especially, for example, in content-based routing scenarios that don’t require orchestrations, we just need to create one or two new ports in our BizTalk Application, and we don’t want to export all the bindings of all ports to deploy to production.

We never know if we will make some mistake and break something that is already running fine in production – at least, I try to avoid this way of deploying artifacts in my applications in production. I prefer only to deploy what is indeed necessary. So, if I created a new receive port and location and a send port with a filter to subscribe to the messages, I only want to deploy these two artifacts!

How can I easily export bindings for a single port or even to a list of ports?

The first  alternative that we have to automate these tasks is to use PowerShell, and here you have three samples that I created and shared in GitHub for you to allow to export the bindings:

Of course, you will need then to manually change the bindings in order to modify the following parameters:

  • the URIs: these should be fixed, but it is not mandatory. If you know what you are doing, you can fix them directly on the environment after you import the Binding.
  • the host instances: not mandatory if you have the same host and host instances names across all your different environments (as best practices will tell you to do).
  • the NT Group Name associated with the Services (Orchestrations): according to securities best practices, you shouldn’t use the same BizTalk Groups in different environments, so in this case, if you follow these best practices, you need to change these parameters in your binding file.

Another way, and easier, is to use the BizTalk Binding Exporter Tool that I create and which is also available on GitHub.

BizTalk Binding Exporter Tool is a simple tool that will suppress the absence of advanced binding file generation capabilities in the BizTalk Server Administration Console, allowing you to generate and export a binding file from BizTalk Applications in an intuitive and easy way.

BizTalk Server Port Export

And this tool allows you to generate and export binding files with the following capabilities:

  • Export binding(s) file(s) for an entire Application or a list of Applications;
  • Export binding(s) file(s) from a specific Assembly or list of Assemblies;
  • Export binding(s) file(s) from a Receive Port or list of Receive Ports;
  • Export binding(s) file(s) from a Send Port or list of Send Ports;
  • Or Generate different binding files for each environment if you create an Excel File with the mapping for each environment ;

This tool is also available for the following BizTalk Server versions:

Stay tuned for the following BizTalk Server Best practices, Tips, and Tricks.