FormsAuthentication.Authenticate(String, String) Método

Definição

Cuidado

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

Valida um nome de usuário e uma senha em relação às credenciais armazenadas no arquivo de configuração de um aplicativo.

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

Parâmetros

name
String

O nome do usuário.

password
String

A senha do usuário.

Retornos

true se o nome de usuário e a senha forem válidos; caso contrário, false.

Atributos

Comentários

Esse método é obsoleto. A alternativa recomendada é usar as APIs de Associação, como Membership.ValidateUser(String, String). Para obter mais informações, consulte Gerenciamento de usuários usando associação.

Aplica-se a