KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm having trouble with Chrome on the iPad/iPhone with what I thought was a simple enough task and works on Chrome Desktop (Mac & PC) and Safari on iPad/iPhone. I have the following jquery on my page: $("#login-login-button").click(function () { var username = $("#Username").val(); var password = $("#Password").val(); $("#login-loading-icon").show(); $.post("/login", { username: username, password: password }, function (data, response) { if (response == "success") { if (data.IsValid) { window.location.href = "/profile"; } else { $("#login-error-message").html(data.ErrorMessage); $("#login-loading-icon").hide(); } } else { alert("An error occurred, please try again."); } }); }); And the Controller Action is code looks like this: [HttpPost] public JsonResult Index(string username, string password) { AjaxResponseModel ajaxResponseModel = new AjaxResponseModel(); User user = UserDAL.Select(username, Hash.MD5(password)); if (user != null) { if (!user.IsVerified.Value) { ajaxResponseModel.AddErrorMessage("Account not verified."); } else if (!user.IsActive.Value) { ajaxResponseModel.AddErrorMessage("Your account is not active."); } else { FormsAuthentication.SetAuthCookie(username, false); } } else { ajaxResponseModel.AddErrorMessage("Login details incorrect."); } return Json(ajaxResponseModel); } I've tried setting the Auth Cookie via a non-ajax request but it's not working either. And I've discovered that on the iPad/iPhone if I use the "Request Desktop Site
Tags (comma-separated)
Save Edits
Cancel