Freigeben über


FormsAuthentication.FormsCookiePath Eigenschaft

Definition

Ruft den Pfad für das Formularauthentifizierungscookies ab.

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

Eigenschaftswert

Der Pfad des Cookies, in dem die Formularauthentifizierungsticketinformationen gespeichert werden. Der Standardwert ist "/".

Beispiele

Im folgenden Codebeispiel wird der Eigenschaftswert mithilfe des FormsCookiePathpath Attributs in der datei Web.config festgelegt.

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

Hinweise

Der FormsCookiePath Eigenschaftswert wird in der Konfigurationsdatei für eine ASP.NET Anwendung mithilfe path des Attributs des Formularkonfigurationselements festgelegt. Dies FormsCookiePath gibt den Path Für den Cookie an, der die FormsAuthenticationTicket Informationen speichert.

Gilt für:

Weitere Informationen