T
Tongass Park Neighborhood Association, Juneau Alas
I have tried the following:
To set the cookie
Response.Cookies("TongassParkPoll").Expires = Date + 30
Response.Cookies("TongassParkPoll")("1") = Cstr(Date)
response.write("<hr>" & Request.Cookies("TongassParkPoll")("1") &
"<hr>")
I upload the page and run it. The cookie returns the Date as set. I
then comment out the two Response.Cookies lines and it looks like:
'Response.Cookies("TongassParkPoll").Expires = Date + 30
'Response.Cookies("TongassParkPoll")("1") = Cstr(Date)
response.write("<hr>" & Request.Cookies("TongassParkPoll")("1") &
"<hr>")
I upload the page again and run it and get no value. The cookie
appears to only work in session state, it won't retain the cookie
based on the expiration date set.
I tried this test in IE8 and Mozilla 3.5.1. Both exhibit the same
issue. My IE security settings do not restrict cookies in any way
that I can find. Neither has Mozilla been set to restrict cookies.
If I try this test on my local IIS the cookie is retained.
Why is this not working and is there another way to make it work? I
want to setup an opinion poll using ASP and thought that the cookie
would be a good way to limit voting. If this method will not work
does anyone have a suggestion?
To set the cookie
Response.Cookies("TongassParkPoll").Expires = Date + 30
Response.Cookies("TongassParkPoll")("1") = Cstr(Date)
response.write("<hr>" & Request.Cookies("TongassParkPoll")("1") &
"<hr>")
I upload the page and run it. The cookie returns the Date as set. I
then comment out the two Response.Cookies lines and it looks like:
'Response.Cookies("TongassParkPoll").Expires = Date + 30
'Response.Cookies("TongassParkPoll")("1") = Cstr(Date)
response.write("<hr>" & Request.Cookies("TongassParkPoll")("1") &
"<hr>")
I upload the page again and run it and get no value. The cookie
appears to only work in session state, it won't retain the cookie
based on the expiration date set.
I tried this test in IE8 and Mozilla 3.5.1. Both exhibit the same
issue. My IE security settings do not restrict cookies in any way
that I can find. Neither has Mozilla been set to restrict cookies.
If I try this test on my local IIS the cookie is retained.
Why is this not working and is there another way to make it work? I
want to setup an opinion poll using ASP and thought that the cookie
would be a good way to limit voting. If this method will not work
does anyone have a suggestion?