Guest adouglas Posted August 19, 2002 Posted August 19, 2002 I'm working on an ASP.NET application. My site stores a couple of values in a couple of cookies, sets their expiry date to be Date.Now.Addhours(2), then redirects to another site. This other site then redirects back to my site. I then go to read the values from the cookies I wrote before redirecting, but they don't seem to be there. But if I then close the browser, open it again and go to my site, my original cookies are there again. So they're being stored on the client machine alright, but for some reason they can't be seen when I return from this other site. Any ideas why this is happening and suggestions on how I can see my cookies when I get back from the other site without having to restart the browser? If it makes a difference (although I don't see why it would), the other site I'm redirecting to is standard ASP, not ASP.NET. Quote
*Gurus* Derek Stone Posted August 19, 2002 *Gurus* Posted August 19, 2002 Make sure the site is actually redirecting back to a page on your server, and not a cached version. I see no other reason, short of client-side cookie blocking, for this to be happening. Quote Posting Guidelines
Guest adouglas Posted August 20, 2002 Posted August 20, 2002 Is there any way for me to tell if it's directing to a page on the server and not a cached page? I've set Response.Expires=-1500 which is what I used to do with the old ASP to make sure it would load a fresh version of the page every time. Is there something else I need to do in .NET to make sure it gets a fresh copy of the page each time? Quote
Guest THIAS Posted September 19, 2002 Posted September 19, 2002 Try to add this in your form_load sub ' Don't cache the page Response.CacheControl = "no-cache" Response.AddHeader("Pragma", "no-cach") Response.Expires = -1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.