AppSettingsSection Class1

Contains custom application settings, such as file paths, XML Web service URLs, or information that is stored in the .ini file for an application.

Syntax

class AppSettingsSection : ConfigurationSectionWithCollection  

Methods

The following table lists the methods exposed by the AppSettingsSection class.

Name Description
Add (Inherited from ConfigurationSectionWithCollection.)
Clear (Inherited from ConfigurationSectionWithCollection.)
Get (Inherited from ConfigurationSectionWithCollection.)
GetAllowDefinition (Inherited from ConfigurationSection.)
GetAllowLocation (Inherited from ConfigurationSection.)
Remove (Inherited from ConfigurationSectionWithCollection.)
RevertToParent (Inherited from ConfigurationSection.)
SetAllowDefinition (Inherited from ConfigurationSection.)
SetAllowLocation (Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the AppSettingsSection class.

Name Description
File A read/write string value that specifies a relative path of an external custom application configuration file. The specified path is relative to the local configuration file. If the specified file cannot be found, IIS ignores the value specified.

The external file uses the same key/value pair format as the AppSettings property, but the <appSettings> element, not the <``configuration``> element, must be the root node. Note: Changes to the Web.config file cause the application to restart; however, you can avoid this by having users modify the AppSettingsSection values in a separate file.
Location (Inherited from ConfigurationSection.) A key property.
Path (Inherited from ConfigurationSection.) A key property.
SectionInformation (Inherited from ConfigurationSection.)
AppSettings An array of KeyValueElement values that contain key/value pairs that specify application setting names and corresponding values.

Subclasses

This class contains no subclasses.

Inheritance Hierarchy

ConfigurationSection

ConfigurationSectionWithCollection

AppSettingsSection

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

ConfigurationSection Class
KeyValueElement Class
add Element for appSettings (General Settings Schema)