People are reporting problems registering with one of our ASP.NET sites. When I check the IIS logs, it looks like the FormsAuthentication cookie is not cached by their browsers after logging in.
I don’t think it is as simple as “the user has set that the browser does not accept cookies” because:
a) If cookies do not work for their browser at all, they would never have received as much as possible - an ASP.NET session cookie seems to work fine, for example.
b) These are generally not those users who would even know how to disable cookies.
Therefore, I think it should be something else. What problems can cause ASP.NET FormsAuthentication cookies to stop working, besides the fact that users simply set browsers to reject cookies?
edit: For example, this answer to another question suggests that sometimes FormsAuthentication cookies are deleted because they are too large - maybe someone can shed some light on this?
edit: cookie FormsAuthentication for one of our sites - 233 bytes - is this a bit more? Can less be done? Maybe this will help.
edit: I noticed that the code uses FormsAuthentication.SetAuthCookie() and Response.Redirect() instead of FormsAuthentication.RedirectFromLoginPage() - could this be related?
codeulike
source share