I am developing mobile web application using Jquery Mobile and MVC 3. I am using FormsAuthentication for the user authentication. Here is my code for Login button click
AuthenticationResult authResult = this.membershipService.Authenticate(username, password, remoteAddress);
if (authResult.IsAuthenticated)
{
FormsAuthentication.SetAuthCookie(username, false);
}
authResult.RedirectAction + " To JSON Object"); return Json(new { action = "Index", });
On logout button i have written the code
public ActionResult LogOff()
{
FormsAuthentication.SignOut();
Response.Cookies.Clear();
return RedirectToAction("Index", "Home");
}
This is working fine on windows machine safari browser
When i open my application on iPad safari browser:
- Give login crendential and click ok, it is redirecting me to the appropriate screen.
- Log out and Close the safari browser on iPad
- Reopen the safari browser and do the step 1, this time it is redirecting me to Login screen.
- I have to clear the browser cookies thn only it is redirecting me to appropriate screen
I also clear the cookies on Login Screen but it is not working. Can someone help me out here?