简体   繁体   中英

ASP.NET MVC - “Remember me” works only on localhost

we have testserver for a ASP.NET MVC project. Everything works fine on dev machines, but we can't login if "Remember me" checked in on the login page (in this case the request is redirected to the login page, no exception occurs as far I know).

If we open a browser in RDP on the testserver, it's possible to use "Remember me" correctly as localhost - but remotely still fails.

The two web.config are equals (except the compilation debug row).

Any idea?

Thanx in advance!

Answer

Servertime was wrong (minus 3 days) and cookie died too fast.

Pff...based on this article I found the answer quickly: the server time is wrong (it's a virtualized one and something happend) so cookie lifetime ends too fast.

I do not delete this question maybe can be helpfull for others.

Hmmm...

You don't happen to have multiple servers on your testbed do you? Sounds like a classic machinekey problem if so.

(aside - always compare machine.configs too in cases like this!)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM