如何在asp .net应用程序项目中增加2小时的会话时间? [英] How to increase the session time out 2 hours in asp .net application project?
本文介绍了如何在asp .net应用程序项目中增加2小时的会话时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我正在使用asp.net工作在一个Web应用程序项目中,我的问题是我想将会话时间增加到2小时,因为我在网上已经改变了。配置文件
< sessionState timeout =120/>但是没有用。
如果你有任何想法,请解决我的问题。
谢谢,
kamalakanta
Dear All ,
I am working in a web application project using asp.net ,my problem is I want to increase my Session time out to 2 hours ,For that I have changed in web.config file
<sessionState timeout="120"/> but is not working.
If you have any idea plz solve my problem.
Thanks,
kamalakanta
推荐答案
在代码后面写这个文件..
Session .Timeout = 120;
write this in code behind file..
Session.Timeout=120;
请参考此链接并确保相应设置。
为什么Session.Timeout不适用于您的网站 [ ^ ]
问候..:)
Refer this link and make sure all set accordingly.
Why Session.Timeout is not working for your website[^]
Regards..:)
Fron WebConfig:
Fron WebConfig :
<configuration>
<system.web>
<sessionstate timeout="20" />
</system.web>
</configuration>
默认为20分钟。根据你的需要改变它。
使用这个
By default its 20 mins. Change it as per your needs.
use this
<sessionState mode="InProc" cookieless="false" timeout="120" />
谢谢&注意
Sham:)
Thanks & Regard
Sham :)
这篇关于如何在asp .net应用程序项目中增加2小时的会话时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文