This documentation is archived and is not being maintained.
Roles Members
Visual Studio 2008
Manages user membership in roles for authorization checking in an ASP.NET application. This class cannot be inherited.
The Roles type exposes the following members.
| Name | Description | |
|---|---|---|
|
AddUsersToRole | Adds the specified users to the specified role. |
|
AddUsersToRoles | Adds the specified users to the specified roles. |
|
AddUserToRole | Adds the specified user to the specified role. |
|
AddUserToRoles | Adds the specified user to the specified roles. |
|
CreateRole | Adds a new role to the data source. |
|
DeleteCookie | Deletes the cookie where role names are cached. |
|
DeleteRole | Overloaded. Removes a role from the data source. |
|
FindUsersInRole | Gets a list of users in a specified role where the user name contains the specified user name to match. |
|
GetAllRoles | Gets a list of all the roles for the application. |
|
GetRolesForUser | Overloaded. Gets a list of the roles that a user is in. |
|
GetUsersInRole | Gets a list of users in the specified role. |
|
IsUserInRole | Overloaded. Gets a value indicating whether a user is in the specified role. |
|
RemoveUserFromRole | Removes the specified user from the specified role. |
|
RemoveUserFromRoles | Removes the specified user from the specified roles. |
|
RemoveUsersFromRole | Removes the specified users from the specified role. |
|
RemoveUsersFromRoles | Removes the specified user names from the specified roles. |
|
RoleExists | Gets a value indicating whether the specified role name already exists in the role data source. |
| Name | Description | |
|---|---|---|
|
ApplicationName | Gets or sets the name of the application to store and retrieve role information for. |
|
CacheRolesInCookie | Gets a value indicating whether the current user's roles are cached in a cookie. |
|
CookieName | Gets the name of the cookie where role names are cached. |
|
CookiePath | Gets the path for the cached role names cookie. |
|
CookieProtectionValue | Gets a value that indicates how role names cached in a cookie are protected. |
|
CookieRequireSSL | Gets a value indicating whether the role names cookie requires SSL in order to be returned to the server. |
|
CookieSlidingExpiration | Indicates whether the role names cookie expiration date and time will be reset periodically. |
|
CookieTimeout | Gets the number of minutes before the roles cookie expires. |
|
CreatePersistentCookie | Gets a value indicating whether the role-names cookie is session-based or persistent. |
|
Domain | Gets the value of the domain of the role-names cookie. |
|
Enabled | Gets or sets a value indicating whether role management is enabled for the current Web application. |
|
MaxCachedResults | Gets the maximum number of role names to be cached for a user. |
|
Provider | Gets the default role provider for the application. |
|
Providers | Gets a collection of the role providers for the ASP.NET application. |
Show: