Freigeben über


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

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

Attribute

Beispiele

Im folgenden Codebeispiel wird gezeigt, wie auf zugegriffen wird LoginUrl. Lesen Sie das Codebeispiel im FormsAuthenticationConfiguration Klassenthema, um zu erfahren, wie Sie den Abschnitt abrufen.

// 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 Authentifizierungscooky vorhanden ist.

Gilt für:

Weitere Informationen