在我的应用程序中,我无法更改会话时间。它从其他地方覆盖。 [英] In my application , I'm not able to change session time out. Its overwriting from else where.

查看:60
本文介绍了在我的应用程序中,我无法更改会话时间。它从其他地方覆盖。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将会话时间改为180分钟。但每当我自动更换它时,10分钟后会有时间。



我不知道从哪里拿10分钟的价值。



我已经尝试过使用global.asax,但我只能缩短时间,不知道为什么我不能增加时间。



这是我在web.config中的会话状态标签



I'm changing my session time out to 180 min. But whenever I change it automatically got time out after 10 min.

I don't know from where its taking 10 min value.

I have already tried with global.asax but I'm only able to reduce the time don't know why I can not increase the time out.

It's my session state tag in web.config

<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="180">
       <providers>
       <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
     </providers>

   </sessionState>









请建议...... ..

提前谢谢。





Please advice........
Thanks in advance.

推荐答案

你的网络托管服务很可能将会话超时限制在10分钟 - 因为每个活动会话需要保留服务器内存,直到会话到期为止,某些主机服务将其限制为低于标准的20分钟是很常见的。将每个会话延长到180分钟可能会占用大量服务器资源,主机希望避免这种情况。



要么与您的托管服务交谈,要么最好停止使用会话并使用Cookies。
It's quite possible that your web hosting service is restricting the session timeout to 10 minutes - since each active session takes server memory which has to be retained until the session expires, it's quite common for some hosting services to restrict it to less than the standard 20 minutes. Extending each session to 180 minutes could occupy a significant amount of server resources, which hosts would like to avoid.

Either talk to your hosting service, or better stop using the session and use Cookies instead.


这篇关于在我的应用程序中,我无法更改会话时间。它从其他地方覆盖。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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