[英]Problem with session timeout in C#
In my web.config file I tried Session.Timeout="1"
and found working.在我的 web.config 文件中,我尝试
Session.Timeout="1"
并发现工作正常。 Later I tried Session.Timeout="20160"
.后来我尝试
Session.Timeout="20160"
。 Even if I give such a large number my website "Session Transfers" are being expired in 15-20mins.即使我提供如此多的数量,我的网站“会话转移”也会在 15-20 分钟内过期。 Do I need to change any settings in IIS?
我需要更改 IIS 中的任何设置吗? I am using windows 2003 server.
我正在使用 windows 2003 服务器。
define in the web configuration file:在 web 配置文件中定义:
<sessionstate
mode="inproc"
cookieless="false"
timeout="20"
/>
define in here in web.config file:在 web.config 文件中定义:
<system.web>
<authentication mode="Forms">
<forms timeout="50" />
</authentication>
</system.web>
check this:检查这个:
http://forums.asp.net/t/1283350.aspx http://forums.asp.net/t/1283350.aspx
Seems like session timeout has a max of 24 hours .似乎 session 超时最长为24 小时。 Check this out http://support.microsoft.com/kb/233477
看看这个http://support.microsoft.com/kb/233477
Set it to 24 hours or less and you will be fine.将其设置为 24 小时或更短,你会没事的。
Also explained here: http://msdn.microsoft.com/en-us/library/ms525473(v=vs.90).aspx还在这里解释: http://msdn.microsoft.com/en-us/library/ms525473(v=vs.90).aspx
IIS 6.0: The minimum allowed value is 1 minute and the maximum is 1440 minutes.
IIS 6.0:允许的最小值为 1 分钟,最大值为 1440 分钟。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.