Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

AuthorizationRule Class [IIS 7 and higher]

IIS 7.0

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

class AuthorizationRule : CollectionElement

This class contains no methods.

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.

This class contains no subclasses.

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.

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.