RoleManagerSection.CookieName Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the cookie that is used to cache role names.
public:
property System::String ^ CookieName { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("cookieName", DefaultValue=".ASPXROLES")]
[System.Configuration.StringValidator(MinLength=1)]
public string CookieName { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("cookieName", DefaultValue=".ASPXROLES")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.CookieName : string with get, set
Public Property CookieName As String
The name of the cookie used to cache role names. The default is ".ASPXROLES".
- Attributes
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.
// Display CookieName property.
Console.WriteLine("CookieName: {0}", configSection.CookieName);
' Display CookieName property.
Console.WriteLine("CookieName: {0}", configSection.CookieName)
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.
Proizvod | Verzije |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Povratne informacije o proizvodu .NET
.NET je projekt otvorenog koda. Odaberite vezu za slanje povratnih informacija: