Does anyone know why ASP.NET Forms Authentication does not work on Windows Safari, or better yet, how to make it work? This seems like a very strange problem. When I use the login control (System.Web.UI.WebControls.Login) everything works fine, but if I try to do user login to authenticate the forms, when I call FormsAuthentication.RedirectFromLoginPage, safari just sends me back to the login page. as if I'm not authenticated, while every other browser logs me in and sends me in my path.
protected void lnkLogin_Click(object sender, EventArgs e)
{
if (Membership.Provider.ValidateUser(txtUsername.Text, txtPassword.Text))
{
Session.Clear();
HttpContext.Current.Response.Cookies.Clear();
FormsAuthentication.SetAuthCookie(txtUsername.Text, true);
FormsAuthentication.RedirectFromLoginPage(txtUsername.Text, true);
}
}
source
share