AppSettingsSection Class [IIS 7 and higher]

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.

NoteNote:
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

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

ConfigurationSection Class [IIS 7 and higher]

KeyValueElement Class [IIS 7 and higher]

Other Resources

add Element for appSettings (General Settings Schema)