I want users to be able to login once and not worry about having to login again until they explicitly logout using FormsAUthentication in ASP.Net 3.5
I want users to be able to login once and not worry about having to login again until they explicitly logout using FormsAUthentication in ASP.Net 3.5.
I have men开发者_JAVA技巧tion in web.config
<authentication mode="Forms">
<forms name="_AuthCookie" loginUrl="~/LogIn.aspx" defaultUrl="Default.aspx" timeout="50000000"></forms>
</authentication>
But the user logging out after 20 mins.
Please help me on this...
Check IIS.
IIS supersedes what your web.config sets as a timeout.
Select Default Web Site > Properties > Home Directory > Application Settings > Configuration > Options.
I'm not sure what the max is, or if you can set it to only expire once the user actually logs out (FormsAuthentication.Signout() + Session.Abandon()
)
Perhaps using slidingExpiration would help, but not sure.
精彩评论