Application logout automatically in few seconds, i want to increase it to 30mins.
I have done some code in web.config file but it doesn't work. i have researched many articles on it but i could not resolve it.
Web.config code :
<sessionState mode="InProc" timeout="1800"></sessionState>
<authentication mode="Forms">
<forms loginUrl="~/Login" timeout="1800">
</forms>
</authentication>
Session State & Authentication timeouts are in minutes not seconds. So, you should have
<sessionState mode="inProc" timeout="30" ></sessionState>
<authentication mode="Forms">
<forms loginUrl="~/Login" timeout="30">
</forms>
</authentication>
Also, you should be aware that the way this is setup, the authentication will timeout 30 minutes after it was granted while the session will extend the 30 minutes to be from last access. To make these two closer to syncing up, you should add slidingExpiration="True" to the forms element.
If, after these changes, it is still logging you out after a few seconds, take look at:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With