views:

1247

answers:

4

I have an ASP.NET 2.0 application. The login page redirects twice when the login is successful. This works OK on all test environment and production servers except one. We can see with Fiddler that the login redirects to the second page and it redirects to the third. When getting to the third page the authentication cookie is lost, and the page redirects back to the login. As mentioned this happens only on one production server with IE7. It works fine if we try IE7 from the server itself. It only fails from other client machines. It works perfectly well if I just try the same from FireFox. I can see clearly of fiddler, that in this case the cookie is not lost.

Any ideas?

A: 

Are you setting a cookie with a domain name set? When browsing, does your URL contain the domain name?

"localhost" cookies don't really work like domain-set cookies and can often disappear.

HttpCookie contains the domain parameter to set.

Geoff Cox
not using localhost. this is a production server
Ron Harlev
A: 

This sounds like an IIS config problem. Have you tried to recreate the website on that server with defaults?

BenB
we did try that. didn't help
Ron Harlev
A: 

The dates are consistant? e.g. 10.09.2008 == 09.10.2008 if the locale is wrong. So if you set a specific expiry it might be interpreting it as en-US but you need en-NZ or something.

Or you could be setting it as a UTC date but the ie computer is UTC+8 so it appears to expire quickly?

marshall
+1  A: 

This is a longshot, but does the servername have an underscore in it? A while back, there was an IE bug where it couldn't save cookies from a servername/URL that had an underscore in it, so if I accessed the server by http://server_name, I couldn't save a cookie, but accessing it via http://intranetdnsalias would work just fine.

rwmnau