Condividi tramite


Role Management Classes

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

Class/Interface

Functions

Roles

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.

Note

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.

RoleProvider

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.

RoleManagerModule

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.

RoleManagerEventArgs

Defines arguments passed to the GetRoles event.

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

RolePrincipal

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).

RoleService

Provides access to roles as a Windows Communication Framework service.

Checks whether a user belongs to a specified role.

Retrieves all roles for a user.

Note

General role-management features are not available through the RoleService class.

See Also

Concepts

Understanding Role Management

Role Management Providers

Windows Communication Foundation Role Service Overview

Other Resources

ASP.NET Security