Enterprise Library 2.0 was released early this year. The library consists of several application blocks for so called enterprise level applications; logging, data access, security, configuration, exception handling, and so on.
BizTalk Server 2006 provides a great tool for BizTalk Server configuration, but it doesn’t seem to have any tool for the application configuration running on BizTalk Server.
Of course, you can use the configuration application block included in Enterprise Library 2.0, but you should touch the BTSNTSVC.exe.config file that is a system-wide resource. Otherwise, you can use the SSO store to manage the configuration, but you still need to make a custom management tool, and it couldn’t be well integrated with Enterprise Library 2.0. .
I thought the best way to solve these problems should be to implement a SSO configuration source for Enterprise Library. In this way, you can use the Enterprise Library configuration tool to save your configuration information, and the application blocks in Enterprise Library can be more seamlessly integrated into the BizTalk Server 2006 applications.
How to install the SSO configuration source:
1) Download the SsoConfigurationSource.VSTS solution and unzip it to the C:\BizTalkServer2006RTWSamples folder.
2) Compile the sample solution. It is recommend downloading Enterprise Library 2.0 from the Microsoft patterns and practices Web site, but you don’t need to do that because this sample includes all of the executables in the EnterpriseLibrary2.0Signed folder.
3) Run the following command to create the SSO application for the application blocks in Enterprise Library: DummyApp.xml is in the TestData folder of the SsoConfigurationTest project.
ssomanage -createapps DummyApp.xml
How to test the SSO configuration source:
4) Open EntlibConfig.exe that is the configuration tool for Enterprise Library 2.0, which is included in the EnterpriseLibrary2.0Signed folder.
5) Open DummyApp.config using EntlibConfig.exe. DummyApp.config has a full sample configuration information for Enterprise Library. You can pick up just a few of the application blocks as you need.
6) Create a new Configuration Sources.
7) Remove System Configuration Source, and then add Sso Configuration Source.
8) Set the ApplicationName property to Dummy, and then set the SelectedSource property of the Configuration Source node to SSO Configuration Source.
9) Save it. It will save the configuration information in the file to SSO. (You can also create configuration information from scratch or export the existing configuration data in SSO to an external file.)
Now, you can use Enterprise Library in the BizTalk Server applications like:
Database db = DatabaseFactory.CreateDatabase(“Dummy Connection String1”);
db.ExecuteNonQuery(commandType.Text, “Delete Orders”);
I’m now writing documentation for this sample component, which will be published at end of June. I’m going to update the codes as well until that time. But, if you have any opinions, or feedbacks for this component, please let me know. I’d like to keep updating this component even after it is published.