Automatic redirect to login page after a certain time
I am using form authentication. My code in web.config is:
<authentication mode="Forms">
<forms loginUrl="~/Home/Index" timeout="5" />
</authentication>
I've used [Authorize] at the head of the actions, that need authentication
to access. As my configuration in web.config after five minutes an user is
redirected to "../Home/Index" if he/she tries to access an action or load
a page that is need authentication to access. Is there any way to do it
automatically. I mean if the system is idle, like though no one is using
the system after five minutes it will automatically redirect to
"../Home/Index" page.
No comments:
Post a Comment