本文介绍了在asp中延长会话过期时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在用户登录时在asp4.0中开发了一个网站,然后20分钟后自动会话期满,并且用户再次进入登录页面并重新登录. 我想将会话状态值扩展到4小时,这是可能的. 谢谢
i have developed a website in asp4.0 in this website when user Log in then after 20 minutes automatic session expires and user go to again login page and re login . i want to extend session state value to 4 hours how it is possible. Thank You
推荐答案增加Web.Config文件中的超时时间: Increase the timeout in the Web.Config file: <system.web> <sessionState mode="InProc" timeout="240"></sessionState> </system.web>
如果这是您真正要设置的时间,则会将Web应用程序的超时设置为240分钟.
This would set the timeout as 240 minutes for your web application if that''s what you really want to set.
从您的网站打开web.config文件并设置此参数. Open web.config file from your website and set this parameter.
<system.web> <sessionState mode="InProc" timeout="240"></sessionState> </system.web>
打开web.config并在< system.web>之后键入此代码.标签: Open web.config and type this code after <system.web> tag: <sessionstate timeout="4" mode="InProc"></sessionstate>
HttpSessionState.Timeout属性
HttpSessionState.Timeout Property
更多推荐
在asp.net中延长会话过期时间
发布评论