How to log in and register via web api using membership. Using
Membership.ValidateUser(login, password) or
WebSecurity.Login(login, password) for registration
WebSecurity.CreateUserAndAccount(login, password) sometimes gives the following type error
{"$id":"1","Message":"An error has occurred."}. But sometimes it works great. Or how can I compare passwords from the database and the password entered by the user?