469,359 Members | 1,622 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,359 developers. It's quick & easy.

strange cookie problem

suppose i have a script which sets a cookie in this manner:

Response.Cookies("session_id") = '12345'
Response.Cookies("session_id").Expires = <future date here>
Response.Cookies("session_id").Path = "/"

and another script which clears it like this

Response.Cookies("session_id") = ""

The scripts are located in a directory "mysite" under iis root directory
and accessed through http://localhost/mysite/something.asp

When these are called repeatedly, everything works as expected
(script number 1 sets the cookie and number 2 clears it)

However, when I create a virtual directory called "mysite" and point it
to the same place, script number one is no longer able to set the cookie
after script number two has been called, even though they are still accessed
exactly the same way (http://localhost/mysite/something.asp)

But when I modify the code in script number one by removing the last two lines
("expires" and "path") it works as expected again.

Anyone know why this would happen?

Jaakko Oksa
jaakko at vilmamedia dot fi
Jul 19 '05 #1
0 1416

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by AHN | last post: by
1 post views Thread by Joe | last post: by
17 posts views Thread by jensen bredal | last post: by
1 post views Thread by Blackstar | last post: by
16 posts views Thread by Victor | last post: by
reply views Thread by bertie.bunch | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.