会话时间问题 [英] session time problem
问题描述
实际上我是托管网站的,但是我发现问题是,几分钟后我的登录会话过期并自动进入登录页面,因此我该如何增加登录页面的会话时间.
所以帮我解决这个问题...
我的所有页面在页面加载中都有代码
Actually I hosted website but in that i found problem that after few minutes my log in session gets expired and automatically comes to log in page so how can i increase session time of log in page.
so help me out to resolve this problem...
my all page has code in pageload
Response.AddHeader("Refresh", Convert.ToString((Session.Timeout * 60) - 10));
if (Convert.ToString(Session["userid"]).Equals(""))
{
Response.Redirect("~//Recruiter//Login.aspx");
}
而在web.config代码中,会话时间为
and in web.config code for session time is
<sessionstate mode="InProc" cookieless="false" timeout="1024" />
但它无法正常工作,会话将在2到3分钟内到期.
请帮助我...
but its not working and session expires in 2 to 3 min.
so help me......
推荐答案
阅读此内容
http://www.experts-exchange.com/Programming/Languages/. NET/ASP.NET/Q_21232754.html [
Read this
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21232754.html[^]
Few lines from the above link
And in IIS I change the session timeout setting by going to:
''Configuration'' Button -> ''Options'' Tab -> Tick Enable Session state
then increase value from default 20 mins to 45. I also increase the connection timeout setting from 900 to 2700(45 mins) seconds to see if that makes a difference but guess what? It doesn''t
希望这会有所帮助,如果是,那么请接受并投票答复.任何对此的任何疑问/问题都将受到欢迎.
谢谢&问候
RDBurmon.Sr.Software Engineer
Hope this helps , If yes then plz accept and vote the answer. Any queries / questions on this are always welcome.
Thanks & Regards
RDBurmon.Sr.Software Engineer
请参考类似的答案:会话时间处理 [^ ]
Please refer similar answer: session time handling[^]
这篇关于会话时间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!