Can you tell me why FormsAuthentication.SetAuthCookie(user.Name, false);
is not causing Request.IsAuthenticated
to be true?
Here is my code
In my case I had this issue which ended up in a redirect-loop where the user would be redirected to the login, successfully logged in and then back to our site but since Request.IsAuthenticated was false the user was redirected to the login agan.
In our case this was solved by using another CookieManager,
var cookieOptions = new CookieAuthenticationOptions();
cookieOptions.CookieManager = new SystemWebCookieManager();
app.UseCookieAuthentication(cookieOptions);
Turns out that there was some kind of bug in Katana that this other CookieManager worked around, in out case this solved the issue.
https://github.com/aspnet/AspNetKatana/wiki/System.Web-response-cookie-integration-issues