Just finished up my first mvc4 app. Everything is working great until I deploy it and I get: 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. every time I try to call /Account/Register or /Account/Login controllers:
I've snooped around in firefox console and fiddler. I didn't find anything useful there, but then again I don't really know what I should even be looking for.
Some other posts say to check the server log but that's a problem in itself because when I try to download, move, view, or delete the latest log file I get errors like "file transfer failed", "550 cant access file", "500 failed to delete file".
I don't know what else to do, some please advice. Heres some code for call to Login controller. I won't post Register version since they seem related.
Ajax call:
$.ajax({
url: "/Account/Login",
type: "POST",
data: $('#loginForm').serialize(),
success: function (resultData) {
if (resultData.ok) {
...unrelated stuff...has call to resultData.message
}
}
});
Login controller:
[AllowAnonymous]
[HttpPost]
public ActionResult Login(LoginModel model)
{
if (ModelState.IsValid)
{
if (Membership.ValidateUser(model.UserName, model.Password))
{
FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
return Json(new { ok = true, message = "Login successful." });
}
else
{
return Json(new { ok = false, message = "The username or password you entered is invalid. Please try again." });
}
}
// If we got this far, something failed, redisplay form
return View(model);
}
It all seems pretty standard here so I really don't know what it could be or how to even diagnose