Session invalidated when pressing F5 in IE when Wt is a service
Added by Jonathan Lim about 1 year ago
Hi Koen
I have Wt deployed in a Win32 service and I have this issue in IE where if I press F5, the session intermittently gets invalidated. And this only happens in IE, other browsers like Chrome and Firefox are unaffected. I've prepared a very crude win32 service sample for you, that uses the hello example, so that you are able to analyze the issue. Just edit the project settings and kindly note that Boost is required. Once compiled, open a command line to the output directory and use the ff. commands:
win32_service.exe -i
This will install the service and you can access it then via the Service Manager.
win32_service.exe -u
This will uninstall the service after you're done testing.
Hope you can help me out with this one.
Thank you and regards,
Jonathan
win32_service.zip (40.8 KB)
Replies
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Koen Deforche about 1 year ago
Hey Jonathan,
Normally, F5 will stop the current session and start a new session, unless reload-is-new-session is set to false in your configuration file. Is that the case?
koen
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Jonathan Lim about 1 year ago
Hi Koen
I forgot to mention that I already have that parameter set to false in the wt_config.xml file.
Thanks!
Jonathan
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Jonathan Lim about 1 year ago
Hi Koen
Just an update, it seems that the issue doesn't occur when I set my max-request-size to 0, but then of course my buttons no longer work. So I'm thinking maybe the issue is related to requests sent to the browser. I'm not getting any errors in the log file, just a warning:
[2011-Apr-08 09:37:27.952777] 2716 [/ UJPfunPKflxnggYM] [notice] "Session created (#sessions = 1)"
[2011-Apr-08 09:37:28.030777] 2716 [/ UJPfunPKflxnggYM] [warn] "WApplication::addMetaHeader() with no effect"
[2011-Apr-08 09:37:28.046377] 2716 [/ UJPfunPKflxnggYM] [warn] "WApplication::addMetaHeader() with no effect"
[2011-Apr-08 09:37:28.537582] 2716 [/ UJPfunPKflxnggYM] [notice] "Refreshing session"
[2011-Apr-08 09:37:29.083583] 2716 [/ UJPfunPKflxnggYM] [notice] "Refreshing session"
[2011-Apr-08 09:37:30.175585] 2716 [/ UJPfunPKflxnggYM] [notice] "Session destroyed (#sessions = 0)"
Hope this helps.
Thanks and regards,
Jonathan
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Wim Dumon about 1 year ago
Hi Jonathan,
I'm looking into this, you'll get my feedback soon.
Best regards,
Wim.
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Wim Dumon about 1 year ago
Koen,
I could reproduce this. When pressing F5, the session is sometimes refreshed, sometimes destroyed and recreated. The meta-header warning is for header 'X-UA-Compatible' which is set in the WApplication constructor irrespective of the availability of JavaScript.
The behaviour is not related to Wt running as a service or as a normal application; I can also reproduce this in the normal hello world app.
Wim.
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Koen Deforche about 1 year ago
Hey,
This was a race condition between session unload and session refresh. The latest git fixes this by treating the handling of the unload event to set a short session expiration time (5 seconds).
Regards,
koen
RE: Session invalidated when pressing F5 in IE when Wt is a service - Added by Jonathan Lim about 1 year ago
Hi Koen/Wim,
I can confirm that the issue has been resolved in the latest git. Awesome work! Much appreciated. :)
Thank you very much and regards,
Jonathan