How do I time out the session a ASP.NET MVC logged in user after about 5 mins or so forcing him to have to login in order to continue?
+2
A:
Since MVC is just like WebForms in that they both run on ASP.NET and assuming you're using Forms Authentication you can either:
Force the user to logout with
FormsAuthenitcation.SignOut()
which will clear their authentication cookie; orSet the forms authentication timeout value (default is 30 minutes). For example:
<system.web> <authentication mode="Forms"> <forms timeout="5"/> </authentication> </system.web>
BFOT
2009-07-15 05:42:10
Forms authentication and session are two separate things, although I think for what the question is asking, this will suffice.
womp
2009-07-15 05:54:27