I'm hosting a simple ASP.NET MVC5 Web Application on Azure and I'm using SimpleMembershipProvider to hand authentication.
Everything works fine on my local machine, but when I try to log in on the Azure application, WebSecurity.Login always returns false. No exceptions happen, and all of the UserProfiles appear in the database. I tried debugging my login method, but WebSecurity.Login is a bit of a black box, so I'm not sure why it's returning false.
public ActionResult Login(Login loginData, string ReturnUrl)
{
if (ModelState.IsValid)
{
if (WebSecurity.Login(loginData.Username, loginData.Password))
{
if (ReturnUrl != null)
{
return Redirect(ReturnUrl);
}
return RedirectToAction("Index", "Home");
}
}
ModelState.AddModelError("", "Sorry the username or password is incorrect");
return View(loginData);
}