Entering Configuration Source Information

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.

These procedures explain how to configure configuration sources. Properties associated with the nodes appear in the right pane. Applications use configuration sources for information about how the application blocks are configured. By default, applications use an instance of the SystemConfigurationSource class. This means that the application retrieves configuration information from the application configuration file. You can use the Enterprise Library Configuration Console to instruct the application to use a configuration file other than the default or to use a different configuration source.

Using the Application Configuration File

By default, the Enterprise Library configuration tools place configuration information in the application configuration file (which is also the default configuration location for applications).

To use an application configuration file

  1. Start the Enterprise Library Configuration Console. To use the Configuration Console, click Start, point to AllPrograms, point to Microsoftpatterns&practices, point to Enterprise Library 3.1 – May 2007, and then click Enterprise LibraryConfiguration.
  2. Click New Application or Open Existing Application.
  3. Right-click Application Configuration, point to New, and then click Configuration Sources.
  4. The console adds the default SystemConfigurationSource node. If you want to modify its properties, click this node.
  5. (Optional) Type a new name for the System Configuration Source node. The default name is SystemConfigurationSource.

Using an Alternate Configuration Source

You can use configuration sources other than the application configuration file. The following procedure shows how to do this.

To use alternative configuration sources

  1. If you want to use a configuration source other than System Configuration Source, right-click ConfigurationSources, point to New, and then click FileConfigurationSource.
  2. Set the File property. Type the name of the file or click the ellipsis button (…), and then click the file you want to use.
  3. (Optional) Set the Name property. Type a new name for the FileConfigurationSource node. The default name is FileConfigurationSource.

Setting a Default Configuration Source

You can also select the default configuration source for an application. The following procedure describes how to do this.

To set the default configuration source

  1. Click the Configuration Sources node.
  2. Change the SelectedSource property. Either type the name of another configuration source or click one in the drop-down list.
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.