Configuration 类

定义

表示特定计算机、应用程序或资源的配置文件。

public ref class Configuration sealed
public sealed class Configuration
type Configuration = class
Public NotInheritable Class Configuration
继承
Configuration

注解

此类不能被继承。 配置存储在Administration.config、ApplicationHost.config和Web.Config文件中。 此类使你能够自定义配置文件。

属性

RootSectionGroup

获取此 Configuration 对象的根配置节组。

方法

GetEffectiveSectionGroup()

获取配置文件的有效节组。

GetLocationPaths()

获取配置文件中指定的所有位置路径的数组。

GetMetadata(String)

从 IIS 7 配置系统获取元数据。

GetSection(String)

使用指定的节路径返回配置节。

GetSection(String, String)

使用指定的节和位置路径返回配置节。

GetSection(String, Type)

使用指定的节路径返回强类型配置节。

GetSection(String, Type, String)

使用指定的节和位置路径返回强类型配置节。

RemoveLocationPath(String)

从当前配置文件中删除位置路径。

RenameLocationPath(String, String)

重命名配置文件中的位置。

SetMetadata(String, Object)

设置 IIS 7 配置系统中的元数据。

事件

CacheInvalidated

在配置缓存失效时发生。

适用于