AuthorizationRule Class [IIS 7 and higher]

Represents a rule in the authorization section of a configuration file.

Syntax

class AuthorizationRule : CollectionElement

Methods

This class contains no methods.

Properties

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

Name

Description

AccessType

A read/write sint32 enumeration that specifies whether access to a URL resource is granted based on the combination of values specified by the Roles, Users, and Verbs properties. The possible values are listed later in the Remarks section.

NoteNote:
At run time, the authorization module iterates through AuthorizationRule elements until it finds the first rule that fits a particular user. It then grants or denies access to a URL resource depending on the value of the AccessType property.

Roles

A required unique read/write string value that contains a comma-delimited list of roles for which access to a URL resource is granted or denied. A key property.

NoteNote:
There must be at least one value in either the Users property or the Roles property, or both.

Users

A required unique read/write string value that contains a comma-delimited list of users for whom access to a URL resource is granted or denied. The default is "*". A key property.

NoteNote:
There must be at least one value in either the Users property or the Roles property, or both.

Verbs

A required unique read/write string value that contains a comma-delimited list of HTTP transmission methods for which access to a URL resource is granted or denied. A key property.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the Authorization property of the AuthorizationSection class.

The following table lists the possible values for the AccessType property.

Value

Keyword

Description

0

Allow

Grants access to a URL resource for the combination of values you specify in the Roles, Users, and Verbs properties.

1

Deny

Denies access to a URL resource for the combination of values you specify in the Roles, Users, and Verbs properties.

Inheritance Hierarchy

CollectionElement

   AuthorizationRule

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

CollectionElement Class [IIS 7 and higher]

AuthorizationRule