共用方式為


Configuring Enterprise Library

Configuration information for the Enterprise Library application blocks is stored in XML format. Typically, the information exists in an XML file. By default, the XML file that contains the information is the application configuration file.

You can manually edit the XML data, but the Enterprise Library provides two configuration tools that greatly simplify this task. These tools are the stand-alone configuration console and the configuration editor that is integrated with Visual Studio®. If you choose to manually edit the XML, refer to the appropriate application block documentation for schema details.

Note

When creating a configuration file and adding application blocks, Using the Configuration Tools provides a less error prone experience and is the recommended process. Editing the XML in Visual Studio does not enforce the configuration file hierarchy at all levels and can result in invalid XML.

The configuration files are not encrypted, they are in clear text, by default. A configuration file may contain sensitive information about connection strings, user IDs, passwords, database servers, and catalogs. You should protect this information against unauthorized read/write operations by using encryption techniques. To provide security they must be encrypted or protected using access control lists (ACLs). It is recommended that the configuration store be in the same trust boundary and that decrypting the configuration is done in the same trust boundary after the configuration is read. For information about how to encrypt configuration files, see Encrypting Configuration Data.

This section includes the following topics: