Using Enterprise Library 2.0 in the BizTalk Server 2006 applications with SSO
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.
Comments
Anonymous
June 06, 2006
This is a very good article. However, I could not figure out how to use your custom dummy application block. The code in the zip file for dummy application block is not compiling. Could you please repost your code that is working? ThanksAnonymous
June 06, 2006
The comment has been removedAnonymous
June 08, 2006
Thank you for your response. I have figured out how to write a custome application block. Anyway, Your SSO configuration source really rocks.Anonymous
June 13, 2006
I've gotten the configuration from SSO to work in your example and also in a windows forms test project. How do you do this in BizTalk without modifying the BTSNTSVC.exe.config file?Anonymous
November 02, 2006
Since BizTalk 2004 Server platform was introduced a few years ago, Enterprise SSO Services were extendedAnonymous
November 02, 2006
Since BizTalk 2004 Server platform was introduced a few years ago, Enterprise SSO Services were extended