AuthorizationRuleCollection Class
.NET Framework 2.0
Represents a collection of AuthorizationRule objects. This class cannot be inherited.
Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example shows how to obtain the AuthorizationRuleCollection object from the configuration file of an existing Web application. You use this object to access its members as shown in the following topics. The configuration file will contain a setup similar to the following.
<authorization> <allow users="userName" roles="admin" verbs="post" /> <deny users="*" verbs="post"/> </authorization>
// Get the Web application configuration. System.Configuration.Configuration configuration = WebConfigurationManager.OpenWebConfiguration( "/aspnetTest");
// Get the section. AuthorizationSection authorizationSection = (AuthorizationSection)configuration.GetSection( "system.web/authorization");
System.Object
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.AuthorizationRuleCollection
System.Configuration.ConfigurationElement
System.Configuration.ConfigurationElementCollection
System.Web.Configuration.AuthorizationRuleCollection
Community Additions
ADD
Show: