Freigeben über


FormsAuthenticationConfiguration.LoginUrl Eigenschaft

Definition

Dient zum Abrufen oder Festlegen der Umleitungs-URL für die Anforderung.

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

Eigenschaftswert

Die URL, an die die Anforderung umgeleitet wird, wenn der Benutzer nicht authentifiziert ist. Der Standardwert ist login.aspx.

Attribute

Beispiele

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

// Get the current LoginUrl.
string currentLoginUrl = formsAuthentication.LoginUrl;

// Set the LoginUrl.
formsAuthentication.LoginUrl = "newLoginUrl";
' Get the current LoginUrl.
Dim currentLoginUrl As String =
formsAuthentication.LoginUrl

' Set the LoginUrl. 
formsAuthentication.LoginUrl = "newLoginUrl"

Hinweise

Die LoginUrl Eigenschaft gibt die Umleitungs-URL für die Anforderung an, wenn der Benutzer nicht authentifiziert ist oder kein gültiges Authentifizierungscookies vorhanden ist.

Gilt für:

Weitere Informationen