The Enterprise Library Configuration Tools

Microsoft Enterprise Library 5.0

DropDown image DropDownHover image Collapse image Expand image CollapseAll image ExpandAll image Copy image CopyHover image

Application blocks are designed to be used in a variety of enterprise application development scenarios. This design approach enables you to easily adapt an application block to meet the needs of your situation. You do this with configuration settings, which you can easily change using the configuration tools. You can define configuration settings for an application block's central functionality and for each provider type.

You can use Visual Studio to create and modify configuration files or you can use the stand-alone Enterprise Library configuration console. Collectively, the Visual Studio integrated configuration editor and the stand-alone configuration console are referred to as the configuration tools. Both of these configuration tools have identical functionality. With these tools, you can change and validate application block settings without manually editing the XML configuration files where they are stored. The configuration tools display these settings and supply default values that you can change.

Each application block defines points of extensibility, where developers can include their own implementations (typically, these are providers) with specific functionality. For example, you can add your own custom log entry formatters to the Logging Application Block. These custom providers can be interchanged with the providers that are supplied with the application block. The configuration console lets you select the custom backing store and writes this information to the appropriate XML configuration file. This means that the application will use the custom store without any code changes and without being recompiled.

The Visual Studio integrated configuration tool is named the configuration editor. The configuration editor has the same functionality as the stand-alone configuration console, but it uses the Visual Studio Properties grid to display an application block's properties and uses the errors list to display configuration errors.

The following describes some of the activities the configuration tools help you with:

  • You can use the configuration tools to create and modify standard .NET Framework <appSettings> sections. For more information, see Using the appSettings Section.
  • You can use the configuration tools to tailor an application block's configuration to a particular run-time environment. For more information, see Configuring a Deployment Environment.
  • You can use the configuration tools to encrypt and decrypt the data contained in configuration sections. For more information, see Encrypting Configuration Data.

Using configuration settings to adapt an application block to a particular situation has two advantages:

  • Different people can configure the characteristics of an application block at different times during the application life cycle. For example, a developer could configure a provider to access a particular database during application development, while a system administrator could decide during deployment to encrypt the database connection strings.
  • You can change the application block configuration incrementally for increasingly complex situations. For example, you could initially configure an application block to use the default settings and providers. As your understanding of the scenario deepens, you can change the application block configuration without modifying its code, recompiling it, or redeploying it.

For more information on using the Visual Studio configuration editor and the configuration console see Using the Configuration Tools.