FormsAuthentication.FormsCookiePath 屬性

定義

取得表單驗證 Cookie 的路徑。

public:
 static property System::String ^ FormsCookiePath { System::String ^ get(); };
public static string FormsCookiePath { get; }
member this.FormsCookiePath : string
Public Shared ReadOnly Property FormsCookiePath As String

屬性值

String

存放表單驗證票證資訊的 Cookie 路徑。 預設值為 "/"。

範例

下列程式碼範例會使用 path Web.config 檔案中的 屬性來設定 FormsCookiePath 屬性值。

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    cookieless="UseCookies"
    path="/MyApplication" />
</authentication>

備註

FormsCookiePath屬性值是使用 path 表單組態專案的 屬性,在 ASP.NET 應用程式的組態檔中設定。 FormsCookiePathPath 指定儲存 FormsAuthenticationTicket 資訊的 Cookie 的 。

適用於

另請參閱