RoleManagerSection.CookieProtection Property
Gets or sets the type of security that is used to protect the cookie that caches role names.
Assembly: System.Web (in System.Web.dll)
[<ConfigurationPropertyAttribute("cookieProtection", DefaultValue = CookieProtection.All)>] member CookieProtection : CookieProtection with get, set
Property Value
Type: System.Web.Security.CookieProtectionThe type of security protection used within the cookie where role names are cached. The default is All.
The CookieProtection property describes how information in a cookie is securely stored. You can specify the security type of the cookie where roles are cached for your application by setting the cookieProtection attribute in the Web.config file for your ASP.NET application. The cookieProtection attribute takes a CookieProtection enumeration value of All, Encryption, None, or Validation. The default is All. Be sure to use the default value for the CookieProtection property if you want both data validation and encryption to help protect the cookie. To improve the protection of your cookie, you can also set the CookieRequireSSL property to true.
The following code example demonstrates how to use the CookieProtection property. This code example is part of a larger example provided for the RoleManagerSection class.
Available since 2.0