Strange Cookie Problem

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.
 
J

Johnny Jörgensen

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.
 
G

Guest

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";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top