RoleManagerSection.CookiePath Property

 

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

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

<ConfigurationPropertyAttribute("cookiePath", DefaultValue := "/")>
<TypeConverterAttribute(GetType(WhiteSpaceTrimStringConverter))>
<StringValidatorAttribute(MinLength := 1)>
Public Property CookiePath As String

Property Value

Type: System.String

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

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.

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)

.NET Framework
Available since 2.0
Return to top
Show: