It is often ideal to specify the configuration settings for Enterprise Library separately from the App.config or Web.config in Windows Forms and ASP.NET Web Applications.
One alternative is to put all the configuration settings for all blocks in a separate file:
Enterprise Library External File Configuration Source for Application Block Settings
Another option is to specify a separate configuration file for each application block. The following App.config shows how to specify separate configuration files for each application block:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="loggingConfiguration" type="..." />
<section name="validation" type="..." />
<section name="exceptionHandling" type="..." />
</configSections>
<!-- Enterprise Library 3.0 Configuration Files -->
<loggingConfiguration configSource="logging.config" />
<validation configSource="validation.config" />
<exceptionHandling configSource="exceptionhandling.config" />
</configuration>
The configuration for each application block would be added to the specific file:
<loggingConfiguration name="Logging Application Block" ... >
<!-- Logging Information -->
</loggingConfiguration>
This option does have a major drawback, however. The Enterprise Library Configuration Editor will read the information appropriately, but will not save configuration changes to each file. Instead, it will save the configuration settings to the main App.config or Web.config and wipe out the pointers to the separate configuration files.