O'Reilly logo

Professional BizTalk® Server 2006 by Ewan Fairweather, Kevin B. Smith, Darren Jefford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.3. Storing Configuration Data

Storage of application configuration data is a problem in any BizTalk project. You might have string literals used by orchestrations or .NET assemblies that should be made configurable to enable change after compilation, endpoint URLs for dynamic sends, caching of data, and so on. Because orchestrations and .NET assemblies are represented as DLLs, they cannot have standard .NET-style configuration files. Instead, any configuration entries must be placed in the loading application's configuration file (YourLoadingApplication.exe.config). You can then access these entries via the usual AppSettings approach.

For BizTalk-based solutions, the loading application is always the BizTalk service: btsntsvc.exe. You can find this service in %PROGRAMFILES%\Microsoft BizTalk Server 2006. Of course, any parts of your solution hosted by other applications such as IIS will introduce another configuration file (e.g., web.config).

If you add custom entries such as the ones shown here to the existing btsntsvc.exe.config file, you can retrieve them using the following code:

<configuration>
  <appSettings>
    <add key ="AServerName" value="MYSERVER1"/>
  </appSettings>
</configuration>

string ServerName = ConfigurationManager.AppSettings["AServerName"];

Although this works fine, it does require a sensitive configuration file to be updated. If you make a typo in btsntsvc.exe.config, it will cause the BizTalk Service to fail when starting. Therefore, modification is something ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required