Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with cache and 404 error
#1
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
Reply
#2
I think you are using path info as a parameter.

If you need to pass a parameter, use a parameter not path info.

URL parameters (or query fields) are passed as:

https://mycompany.com/$/start/?myparam

Parameters passed that way - as true parameters - are not cached.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)