Is there any solution for redirect user to login page, when cookie expires?
I create formsauthenticationticket
and cookie. Expiration is set on 10minutes.
When expiration is over, and user doesn't make any request 20-minutes, and after that, clicks he on some link, he would be redirected to login page and log in again.
I have HttpModule
in assembly, which is referenced in web project.
In this module I have PreRequestHandlerExecute()
event,
where I control on every request, if the user is authenticated and refresh timeout for cookie.
But If the user is not authenticated, he would be redirect to login page.
Is there any solution for this? I know about AuthorizeAttribute
, but is there any other way to do this?
THANKS