Bagikan melalui


FormsAuthentication.FormsCookiePath Properti

Definisi

Mendapatkan jalur untuk cookie autentikasi formulir.

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

Nilai Properti

Jalur cookie tempat informasi tiket autentikasi formulir disimpan. Defaultnya adalah "/".

Contoh

Contoh kode berikut mengatur FormsCookiePath nilai properti dengan menggunakan path atribut dalam file Web.config.

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

Keterangan

Nilai FormsCookiePath properti diatur dalam file konfigurasi untuk aplikasi ASP.NET menggunakan path atribut elemen konfigurasi formulir . FormsCookiePath menentukan Path untuk cookie yang menyimpan FormsAuthenticationTicket informasi.

Berlaku untuk

Lihat juga