I know we have form authentication to set loginUrl and when session expires it automatically redirects to this URL.
I have a requirement where I have to show different page on session expiration not login.aspx
I was searching for it but did not find any suitable easy to implement solutions.
I can't prefer to change to existing deployed site code behind and client want to implement this new SessionExpired.aspx page
I read http://www.schnieds.com/2009/07/aspnet-session-expiration-redirect.html , they have nice solution but I have to make change in .cs file that I don't want to do at least until I get any easy solution.
Is there any easy way to redirect to session expire page after form authentication timeout without redirecting to loginUrl?
After creating the SessionExpired.aspx
page you need to add just a single line in head section in aspx (not .cs) of your pages. (I hope you have implemented master pages, so it will be added only at the master page)
<meta http-equiv="refresh"
content="1201;url=http://yourdomain.com/SessionExpired.aspx" />
This line will automatically redirects the browser to SessionExpired page after 1201 seconds, ie 20 minutes
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.