One part of an ISL solution resulted in the implementing Enterprise Library 5.0, using Unity, Logging and Configuration features for a BizTalk pipeline component. The pipeline was built and tested with a BizTalk receive and send port and worked fine. The configuration was initialized in the BTSNTSvc.exe.config file and redirected to a separate xml configuration file. This pipeline component was then deployed out to a different BizTalk development server and the pipeline implemented in and ESB itinerary solution. The result was a series of exceptions as shown below.
The ISL Instrumentation Component Experienced an Unexpected Exception. Please check the Unity configuration source to determine why the tracing objects were not available.
Value cannot be null.
Parameter name: section
This made no sense as we had entered the configuration and the ‘section’ mentioned in the exception message was correctly entered into the biztalk configuration file. It took a while to identify the difference between the two development environments that was causing the problem. The itinerary was initialized by a call to a WCF service. This resulted in the process running in IIS and picking up the configuration from the services web config file. Once the configuration was migrated problem solved. Ultimately we decided to implement the configuration at the machine config level to make sure that all configuration files were covered.
NOTE: we were implementing a refactored and GAC’ed version of the Enterprise Library, so there is no risk that the machine config settings will impact other users of Enterprise Libraries.