如何在ASP.NET成员身份中禁用自动注销 [英] How can I disable auto log out in ASP.NET membership
本文介绍了如何在ASP.NET成员身份中禁用自动注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为了增加超时,我在we.config中写了以下代码
To increase the timeout I have written the following codes in we.config
<membership defaultprovider="ProjectProvider" userisonlinetimewindow="720">
<providers>
<add name="ProjectProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionstringname="ConnectionString" applicationname="MyApp" enablepasswordretrieval="true" enablepasswordreset="true" requiresquestionandanswer="true" requiresuniqueemail="true" passwordformat="Clear" maxinvalidpasswordattempts="5" passwordattemptwindow="10" minrequiredpasswordlength="5" minrequirednonalphanumericcharacters="0" />
</providers>
</membership>
<rolemanager cacherolesincookie="true" enabled="true" defaultprovider="ProjectRoleProvider" cookietimeout="720">
<providers>
<add name="ProjectRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionstringname="ConnectionString" applicationname="MyApp" />
</providers>
</rolemanager>
<authentication mode="Forms">
<forms defaultUrl="Default.aspx" loginUrl="Login.aspx" timeout="720">
</forms>
</authentication>
但是,它仍然会在5-6分钟后自动退出。有人请帮我禁用此超时功能。
But, still it automatically logs out after 5-6 minuites. Someone please help me to disable this timeout feature.
推荐答案
http://stackoverflow.com/questions/3839851/disable-auto-logout-feature-in-asp-net [ ^ ]
或在您的代码段中写入99999代替720。
http://stackoverflow.com/questions/3839851/disable-auto-logout-feature-in-asp-net[^]
or in your code snippet write 99999 in place of 720.
这篇关于如何在ASP.NET成员身份中禁用自动注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文