FormsAuthentication.Authenticate(String, String) Método

Definição

Atenção

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 utilizador e uma palavra-passe contra credenciais armazenadas no ficheiro de configuração de uma aplicação.

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 de usuário.

password
String

A palavra-passe do utilizador.

Devoluções

true se o nome de utilizador e a palavra-passe forem válidos; caso contrário, false.

Atributos

Observações

Este método está obsoleto. A alternativa recomendada é usar as APIs de Membros, como Membership.ValidateUser(String, String). Para mais informações, consulte Gerir Utilizadores através do Uso de Membros.

Aplica-se a