System.Web.Configuration Namespace
.NET Framework version 2.0
Specifies the type of authorization to apply when accessing a resource.
Member |
Description |
Allow |
The authorization type allows access to the resource. |
Deny |
The authorization type denies access to the resource. |
Use the Action property to programmatically configure the authorization action to be used by a Web application.
The following code example shows how use the Action property. This code example is part of a larger example provided for the AuthorizationRule class.
// Create an authorization rule object.
AuthorizationRuleAction action = AuthorizationRuleAction.Deny;
AuthorizationRule authorizationRule = new AuthorizationRule ( action );
' Create an authorization rule object.
Dim action As AuthorizationRuleAction = AuthorizationRuleAction.Deny
Dim authorizationRule = New AuthorizationRule ( action ) |
|
C# |
VB |
<authorization> Section AuthorizationSection Class ASP.NET Authorization