问题
My previous experience with ASP.NET web application (regarding the timeout) is that it logouts the user every 30 minutes, regardless of what module is running, Is there a way that we can increase the application timeout to an hour or two?
Any help is highly appreciated, thanks in advance.
回答1:
You can set the Sesion timeout in your web.config file.
<sessionState timeout="60" />
The value is defined in minutes.
I think you can set it programmatically as well from the HttpContext.Current.Session object.
回答2:
If by application timeout you mean session timeout, then this can be done in the web.config. The timeout attribute on the sessionstate element takes an integer that indicates the number of minutes of inactivity before it times out the user's session.
<configuration>
<sessionstate timeout="20" />
.
.
.
</configuration>
回答3:
In the web.config , set the value of timeout attribute to the value that you need.
<system.web>
<authentication mode="Forms">
<forms timeout="value in minutes"/>
</authentication>
</system.web>
回答4:
There is a value in your web.config where you can set the timeout length.
<sessionState
timeout="60"
/>
来源:https://stackoverflow.com/questions/435538/how-to-configure-the-timeout-of-your-asp-net-web-application