AnonymousIdentificationSection.CookiePath 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 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 一同傳送。