Just finished my first mvc4 application. Everything works fine until I get it divorced, and I get: 500 - internal server error. There is a problem with the resource you are looking for and cannot be displayed. every time I try to call / Account / Register or / Account / Login controller:
Ive snooped in firefox console and fiddle. I did not find anything useful there, but again I do not know what I should even look for.
Some other messages say to check the server log, but this is a problem in itself because when I try to load, move, view or delete the last log file, I get errors such as “file transfer failure”, “access file 550 can not "," 500 failed to delete file ".
I do not know what else to do, some advice please. There is code to call the input controller. I will not publish the version as they seem to be 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 } } });
Input 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." }); } }
It all looks pretty standard, so I really don’t know what it can be and how to even diagnose it.
source share