Freigeben über


FormsAuthenticationConfiguration.Path Eigenschaft

Definition

Dient zum Abrufen oder Festlegen des Cookiepfads.

public:
 property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("path", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string Path { get; set; }
[<System.Configuration.ConfigurationProperty("path", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Path : string with get, set
Public Property Path As String

Eigenschaftswert

Der Pfad des HTTP-Cookies, das für die Authentifizierung verwendet werden soll. Der Standardwert ist ein Schrägstrich (/), der den Stamm der Webanwendung darstellt.

Attribute

Beispiele

Das folgende Codebeispiel zeigt, wie Sie auf die Path Eigenschaft zugreifen. Weitere Informationen zum Abrufen des Abschnitts finden Sie im Codebeispiel im FormsAuthenticationConfiguration Klassenthema.

// Get the current Path.
string currentPath = formsAuthentication.Path;
// Set the Path property.
formsAuthentication.Path = "newPath";
' Get the current Path.
Dim currentPath As String = formsAuthentication.Path
' Set the Path property.
formsAuthentication.Path = "newPath"

Hinweise

Die Path Eigenschaft gibt an, wo sich das Authentifizierungscookies befindet und zusammen mit dem Authentifizierungscookies selbst übertragen wird.

Gilt für:

Weitere Informationen