I have a asp.net website hosted in the dedicated server.I'm using web.config to handle the session timeouts and that is 60 minutes.I did the following settings on the dedicated server (windows server 2003 and IIS 6.0 versions)
我有一个asp.net网站托管在专用服务器。我使用web.config来处理会话超时,这是60分钟。我在专用服务器上做了以下设置(Windows Server 2003和IIS 6.0版本)
- In the default web site property of IIS-->ASP.net tab-->Edit configuration-->Session timeouts -->60
- In the application pool The session timeout has been extended to 60.
- Recycling worker process has been set to 60 in the application pool.
在IIS的默认网站属性 - > ASP.net选项卡 - >编辑配置 - >会话超时 - > 60
在应用程序池中,会话超时已扩展到60。
应用程序池中的回收工作进程已设置为60。
I can get this work correct on my local system the problem is on the dedicated server(Goddady). No customer support is available for this problem It will be also fair if the session timeout is infinity too. But the timeout occurs after every 20 minutes if the webform is kept idle. How to get rid of this? I have a guess that the idle timeout is overriding the session timeout as I googled around but have not found a solution for this
我可以在我的本地系统上正确地完成这项工作,问题出在专用服务器上(Goddady)。没有客户支持可用于此问题如果会话超时也是无穷大也是公平的。但是如果webform保持空闲,则每20分钟发生一次超时。如何摆脱这个?我猜测空闲超时会覆盖会话超时,因为我在谷歌搜索但没有找到解决方案
please help me........
请帮我........
Thanks, Prabha
2 个解决方案
#1
We had the same problem on a hosted server, and decided that rather than fighting with the hosting company we would use some javascript on a timer to execute an AJAX request to the server to reset the session if it was about to expire.
我们在托管服务器上遇到了同样的问题,并决定不使用托管公司,我们会在计时器上使用一些javascript来执行AJAX请求,以便在服务器即将到期时重置会话。
This site (PreventTimeout) is very close to what we do.
这个站点(PreventTimeout)非常接近我们的工作。
I know this doesn't answer your question directly, but it has been a good workaround for us.
我知道这不能直接回答你的问题,但它对我们来说是一个很好的解决方法。
#2
If you recycle the application pool every 60 minutes, then (assuming your sessions die when the pool recycles) a session started 10 minutes before the pool recycles will only last 10 minutes.
如果您每隔60分钟回收一次应用程序池,那么(假设您的会话在游泳池回收时死亡)会话开始前10分钟,游泳池回收只会持续10分钟。
On average, you'd expect a session to last 30 minutes.
平均而言,您希望会话持续30分钟。
#1
We had the same problem on a hosted server, and decided that rather than fighting with the hosting company we would use some javascript on a timer to execute an AJAX request to the server to reset the session if it was about to expire.
我们在托管服务器上遇到了同样的问题,并决定不使用托管公司,我们会在计时器上使用一些javascript来执行AJAX请求,以便在服务器即将到期时重置会话。
This site (PreventTimeout) is very close to what we do.
这个站点(PreventTimeout)非常接近我们的工作。
I know this doesn't answer your question directly, but it has been a good workaround for us.
我知道这不能直接回答你的问题,但它对我们来说是一个很好的解决方法。
#2
If you recycle the application pool every 60 minutes, then (assuming your sessions die when the pool recycles) a session started 10 minutes before the pool recycles will only last 10 minutes.
如果您每隔60分钟回收一次应用程序池,那么(假设您的会话在游泳池回收时死亡)会话开始前10分钟,游泳池回收只会持续10分钟。
On average, you'd expect a session to last 30 minutes.
平均而言,您希望会话持续30分钟。