Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE deleting cookies between pages

Status
Not open for further replies.

XgrinderX

Programmer
Mar 27, 2001
225
0
0
US
Hello!

I have a problem that is causing me fits and I have no idea what is causing it or how to fix it - but I can reproduce it consistently.

We have 3 environments in our work flow - development, staging, and production. The dev and stg environments are subdomains of the production environment BUT they are all on different servers. Meaning - production is domain.com on production server, staging is stg.domain.com on a staging server and development is dev.domain.com on a development server.

We use a cookie to determine if users are logged in or not. We set the cookie at login and then check for it on every subsequent page. Here is the problem I am having:

In IE, I log in to the production domain, do some work, then logout. Then I go to the dev.domain and try to login, it will not remember the cookie set from the dev.domain login page. I can make this happen 100% of the time in both IE7 and IE8. I cannot make it happen in Firefox. I have placed response output on the login page to verify that the cookie gets set. Then if I place the same response output on the next page, the cookie is empty. I can close the browser, and re-open it and then login to the dev.domain with no issues. However if I then logout and try to go to stg or production - same thing.

Anyone have any ideas on what's going on here? I have been Googling all morning and haven't found anything yet.
 
I set the cookie using Response.Cookies.

That link is very useful, in fact I have used it in the past when I wanted to try read cookies across domains. Unfortunately, for this issue I am not trying to share them across domains. I just don't want the cookie to disappear when I come back and start working on the dev domain.

What happens is this - I log in to production domain to have a look at something. I log out. I then try to log in to dev domain to make some changes and the dev domain all of a sudden start forgetting cookies.

Anyone else with any ideas? I have spent 2 days trying to find a solution and so far nothing works :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top