FormsAuthenticationConfiguration.LoginUrl Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
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
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.