ConfigurationSection Class1

Serves as a base class for classes that represent configuration sections.

Syntax

class ConfigurationSection  

Methods

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

Name Description
GetAllowDefinition Retrieves the allowDefinition attribute for a configuration section.
GetAllowLocation Retrieves the allowLocation attribute for a configuration section.
RevertToParent Reverts configuration values in a section to those of its parent section.
SetAllowDefinition Sets the allowDefinition attribute for a configuration section.
SetAllowLocation Sets the allowLocation attribute for a configuration section.

Properties

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

Name Description
Location A read-only string value that contains the path to a target object relative to the current object. For example, in the object path "MACHINE/WEBROOT/APPHOST/MYSITE/APP/", the Location property would contain "MYSITE/APP/". A key property.
Path A read-only string value that contains the path to the current object. For example, in the object path "MACHINE/WEBROOT/APPHOST/MYSITE/APP/", the Path property would contain "MACHINE/WEBROOT/APPHOST/". A key property.
SectionInformation A SectionInformation object whose read/write properties provide metadata and control locking for a configuration section.

Subclasses

The following table lists the subclasses exposed by the ConfigurationSection class.

Name Description
AccessSection Specifies access permissions to content protected by Secure Sockets Layer (SSL).
AnonymousAuthenticationSection Configures Anonymous authentication.
AnonymousIdentificationSection Specifies how cookies are used in a Web application.
AspSection Exposes Active Server Pages (ASP) configuration settings for ASP applications.
BasicAuthenticationSection Configures Basic authentication.
CacheSection Defines cache settings for an ASP.NET Web application.
CgiSection Configures Common Gateway Interface (CGI) settings.
ClientCertificateMappingAuthenticationSection Enables or disables client certificate mapping authentication.
ConfigurationHistorySection Configures the configuration history settings of the ApplicationHost Helper Service.
ConfigurationRedirectionSection Configures the location of the ApplicationHost.config and Administration.config files.
ConfigurationSectionWithCollection Serves as a base class for configuration-section classes that contain collections.
DateTimeSerializationSection Handles configuration settings for XML serialization of System.DateTime instances.
DigestAuthenticationSection Configures Digest authentication.
DirectoryBrowseSection Configures directory browsing in IIS.
GlobalizationSection Configures the globalization settings for a Web application.
HostingEnvironmentSection Defines configuration settings that control the behavior of the application hosting environment.
HttpCookiesSection Configures properties for cookies used by a Web application.
HttpLoggingSection Configures the logging of HTTP requests.
HttpRuntimeSection Configures ASP.NET HTTP run-time settings that determine how a request is processed for a given ASP.NET application.
IdentitySection Specifies whether an ASP.NET application should run as the application pool identity (the default), the IIS-authenticated user identity, or a custom configured identity.
LogSection Configures the logging for a server or site.
MachineKeySection Defines the configuration settings that control the key generation and algorithms that are used in encryption, decryption, and media access control (MAC) operations in Forms authentication, view-state validation, and session-state application isolation.
OdbcLoggingSection Specifies configuration settings for logging IIS events to a database through an Open Database Connectivity (ODBC) connection.
OutputCacheSection Specifies output cache settings for an ASP.NET application.
ProcessModelSection Configures the ASP.NET process model settings on a Web server that is running IIS.
RequestCachingSection Contains configuration information for request caching.
ServerRuntimeSection Configures request limits for applications on a Web server.
ServerSideIncludeSection Configures server-side includes (SSI) directives.
SessionPageStateSection Configures page view-state settings for an ASP.NET application.
SettingsSection Contains settings that specify how the .NET Framework connects to the network.
SmtpMailSettingsSection Contains Simple Mail Transfer Protocol (SMTP) configuration settings.
SystemWebDeploymentSection Defines configuration settings that support the deployment of a Web application.
SystemWindowsFormsSection Stores application settings for Windows Forms applications.
TraceSection Configures the ASP.NET code-tracing service.
TransactionsDefaultSettingsSection Contains default settings for transactions.
TransactionsMachineSettingsSection Represents an XML section in a configuration file that contains settings that can be modified only at the computer level.
TrustSection Configures the level of code-access security that is applied to an application.
UrlCompressionSection Enables or disables dynamic or static compression.
ValidationSection Enables or disables validation checks on configuration files.
WebControlsSection Specifies the shared location of client script files.
WebLimitsSection Specifies limits on client traffic to a Web server.
XhtmlConformanceSection Specifies the XHTML rendering mode for ASP.NET applications.
XmlSerializerSection Handles the XML elements used to configure XML serialization.

Remarks

The association classes that derive from the ObjectConfigurationAssociation class use the ConfigurationSection class to link objects to configuration sections.

All classes that derive from ConfigurationSection inherit the Location, Path, and SectionInformation properties. Location and Path are key properties for all subclasses of ConfigurationSection.

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

WMI Provider
ConfigurationSectionWithCollection Class
ObjectConfigurationAssociation Class
SectionInformation Class