Asp.Net FormAuthenticaion not working in Safari browser

I use a simple method to create cookies.

FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
return RedirectToAction("Index", "Dashboard");

Somehow I debugged my application and found that it was User.Identity.IsAuthenticatedalways false and User.Identity.Namealso zero.

Note. The above behavior applies only to SAFARI and works great with other browsers like IE, Firefox and Chrome.

I know that my questions are duplicated, and Google gave me enough links to solve, but I can not fix my problem. I am using .NET 4.5 and the Safari version is 5+.

+4
source share
1 answer

, , .. cookie ? cookie, . , Google. .

cookie FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);

cookie , , cookie Safari. , .

cookie , cookie , . , , , .

+1

Source: https://habr.com/ru/post/1617068/


All Articles