System and application configuration is
managed by XML files with a
extension. Configuration files exist
at both the machine and application level. There is a single
machine-level configuration file, located at
Application-configuration files are optional. When they exist, they
reside in the application’s root folder and are named
application-configuration files are always named
web.config. They can exist in the web
application’s root folder and in subfolders of the application.
Settings in subfolders’ configuration files apply only to pages
retrieved from the same folder and its child folders and override
settings from configuration files in higher-level folders.
Configuration files should be used for all application-configuration information; the Windows Registry should no longer be used for application settings.
Configuration File Format
are XML documents, where the root element is
. For example:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <!-- More stuff goes in here. --> </configuration>
To be as flexible as possible, .NET configuration files use a scheme
in which the application developer can decide on the names of the
subelements within the
element. This is done using the