Freigeben über


FormsAuthentication.FormsCookiePath-Eigenschaft

Ruft den Pfad für das Formularauthentifizierungscookie ab.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public Shared ReadOnly Property FormsCookiePath As String
'Usage
Dim value As String

value = FormsAuthentication.FormsCookiePath
public static string FormsCookiePath { get; }
public:
static property String^ FormsCookiePath {
    String^ get ();
}
/** @property */
public static String get_FormsCookiePath ()
public static function get FormsCookiePath () : String

Eigenschaftenwert

Der Pfad des Cookies, in dem die Informationen zum Formularauthentifizierungsticket gespeichert sind. Der Standardwert ist "/".

Hinweise

Der FormsCookiePath-Eigenschaftenwert für eine ASP.NET-Anwendung ist mit dem path-Attribut des forms-Konfigurationselements in der Konfigurationsdatei festgelegt. Der FormsCookiePath gibt den Path für das Cookie an, in dem die FormsAuthenticationTicket-Informationen gespeichert sind.

Beispiel

Im folgenden Codebeispiel wird der FormsCookiePath-Eigenschaftenwert mithilfe des path-Attributs in der Datei Web.config festgelegt.

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

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

FormsAuthentication-Klasse
FormsAuthentication-Member
System.Web.Security-Namespace

Weitere Ressourcen

Sicherheit für ASP.NET-Webanwendungen