自动登出 [英] Loging out automatically
本文介绍了自动登出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我创建了一个网站,并在其中声明了web.config中的会话时间.如果将网站留给偶像4分钟,则我退出系统的时间为600分钟,但仍然会在4分钟内退出.我想增加会话时间,我不希望页面在60分钟以下过期.请帮忙
Hello,
I have created a website in which i have declared session time in web.config. If the website is left idol for 4 mins its logging out I gave the time as 600 mins but still it logs out in 4 mins. I want to increase the session time I dont want the page to expire below 60 mins. Please help
<sessionState mode="InProc" cookieless="false" timeout="600">
</sessionState>
推荐答案
试试看:
<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="60">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
当然,您需要有一个名为DefaultConnection的连接.
Off course you need to have a connection named DefaultConnection.
这篇关于自动登出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文