开发者

Problem with session timeout in C#

开发者 https://www.devze.com 2023-03-18 21:03 出处:网络
In my 开发者_Go百科web.config file I tried Session.Timeout=\"1\" and found working. Later I tried Session.Timeout=\"20160\". Even if I give such a large number my website \"Session Transfers\" are bei

In my 开发者_Go百科web.config file I tried Session.Timeout="1" and found working. Later I tried Session.Timeout="20160". Even if I give such a large number my website "Session Transfers" are being expired in 15-20mins. Do I need to change any settings in IIS? I am using windows 2003 server.


define in the web configuration file:

<sessionstate 
      mode="inproc"
       cookieless="false" 
      timeout="20" 
     />


check this :

http://forums.asp.net/t/1283350.aspx


define in here in web.config file:

 <system.web>
     <authentication mode="Forms">
         <forms timeout="50" />
     </authentication>
 </system.web>


Seems like session timeout has a max of 24 hours. Check this out http://support.microsoft.com/kb/233477

Set it to 24 hours or less and you will be fine.

Also explained here: 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消