Strange Cookie Problem

  • Thread starter Thread starter Johnny Jörgensen
  • Start date Start date
J

Johnny Jörgensen

We have two sites (a "Live" site and a "Test" site) on the same webserver.
Both are mapped with different headers in IIS but pointing towards the same
folder set.

One of them (the "Test" site) works perfectly, but the "Live" site displays
a strange problem as far as cookies are concerned. No cookies are created
except for an ASP.NET_SessionID - UNLESS we restart the IIS every night - If
we do that it works, but it should be unnecessary to restart the IIS all the
time???

Has anybody experienced this problem?

TIA,
Johnny J.
 
I forgot to mention: We tried switching the Test site which worked to become
the Live site. And then it stopped working. Can it have anything to do with
the domain name? That sounds very strange to me...

Also: We tried restarting the IIS every night using a script, but that
doesn't work even if the log shows that everything is donwe exactly as when
you restart it manually. As it is now, we do have to restart it manually
every night, and as you can understand that's completely unacceptable....

Best regards,
Johnny J.
 
We have two sites (a "Live" site and a "Test" site) on the same webserver..
Both are mapped with different headers in IIS but pointing towards the same
folder set.

One of them (the "Test" site) works perfectly, but the "Live" site displays
a strange problem as far as cookies are concerned. No cookies are created
except for an ASP.NET_SessionID - UNLESS we restart the IIS every night -If
we do that it works, but it should be unnecessary to restart the IIS all the
time???

Has anybody experienced this problem?

TIA,
Johnny J.

It might be something with privacy settings in the browser but if it
works after a restart it is not the case.

What code do you use to set cookies, do you set path, domain and
expiration?

Response.Cookies["domain"].Value = DateTime.Now.ToString();
Response.Cookies["domain"].Expires = DateTime.Now.AddDays(1);
Response.Cookies["domain"].Domain = "support.contoso.com";
 
Back
Top