我怎么可以设置无限会话超时在asp.net项目 [英] how can I set infinity session time out in asp.net project
问题描述
我工作的asp.net项目。我怎么能增加会话超时。 (无限超时)?
或者我能做到这一点IIS服务器上。如果可以,请explane ..
在
的web.config 解决方案 您可以设置会话超时
作为播种低于 200
正显示出分钟
,您可以设置,只要你想。 <结构>
<&的System.Web GT;
<的sessionState超时=200>< /&的sessionState GT;
< /system.web>
< /结构>
超时属性可以在Web.config文件中设置为
使用的sessionState超时属性的应用程序
配置元素,也可以设置超时属性值
直接使用应用程序code。
的超时属性不能设置到一个值大于525600
分钟(1年)。默认值是20分钟。
块引用>I'm working on asp.net project. how can I increasing the session timeout. (infinity timeout) ? or can I do this on IIS server. if it can, please explane..
解决方案You can set
session timeout
inweb.config
as sown below200
is showingminute
so you can set as long as you want..<configuration> <system.web> <sessionState timeout="200"></sessionState> </system.web> </configuration>
The Timeout property can be set in the Web.config file for an application using the timeout attribute of the sessionState configuration element, or you can set the Timeout property value directly using application code.
The Timeout property cannot be set to a value greater than 525,600 minutes (1 year). The default value is 20 minutes.
这篇关于我怎么可以设置无限会话超时在asp.net项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!