Share via


FormsAuthenticationConfiguration.LoginUrl Eigenschaft

Definition

Ruft die Umleitungs-URL für die Anforderung ab oder legt diese fest.

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

String

Die URL, an die die Anforderung umgeleitet wird, wenn der Benutzer nicht authentifiziert wurde. 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 wird oder wenn kein gültiger Authentifizierungscookies vorhanden ist.

Gilt für

Siehe auch