I am having a weird issue with asp.net forms authentication. This problem occurs only for 3 users out of 30+ users who have successfully logged in. I am using very simple auth code that I have used many times and have never seen this problem. After successful user authentication and the creation of the auth cookie, a cookie is added and response.redirect is called for FormsAuthentication.GetRedirect (userid, false). The Application_AuthenticateRequest method in Global.asax is called.
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = Context.Request.Cookies[cookieName];
if (null == authCookie)
{
return;
}
So, immediately after saving a “good” cookie and redirecting the cookie, it is null. I ran the code through a debugger and the cookie only has a null value for these 3 users. But a cookie looks like a cookie to many users who have successfully logged in.
Any ideas? This is the standard code that should work.
source
share