471,872 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,872 software developers and data experts.

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 1482

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
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.