Blog Post

Azure Integration Services Blog
2 MIN READ

Let your Biztalk host read config from different BTSNTSvc.exe.config

zhangz's avatar
zhangz
Copper Contributor
Jun 09, 2025

By default, all BizTalk Host Instances rely on the shared BTSNTSvc.exe.config file for configuration. This unified setup works well for most scenarios, but it becomes a limitation when different Host Instances need to behave differently. For example, you might want one instance to load a different version of a DLL, or apply a more verbose logging level for debugging purposes. Since the default configuration file is global, these instance-specific needs cannot be met without impacting others. To address this, creating separate Host Instances with their own configuration files becomes a practical and powerful solution.

Please note that this solution has not been fully validated across all environments. It is not an officially supported approach and should be used only for testing or debugging purposes.

This article does not differentiate between 32-bit and 64-bit versions of BizTalk. Please adjust the paths and executables according to your Host Instance's runtime architecture.


Step 1: Create a New Host and Host Instance via the BizTalk Server Administration Console

After creating the Host and Host Instance, you can find the new entry in the [BizTalkMgmtDb].[dbo].[adm_HostInstance] table. The system assigns it a unique ID, and the [InstallationContext] column indicates the registered executable path — but it does not determine the actual executable used at runtime.

For example, in my setup I have two custom Host Instances:

  • CustomHost: [InstallationContext] still points to the default path, but it runs a different BTSNTSvc.exe.
  • Custom2: [InstallationContext] points to a different path, but it still runs the original BTSNTSvc.exe.


Step 2: Copy the BizTalk Folder to a New Location

The default BizTalk installation path is typically:
C:\Program Files (x86)\Microsoft BizTalk Server

Make a complete copy of this folder.
In my case, I copied it to: C:\Program Files (x86)\BizTalkCustomHostInstance
This ensures I have an isolated version of BTSNTSvc.exe and its corresponding config file.

 

Step 3: Modify the Windows Registry

Open Registry Editor, and navigate to the newly created host instance key:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTSSvc$CustomHost

Update the ImagePath value to point to the new folder, using the correct syntax and referencing the appropriate -btsapp GUID found in the adm_HostInstance table:

"C:\Program Files (x86)\BizTalkCustomHostInstance\BTSNTSvc64.exe" -group "BizTalk Group" -name "CustomHost" -btsapp "{12FAF484-ACB4-4E25-93A1-36DFBC75B6C5}"

 

Step 4: Restart the Host Instance

Once the registry change is complete, restart the Host Instance. You should see that it now runs using the executable from the new location.

 

Step 5: Verifying Whether It Loads a Different BTSNTSvc.exe.config

A simple trick to verify whether the new Host Instance is loading the custom configuration file is to intentionally corrupt the copied BTSNTSvc.exe.config. For instance, remove the closing </configuration> tag to break the XML structure.

If the Host Instance fails to start and throws a configuration-related error, it confirms that it is indeed using the config file from the new path.

 

With this approach, you can create separate Host Instances that execute isolated BTSNTSvc.exe binaries and load custom BTSNTSvc.exe.config files. This enables scenarios such as loading different DLL versions or applying specific logging configurations, without impacting other running instances.

Updated Jun 09, 2025
Version 1.0
No CommentsBe the first to comment