FormsAuthentication.Authenticate(String, String) Méthode

Définition

Attention

The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.

Valide un nom d’utilisateur et un mot de passe par rapport aux informations d’identification stockées dans le fichier de configuration d’une application.

public:
 static bool Authenticate(System::String ^ name, System::String ^ password);
public static bool Authenticate(string name, string password);
[System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")]
public static bool Authenticate(string name, string password);
static member Authenticate : string * string -> bool
[<System.Obsolete("The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.")>]
static member Authenticate : string * string -> bool
Public Shared Function Authenticate (name As String, password As String) As Boolean

Paramètres

name
String

Nom d'utilisateur.

password
String

Mot de passe de l’utilisateur.

Retours

true si le nom d’utilisateur et le mot de passe sont valides ; sinon, false.

Attributs

Remarques

Cette méthode est obsolète. L’alternative recommandée consiste à utiliser les API d’appartenance, telles que Membership.ValidateUser(String, String). Pour plus d’informations, consultez Gestion des utilisateurs à l’aide de l’appartenance.

S’applique à