G
Guest
All
We recently started writing a couple encrypted values to the user's cookie using FormsAuthentication.Encrypt. Such as:
Dim tmpTicket1 As New FormsAuthenticationTicket(1, "TEST", Date.Now, Date.Now.AddMinutes(60), False, "Boom1")
Dim tmpResults1 As String = FormsAuthentication.Encrypt(tmpTicket1)
Response.Cookies.Add(New HttpCookie("TEST", tmpResults1))
And then we are reading it like:
Request.Cookies("TEST")
BUT - we are noticing that in some cases, people who *do* accept session cookies (confirmed because their cookie session works and FormsAuthentication.SetAuthCookie works) do *NOT* accept our non persistant cookie. The frustrating thing is that we cannot recreate the issue, so I grasping at straws.
Is there anything glaringly wrong with the code listed above? Further, how exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but ours don't stick?
Thanks!
Tyson
We recently started writing a couple encrypted values to the user's cookie using FormsAuthentication.Encrypt. Such as:
Dim tmpTicket1 As New FormsAuthenticationTicket(1, "TEST", Date.Now, Date.Now.AddMinutes(60), False, "Boom1")
Dim tmpResults1 As String = FormsAuthentication.Encrypt(tmpTicket1)
Response.Cookies.Add(New HttpCookie("TEST", tmpResults1))
And then we are reading it like:
Request.Cookies("TEST")
BUT - we are noticing that in some cases, people who *do* accept session cookies (confirmed because their cookie session works and FormsAuthentication.SetAuthCookie works) do *NOT* accept our non persistant cookie. The frustrating thing is that we cannot recreate the issue, so I grasping at straws.
Is there anything glaringly wrong with the code listed above? Further, how exactly is ASP.NET setting the cookie through SetAuthCookie that sticks, but ours don't stick?
Thanks!
Tyson