Export (0) Print
Expand All

Configuration Section Settings

.NET Framework 1.1

A configuration file can also contain information that the application reads at run time. Developers use configuration sections to specify this information in configuration files. The .NET Framework provides several predefined configuration sections and developers can also create custom configuration sections.

Configuration sections have two parts: a configuration section declaration and the configuration settings. You can put configuration section declarations and configuration settings in the machine configuration file or in the application configuration file.

At run time, section handlers, which are classes that implement the IConfigurationSectionHandler interface, read settings in the machine configuration file first, followed by the application configuration file. Depending on the section handler, either the settings in the application file override the settings in the machine file or the settings from both files are merged.

Note   ASP.NET applications have configuration files at the application and directory levels. You can put configuration section settings in ASP.NET configuration files (Web.config) at either level. For more information, see ASP.NET Configuration.

This section describes how to declare configuration sections and access configuration settings.

In This Section

Accessing the appSettings Section
Describes how to use the predefined appSettings section in a configuration file and access it from an application.
Declaring and Accessing Custom Configuration Sections
Describes how to declare and access custom sections.
Declaring and Accessing Section Groups
Describes how to group configuration sections and access them from an application.

Related Sections

Configuration Sections Schema
Describes the schema used to declare configuration sections
Show:
© 2014 Microsoft