我如何在ASP 2.0中增加12小时的会话超时 [英] how can i increase Session time out for 12 hour in asp 2.0

查看:129
本文介绍了我如何在ASP 2.0中增加12小时的会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认超时为20 minutes,但是我想增加session time to 8 hour,因为用户正在将信息输入到Web表单中,因此会话超时期将结束,并且他们将丢失所有已完成的工作.

由于lost the information..
,每次他们不得不一次又一次地登录应用程序
问候
Prince Antony G

The Default time out is 20 minutes, but I would like to increase session time to 8 hour because the user is entering information into a web form, the session time-out period will end and they lose all the work they have done.

Every time they have to logged into application again and again due to that lost the information..

Regards
Prince Antony G

推荐答案

在IIS中进行检查.
打开IIS,单击应用程序池",为您的应用程序选择应用程序池.
右键单击->选择属性.
在性能"选项卡中,将空闲超时"设置为空闲.....分钟后关闭工作进程的所需分钟".

之后,重新启动IIS.
Check it in IIS.
Open the IIS, click on the Application Pools, Select the Application pool for your application.
Right Click --> Select Properties.
In the Performance tab, Set the idle timeout as your desired minutes for "shutdown worker processes after being idle for ..... minutes".

Restart IIS after that.


Asp.Net会话管理具有两种模式.

InProc

会话丢失是此模式下的常见问题.一段时间后,IIS会继续回收工作进程,这会导致会话数据丢失.

请查看下面的链接以获取有关此内容的更多信息.

http://blogs.iis.net/webtopics/存档/2009/07/21/in-proc-session-state-management.aspx

下面的CodeProject文章提供了解决此问题的方法.
防止ASP.NET中的会话超时

OutProc

在这种会话管理模式下,web.config的设置将正常工作.请查看下面的链接以获取更多详细信息.

http://msdn.microsoft.com/en-us/library/h6bb9cz9 (v = VS.100).aspx
Asp.Net Session Management has two Modes.

InProc

Loss of Session is a common problem in this mode. IIS keep recycling the worker-process after some duration, which causes the loss of Session Data.

Have a look at below link for more informaton on this.

http://blogs.iis.net/webtopics/archive/2009/07/21/in-proc-session-state-management.aspx

Below CodeProject article has a work-around for this problem.
Prevent Session Timeout in ASP.NET

OutProc

In this mode of Session Management, settings of web.config will work properly. Have a look at below link for more details.

http://msdn.microsoft.com/en-us/library/h6bb9cz9(v=VS.100).aspx


您需要增加WEB.CONFIG文件中的会话超时.默认会话超时时间为20分钟.以分钟为单位设置超时

You need to increase session timeout in WEB.CONFIG file. the default session timeout time is 20 min. Set timeout in Minutes

<configuration>
  <system.web>
     <sessionstate timeout="20" /> 
  </system.web>
</configuration> 


这篇关于我如何在ASP 2.0中增加12小时的会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆