FormsAuthenticationConfiguration.LoginUrl Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit l’URL de redirection de la requête.
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
Valeur de propriété
L’URL vers laquelle la requête est redirigée lorsque l’utilisateur n’est pas authentifié. La valeur par défaut est login.aspx.
- Attributs
Exemples
L’exemple de code suivant montre comment accéder au LoginUrl. Reportez-vous à l’exemple de code dans la FormsAuthenticationConfiguration rubrique de classe pour savoir comment obtenir la section.
// 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"
Remarques
La LoginUrl propriété spécifie l’URL de redirection de la demande lorsque l’utilisateur n’est pas authentifié ou lorsqu’aucun cookie d’authentification valide n’existe.