Session time out
-
Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari
-
Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari
Thats because the session hasn't ended and just timed out. If you close the browser window you should be able to see the event being fired.
-
Hi, I'm trying to write something on Session Timeout. I want to display a message box before it redirects the page to the login page. I'm using .ASP net.I have configure the web.config under the sessionstate as timeout 1 min, but the Session_OnEnd event I wrote doesn't fire. Can anyone help me on it? Thanks in advance, Chiari
You can't interact with the user in any way from the Session_OnEnd method. You can't display a message box. You can't redirect any page as there is no page that is created. Once the page is sent to the browser, the server knows nothing about the page. There is no connection from the server to the page, so you can't do anything to the page once it is sent to the browser. It doesn't help that the page is still shown in the browser, the server doesn't know that. I'm sure that the Sesson_OnEnd event fires just fine, but you are trying to do something that simply is not supported by the http protocol. --- b { font-weight: normal; }
-
Thats because the session hasn't ended and just timed out. If you close the browser window you should be able to see the event being fired.
-
You can't interact with the user in any way from the Session_OnEnd method. You can't display a message box. You can't redirect any page as there is no page that is created. Once the page is sent to the browser, the server knows nothing about the page. There is no connection from the server to the page, so you can't do anything to the page once it is sent to the browser. It doesn't help that the page is still shown in the browser, the server doesn't know that. I'm sure that the Sesson_OnEnd event fires just fine, but you are trying to do something that simply is not supported by the http protocol. --- b { font-weight: normal; }
-
Is there a solution for me? I want the message box to be show and redirect to the login page after the session time out. Thanks, Chiari
You can't send anything from the server to the client without the client asking for it. You could request the status from the server periodically, but then the session would never time out, so you would have to manage the timeout completely by yourself. --- b { font-weight: normal; }