System.Web.Configuration.RoleManagerSection.CacheRolesInCookie Property

Gets or sets a value indicating whether the current user's roles are cached in a cookie.

Syntax

[System.Configuration.ConfigurationProperty("cacheRolesInCookie", DefaultValue=false)]
public bool CacheRolesInCookie { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The RoleManagerSection.CacheRolesInCookie property returns a Boolean value indicating whether cookie storage for role names is enabled.

When the RoleManagerSection.CacheRolesInCookie property is set to true in the configuration file, role information for each user is stored in a cookie on the client. When role management checks to determine whether a user is in a particular role, the roles cookie is checked before calling the role provider to check the list of roles at the data source. The cookie is dynamically updated on the client to cache the most recently validated role names.

You can improve the reliability of the role names that are cached in a cookie by specifying a RoleManagerSection.CookieProtection property when you configure the roleManager section of the configuration file. The default RoleManagerSection.CookieProtection property is All, which encrypts role names in the cookie and validates that the cookie contents have not been altered.

Requirements

Namespace: System.Web.Configuration
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0