RolePrincipal Class
Assembly: System.Web (in system.web.dll)
'Declaration <SerializableAttribute> _ Public NotInheritable Class RolePrincipal Implements IPrincipal, ISerializable 'Usage Dim instance As RolePrincipal
/** @attribute SerializableAttribute() */ public final class RolePrincipal implements IPrincipal, ISerializable
SerializableAttribute public final class RolePrincipal implements IPrincipal, ISerializable
Not applicable.
The RolePrincipal object implements the IPrincipal interface and represents the current security context for the HTTP request.
When role management is enabled (see Roles), the RoleManagerModule assigns a RolePrincipal object to the User property of the CurrentHttpContext.
The RolePrincipal class exposes the security identity for the current HTTP request and additionally performs checks for role membership. If CacheRolesInCookie is true, then the RolePrincipal object manages the cached list of roles and looks up role membership for the current user in the cached list first, then the role Provider. If CacheRolesInCookie is false, the RolePrincipal object always looks up role membership using the role provider.
The RolePrincipal object encrypts and decrypts role information cached in the cookie identified by the CookieName based on the CookieProtectionValue.
- System.Web.AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
Reference
RolePrincipal MembersSystem.Web.Security Namespace