JavaScript Editor jscript editor     Web designer 

Main Page

Role management consists of a set of classes and interfaces that establish roles for the current user and manage role information. The following table shows the role management classes and functions that they provide.

Class/Interface Functions


Provides general management facilities for roles.

Creates roles.

Adds users to roles.

Determines whether specific user is in role.

Gets roles for users.

Removes users from role.

Manages the cookie containing role information.


The functions for creating roles and assigning users to them do not work if you are using the WindowsTokenRoleProvider. In that case, you manage role information using Windows.


Defines functionality for data providers that can be used by role-management services.

Defines the functionality a provider must implement to be used by the Roles class.


Adds role information to the current User property.

Automatically creates a RolePrincipal and attaches it to the current context.

Raises a GetRoles event that allows you to customize the process of adding roles to the current user context.


Defines arguments passed to the RoleManager_GetRoles event.

Provides access to the current user context during the GetRoles event.


Acts as a IPrincipal object and caches the roles for a user.

Stores role information for the current user.

Manages retrieval of role information from either the cookie or the database (or both, if necessary).

See Also

JavaScript Editor jscript editor     Web designer