I was studying the MembershipProvider class, and I thought that the Membership.ValidateUser() method should be used to log in the user.
MembershipProvider
Membership.ValidateUser()
However, I just found out that there is FormsAuthentication.Authenticate() .
FormsAuthentication.Authenticate()
What is the purpose of ValidateUser() inside Membership ?
ValidateUser()
Membership
In short, there are times when you can simply verify that the user is the one who, according to them, does not need to permanently save the cookie for authentication.
It only checks your data source (database) if the transmitted username and password exist in the database and match and return true Check MSDN . If they do not match, it returns false
public static bool ValidateUser(string username, string password)