Im using forms authentication. I want my application should not logout the user automatically after sometime.
You can change the timeout like this:
<system.web>
<authentication mode="Forms">
<forms timeout="99999999"/>
</authentication>
</system.web>
Further config options can be found here.
Make sure your session timeout isn't less than the forms authentication timeout. Otherwise, your users will have a hard time using your site.
You can change the session timeout in the web.config:
<system.web>
<sessionState timeout="999999999" />
<system.web>
Further details can be found here.
It could be a security issue to have someone logged in indefinitely.
I don't know if you can turn it off completely, but you could try setting a large timeout value in your web config:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" timeout="9999" slidingExpiration="true" defaultUrl="~/Default.aspx"/>
</authentication>
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