By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,373 Members | 1,792 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,373 IT Pros & Developers. It's quick & easy.

SetAuthCookie works, but our cookies aren't being written - HELP

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I have the same Problem.

If you find an answer let me know please!

"Tyson Brown" <ty****************@sbcglobal.net> wrote in message
news:86**********************************@microsof t.com...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.