RoleManagerSection.CookieName Property

 

Gets or sets the name of the cookie that is used to cache role names.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[<ConfigurationPropertyAttribute("cookieName", DefaultValue = ".ASPXROLES")>]
[<TypeConverterAttribute(typeof(WhiteSpaceTrimStringConverter))>]
[<StringValidatorAttribute(MinLength = 1)>]
member CookieName : string with get, set

Property Value

Type: System.String

The name of the cookie used to cache role names. The default is ".ASPXROLES".

The CookieName property returns the name of the cookie that is used to cache role names. You can specify the name of the cookie where roles are cached for your application by setting the cookieName attribute in the Web.config file for your ASP.NET application. This is useful when you want to uniquely identify a cookie for your application or when a cookie is shared across multiple applications.

The following code example demonstrates how to use the CookieName property. This code example is part of a larger example provided for the RoleManagerSection class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: