I dont want to refresh or set the timer in javascript. I want to redirect to Login page when session timeout.
Did it occur to you that what you ask is not possible? The web is stateless, Session timeout is an evenet that occurs on the webserver, not on the client!
Marked as answer by Qi Wu - MSFT on May 15, 2012 04:09 PM
Btw, if anyone is reading this, that doesn't work as it will refresh whether the user is idle or not.
I used a webservice.
Timer on client --> call to websbervce --> webservice checks session ---> retrurns true/false --> if false do a window.location.href = 'tothelooginURL';
hans_v
All-Star
35998 Points
6551 Posts
Re: Redirect to login page when session expires
May 10, 2012 09:54 AM|LINK
Did it occur to you that what you ask is not possible? The web is stateless, Session timeout is an evenet that occurs on the webserver, not on the client!
WelshBoy
Member
4 Points
2 Posts
Re: Redirect to login page when session expires
Nov 14, 2012 03:01 PM|LINK
Thanks for some very amusing dialogue. That was a good answer mishra, so thanks for that. I put it into the master page and it worked a treat.
Shirish, you don't have access to the server objects that's why you can't do it in the Session_End as Hans tried to point out several times.
I wonder what your final solution was?
Thanks.
WelshBoy
Member
4 Points
2 Posts
Re: Redirect to login page when session expires
Nov 19, 2012 10:57 AM|LINK
Btw, if anyone is reading this, that doesn't work as it will refresh whether the user is idle or not.
I used a webservice.
Timer on client --> call to websbervce --> webservice checks session ---> retrurns true/false --> if false do a window.location.href = 'tothelooginURL';
Thanks.