public ref class AuthorizationRuleCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.AuthorizationRule), AddItemName="allow,deny", CollectionType=System.Configuration.ConfigurationElementCollectionType.BasicMapAlternate)]
public sealed class AuthorizationRuleCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.AuthorizationRule), AddItemName="allow,deny", CollectionType=System.Configuration.ConfigurationElementCollectionType.BasicMapAlternate)>]
type AuthorizationRuleCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class AuthorizationRuleCollection
Inherits ConfigurationElementCollection
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
' Get the Web application configuration.
Dim configuration As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
// Get the section.
AuthorizationSection authorizationSection =
(AuthorizationSection)configuration.GetSection(
"system.web/authorization");
' Get the section.
Dim authorizationSection _
As AuthorizationSection = _
CType(configuration.GetSection( _
"system.web/authorization"), AuthorizationSection)
// Get the authorization rule collection.
AuthorizationRuleCollection authorizationRuleCollection =
authorizationSection.Rules;
' Get the authorization rule collection.
Dim authorizationRuleCollection _
As AuthorizationRuleCollection = _
authorizationSection.Rules