Edit

Share via


RoleManagerSection.CookiePath Property

Definition

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

public:
 property System::String ^ CookiePath { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string CookiePath { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.CookiePath : string with get, set
Public Property CookiePath As String

Property Value

The path of the cookie used to store role names. The default is "/".

Attributes

Examples

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

// Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath);
' Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath)

Remarks

You can specify the path of the cookie where role names are cached for your application by setting the cookiePath attribute in the Web.config file for your ASP.NET application. The CookiePath property returns the value of the cookiePath attribute from the Web.config file. The path is case sensitive.

Applies to