Response.Cookies("S" & ProdID).Expires = DateAdd("Y", 1, Now)
this script add one year before it expire
try if you want your cookie to stay alive only one day
Response.Cookies("S" & ProdID).Expires = DateAdd("D", 1, Now)
Le 07/08/2003 02:49, Daniel Soderstrom a écrit :[color=blue]
> We have a very strange problem that I have not been able to track down. We have a simple cookie being set so people don't have to
> login to our site everday. However, cookies keep vanishing after a day or two and I havn't been able to work it out.
>
> I can actually see the cookie in my "Cookies" folder, however it has a [2] at the end, ie.
daniel@www.yoursite.com[2], when I log
> into the site again, it creates
daniel@www.yoursite.com[1]
>
> Server : Win2k, IIS5 with latest patches etc
> Clinet : WinXP, IE6, Set to medium security
>
> Things I have tried/checked;
>
> 1) Made sure the expires date is set correctly.
>
> Response.Cookies("S" & ProdID).Expires = DateAdd("Y", 1, Now)
>
> 2) Setup a full P3P policy and validated with the w3c validator
>
> 3) Verified that IE6 is accepting the cookie
>
> 4) Read some rumour on the net that setting the Expires statement last will fix the disappearing cookie problem, so did it
>
> any help would be appreciated, (just fix my address if replying via email)
>
> Daniel.
>
>
>[/color]