The Enterprise Library Configuration Console

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

Application blocks are designed to be used in a variety of enterprise application development scenarios. This design approach allows 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 by using the Enterprise Library Configuration Console. You can define configuration settings for an application block's central functionality and for each provider type.

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 to encrypt the database connection strings when deploying the application block.
  • 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 and as your expertise grows, you can change the application block configuration without modifying its code, recompiling it, or redeploying it.

The Enterprise Library includes a graphical configuration tool named the Enterprise Library Configuration Console. With the configuration console, you can change and validate application block settings without manually editing the XML configuration files where they are stored. For example, two of the Caching Application Block settings are the type of backing store to use and how many items the cache can hold. The configuration console displays these settings and supplies default values that you can change. Because the configuration settings are presented in a graphical tool, along with default values and information about what each setting means, you can easily configure the application blocks.

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 backing stores to the Caching 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.

Figure 1 illustrates the configuration console user interface.

Ff647182.EL-DEV-01-Console(en-us,PandP.10).gif

Figure 1
Configuration console user interface

Building and Running the Configuration Console

When you install the Enterprise Library, the configuration console source code is included with the application block source code. You must compile the configuration console. To compile the configuration console, execute the BuildLibrary batch file.

The configuration console requires the application block assemblies to be located either in the same directory as the configuration console executable or in the global assembly cache. It requires both the run-time assemblies and the design-time assemblies. Each application packages the design-time support in assemblies that are separate from the run-time implementation. These assemblies are not required for running an application that uses the application blocks. However, the configuration console uses them when you change an application block's configuration. The required assemblies have the suffix .configuration.design.dll. Use the CopyAssemblies batch file to copy the required assemblies into the bin directory.

When you run the CopyAssemblies batch file, it copies all the required assemblies for both run time and design time to the bin directory. For more details about the relationship between the run-time configuration component and the design-time configuration component, see Design-time Configuration.

Ff647182.note(en-us,PandP.10).gif Note:
When the configuration console opens an application configuration file, it attempts to load all the provider assemblies referenced in that file. If your application configuration includes a custom provider, you must make the custom provider assembly available to the configuration console. To do this, you can copy the assembly to the same directory as the configuration console executable or install it into the global assembly cache. You can also use the DEVPATH environment variable to allow the configuration console to locate the custom provider assembly.

To use the configuration console, click Start on the taskbar, point to All Programs, point to Microsoft patterns & practices, point to Enterprise Library – January 2006, and then click Enterprise Library Configuration.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Show: