03-25-2024, 01:54 AM
Hi,
I have an IW application which is sometimes called with a parameter in the URL.
https://mycompany.com/$/start/myparam
The first time I call this it works fine. In the ServerController the BeforeDispatch event is called, then AfterDispatch, then UserSessionBaseCreate,
then ServerControllerBaseNewSession, then the main form is displayed.
But, the second time I call it only the ServerController BeforeDispatch and AfterDispatch events are fired. Nothing else. Then the browser displays a 404 error. If I open a second tab in the browser and clear the cache I can return to the first tab, refresh it and everything is normal.
In the ServerControllerBeforeDispatch event, I am setting aReply.AllowCaching to false. I've also experimented with including the following lines:
// aReply.Headers.Add('Cache-control: no-cache');
// aReply.Headers.Add('Cache-control: no-store');
// aReply.Headers.Add('Pragma: no-cache');
// aReply.Headers.Add('Expires: 0');
None of them make any difference. Subsequent calls to https://mycompany.com/$/start/myparam result in a 404 error. This lasts until either the browser cache is cleared or the IW server is restarted.
Any ideas?
Thanks,
Tim
I have an IW application which is sometimes called with a parameter in the URL.
https://mycompany.com/$/start/myparam
The first time I call this it works fine. In the ServerController the BeforeDispatch event is called, then AfterDispatch, then UserSessionBaseCreate,
then ServerControllerBaseNewSession, then the main form is displayed.
But, the second time I call it only the ServerController BeforeDispatch and AfterDispatch events are fired. Nothing else. Then the browser displays a 404 error. If I open a second tab in the browser and clear the cache I can return to the first tab, refresh it and everything is normal.
In the ServerControllerBeforeDispatch event, I am setting aReply.AllowCaching to false. I've also experimented with including the following lines:
// aReply.Headers.Add('Cache-control: no-cache');
// aReply.Headers.Add('Cache-control: no-store');
// aReply.Headers.Add('Pragma: no-cache');
// aReply.Headers.Add('Expires: 0');
None of them make any difference. Subsequent calls to https://mycompany.com/$/start/myparam result in a 404 error. This lasts until either the browser cache is cleared or the IW server is restarted.
Any ideas?
Thanks,
Tim