I "think" I have this fixed, it had to do with the path of the variable not being set properly. I set the path in asp to this.
Response.Cookies("AuthCookie").path = "/"
"John Saunders" <> wrote in message news:...
"Raterus" <> wrote in message news:...
Howdy,
I have one IIS Application, with asp/asp.net pages. I set a cookie like so in an ASP page.
Response.Cookies("AuthCookie")("hash") = md5(username & Application("HashCode")) Response.Cookies("AuthCookie")("username") = username
Then I response.redirect to my asp.net page, which is protected by Forms Authentication, so Application_AuthenticateRequest Fires..and I try to access this cookie like so..
Dim authCookie As HttpCookie = Context.Request.Cookies("AuthCookie")
...Sometimes the cookie is there ...Sometimes it isn't there
Very Confusing.
The site always stays in one browser window, I've tried messing with cookie security, without success. I've also noticed that along with this cookie, lots of other cookies dissapear, like the session cookies asp/asp.net sets.
Any ideas, this one has me baffled..?
Michael, cookies don't just disappear. What happens is that the browser sends them or not, as it sees fit.
One of the most-frequent causes of "cookie loss" involves issues with the domain of the cookie versus the domain of the site. Is it possible that sometimes you are using localhost and other times mymachine.com? If you created the cookie with "mymachine.com" as its domain, it would not appear on pages from localhost.
--
John Saunders
johnwsaundersiii at hotmail
|