Hello,
we have migrated our website from .NET 1.1 to .NET 2.0.
After this, some of our users are unable to log-on our site, while for
the majority of them there's no problem.
We're using a standard procedure to login (see below).
The Request.Cookies[FormsAuthentication.FormsCookieName] returns NULL,
after their login attempt, on subsequent pages. We're setting other
cookies, for instance the cookies of google analytics, with no
problem.The're no problem too with the ASP.NET_SessionId cookie.
The only way for them to be able to logon, is to manually delete their
cookies.
Here is the code, we're using:
iduser = Encryption.Encrypt(userid.ToString());
FormsAuthentication.SetAuthCookie(iduser, false);
userdata = "XXX";
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1, // version
iduser, // user name
DateTime.Now, // issue time
DateTime.Now.AddHours(72), // expires
persistent, // persistent
userdata // user data
);
FormsCookie = new HttpCookie(FormsAuthentication.FormsCookieName,
FormsAuthentication.Encrypt(ticket));
HttpContext.Current.Response.Cookies.Add(FormsCook ie);
Then we do a Response. Redirect.
Does anybody have an idea of what we can do ? It's a real problem for
us.
Thanks in advance