Configure BizTalk hosts per Application

Posted: September 26, 2007  |  Categories: BizTalk Uncategorized

This week I am working on a small project to reconfigure the applications on test and production BizTalk 2006 Servers. The servers have several BizTalk applications all running under the same default BizTalk host. As an initial setup we want to create one host per application to isolate each different interchange, and will look into isolating certain adapters, send ports, receive locations or orchestrations later. We will also create a host that will be dedicated to tracking (note: configure only one host to perform tracking per BizTalk group, otherwise the Tracking Data Decode Service running on the hosts will deadlock each other ).

Applications in BizTalk Server 2006 and BizTalk Server 2006 R2 are no more than logical groupings of artifacts (orchestrations, send ports, receive ports, receive locations, schemas, maps, pipelines, etc). But the BizTalk applications aren’t bound to a specific host. Each orchestration can be configured to run on a specific host, and receive locations and send ports can be configured to run on specific adapter handlers on different hosts. This allows us to have a more granular control over what artifact runs on which host.

As I mentioned before, for this project we want to get everything under an application to run under the same host (unless this application uses isolated adapters, then there will be an extra host for these adapters).

To accomplish this we will have to perform the following for each application:

1 – Create a new host.

2 – Create one host instance for the host.

3 – Create receive and send handlers for each of the adapters used by the application.

4 – Stop receive ports and wait until all running instances have finished processing.

5 – Stop and unenlist the orchestrations.

6 – Update all orchestrations to run on the new host.

7 – Update all send ports to run on the new send handler for this host.

8 – Update all receive locations to run on the new receive handler for this host.

9 – Enlist and start orchestrations and start all receive locations and send ports.

Also, for adapters running on isolated hosts, we will have to create a separate isolated host and handlers, then configure the ports/locations using that adapter to run on them.

This process can be very repetitive and error prone. As I started to work on an C# application to help me automate part of this process I ran into this great (and I mean great!) tool by Saravana Kumar called BizTalk Host Configurator per Application. This tool will save me a few hours, it automates almost all of the steps above (excluding stopping and starting ports and unenlisting and reenlisting orchestrations). The only addition I made to it was to create an extra button that when clicked will export the current server configuration to file.

Great fun!

2 thoughts on “Configure BizTalk hosts per Application”

  1. I just need to extract the existing configuration out to a file that can be run to recreate the current configuration. We have so many hosts and host instances that it would be very difficult to recreate from documentation. Can you post your change to codeplex to add this button or post the code to do this step?

  2. Hi. Below is the code for the button I created, all it does is loop through the combo box and exports the treeview details for each application in the combo box, nothing fancy. You can probably modify the file that gets generated, and then create a method that reads that file and creates all the configurations in it.

    private void btnExportServerSetting_Click(object sender, EventArgs e)
    string result = “”;

    if (cmbBTSApplications.Items.Count > 0)
    int currentIndex = cmbBTSApplications.SelectedIndex;
    for (int i = 0; i 0)
    result += parseNode(tvReport.Nodes[0]);

    //Put it back
    cmbBTSApplications.SelectedIndex = currentIndex;

    string filename = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @”CurrentServerSettings.txt”;
    StreamWriter fs = new StreamWriter(filename, false, Encoding.UTF8);
    throw new Exception(“No applications found to export.”);
    catch (Exception ex)
    MessageBox.Show(“Error! Exporting the server settings. Message : ” + ex.Message, Constants.ExceptionWindowCaption, MessageBoxButtons.OK, Constants.ExceptionWindowIcon);

Comments are closed.

BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More

Manage and monitor serverless
components effortlessly

Learn More
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top