共用方式為


AnonymousIdentificationSection.CookiePath 屬性

定義

取得或設定 cookie 儲存路徑。

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

屬性值

HTTP Cookie 用於使用者匿名身份的路徑。 預設值為斜杠(/),代表網頁應用程式的根節點。

屬性

範例

以下程式碼範例說明如何存取該 CookiePath 物業。

// 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)

備註

CookiePath 屬性表示認證 Cookie 所在位置,並與認證 Cookie 一同傳送。

適用於