System.Web.Configuration Namespace
.NET Framework version 2.0
Configures the identity of a Web application. This class cannot be inherited.
The IdentitySection provides a way to programmatically access and modify the identity section of a configuration file.
NOTE: The IdentitySection can read and write information from and to the related section of the configuration file according to the section property AllowDefinition whose value is Everywhere.
The following code example shows how to obtain the IdentitySection object from the configuration file of an existing Web application.
// Get the Web application configuration.
System.Configuration.Configuration configuration =
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration ( "/aspnetTest" );
// Get the section.
System.Web.Configuration.IdentitySection identitySection =
( System.Web.Configuration.IdentitySection)configuration.GetSection ( "system.web/identity" );
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration ( "/aspnetTest" )
' Get the section.
Dim identitySection As System.Web.Configuration.IdentitySection = _
CType ( configuration.GetSection ( "system.web/identity" ), System.Web.Configuration.IdentitySection ) |
|
C# |
VB |
ASP.NET Configuration <identity> Section