FormsAuthentication.Authenticate(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser. For more information, see http://go.microsoft.com/fwlink/?LinkId=252463.
Validates a user name and password against credentials stored in the configuration file for an 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
Parameters
- name
- String
The user name.
- password
- String
The password for the user.
Returns
true
if the user name and password are valid; otherwise, false
.
- Attributes
Remarks
This method is obsolete. The recommended alternative is to use the Membership APIs, such as Membership.ValidateUser(String, String). For more information, see Managing Users by Using Membership.