Redirect on session timeout - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Redirect on session timeout (/thread-2370.html) |
Redirect on session timeout - PDSBILL - 04-16-2021 I have a Isapi intraweb app that when a sesssion timeout occurs i want to terminateAndRedirect to a specific URL not restart the sesssion I have tried using OnSessionRestarted, but the terminateAndRedirect access violates. Is there another way to do this? RE: Redirect on session timeout - DanBarclay - 04-16-2021 One option that comes to mind is to turn on the Form.Keepalive, then set up your own mechanism to time out the session. That will give you an event you can code. https://www.atozed.com/forums/thread-1040-post-2948.html I don't believe there is currently a "BeforeSessionTimeout" event, but that might be worth considering somewhere in the future (@Alex)? It may already be there and I might not have kept up with that. Dan RE: Redirect on session timeout - Jose Nilton Pace - 04-16-2021 Hi, see this demo: https://github.com/Atozed/IntraWeb/blob/master/XIV/Delphi/HandleSessionTimeout/ServerController.pas Code: class function TIWExceptionRendererEx.RenderHTML(AException: Exception; RE: Redirect on session timeout - DanBarclay - 04-17-2021 Thanks Jose, I didn't remember that being in there. I'll have to give it a try and add it to my cheat sheet. Dan RE: Redirect on session timeout - Alexandre Machado - 04-23-2021 (04-16-2021, 05:59 PM)PDSBILL Wrote: I have a Isapi intraweb app that when a sesssion timeout occurs i want to terminateAndRedirect to a specific URL not restart the sesssion OnSessionRestarted occurs after a new session is created in response to a new request, meaning that you can't actually handle a session timeout from there. If A better way to handle this is handling the exception using the example that JNP posted above |