![]() |
Timeout response - 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: Timeout response (/thread-931.html) |
Timeout response - lfeliz - 02-02-2019 Hello, I am looking form some info on setting a timeout response. I in IW 11 it was in server controller, but I have really worried about since then, but now i am looking to implement a nicer error message. Which Demo for IW 14 or 15 shows this? RE: Timeout response - lfeliz - 02-02-2019 Found the right demo after looking through them again... XIV\CustomizingExceptions RE: Timeout response - lfeliz - 02-02-2019 It seemed straight forward enough, place the files in the templates folder, but its not always showing my IWError.html , IWExcepion.html or IWSessionTimeout.html ..... I test it waiting for few seconds after session timeout and message displays. Wait for a minute to pass and I get the stock Session is invalid - specified session does not exist. Any ideas? RE: Timeout response - Jose Nilton Pace - 02-03-2019 Hi, try this demo. It's much better to handle SessionTimeout. RE: Timeout response - lfeliz - 02-05-2019 Yes. I think I will add that as well as that will be the easiest and will also avoid a few emais/calls. Cheers! RE: Timeout response - ioan - 02-07-2019 (02-02-2019, 07:10 AM)lfeliz Wrote: Hello, I found this somewhere in an older forum, not sure who the author was, but this is how I handle session timeouts now and works perfect: Quote:TIWServerController's SessionTimeout property defines the time of inactivity, in minutes, after which a session is automatically destroyed. RE: Timeout response - Jose Nilton Pace - 02-08-2019 Hi Ioan. Every Form has a property KeepAlive, just set it to true. IW can do this for you in the same way as you said to put iwtimer in all forms. Remove the iwtimer and set KeepAlive := True; RE: Timeout response - ioan - 02-08-2019 (02-08-2019, 09:51 AM)Jose Nilton Pace Wrote: Hi Ioan. Every Form has a property KeepAlive, just set it to true. Hi Jose, Is there a event handler for the KeepAlive messages? In my implementation I count how many times the HeartbeatTimer timer fires and for some parts of the web application I allow it to time out, something like this: Code: procedure TformUserMenu.HeartbeatTimerAsyncTimer(Sender: TObject; EventParams: TStringList); RE: Timeout response - DanBarclay - 02-09-2019 More on what Jose said on KeepAlive. Note that it's the *form* KeepAlive that you are looking for. Don't confuse with the HttpKeepAlive in the servercontroller. Keepalive looks at the session timeout value and sends 3 or 4 messages during that time to keep the session from timing out. I've used this and it works great, keeping the session active so long as the window is active. Except: On mobile browsers, if the form isn't active it does not want to process the KeepAlive in background like a normal browser (at least that was the case when I last checked a year or so ago). Dan |