I have these on my web.config of my root directory

<authentication mode="Forms">
<forms loginUrl="Login.aspx"
       protection="All"
       timeout="60"
       name=".ASPXAUTH" 
       path="/"
       requireSSL="false"
       slidingExpiration="true"
       defaultUrl="default.aspx"
       cookieless="UseDeviceProfile"
       enableCrossAppRedirects="false" />
</authentication>

But .ASPXAUTH cleared so soon (5 minutes I guess).

What is the probable reason?

有帮助吗?

解决方案

Very often, it is because you rebuild the solution. The web server restarts and machineKey are regenerated.

So the cookie encrypted and signed by previous machineKey is invalid.

That's why you are forced to log out.

Here is a quick one for you. https://stackoverflow.com/a/436053/280970

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top