Επεξεργασία

Κοινή χρήση μέσω


AnonymousIdentificationSection.CookiePath Property

Definition

Gets or sets the path where the cookie is stored.

public:
 property System::String ^ CookiePath { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("cookiePath", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string CookiePath { get; set; }
[<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 HTTP cookie to use for the user's anonymous identification. The default value is a slash (/), which represents the Web application root.

Attributes

Examples

The following code example shows how to access the CookiePath property.

// Get CookiePath.
string cookiePath = 
    anonymousIdentificationSection.CookiePath;
Console.WriteLine("Cookie path: {0}", cookiePath);
' Get CookiePath.
Dim cookiePath As String = _
anonymousIdentificationSection.CookiePath
Console.WriteLine("Cookie path: {0}", cookiePath)

Remarks

The CookiePath property indicates where the authentication cookie resides and is transmitted along with the authentication cookie itself.

Applies to