Is there a way to simulate "activity" to keep a WebDirect session active beyond the time limit specified in the admin console?
You'd have to do that from the context of the session, so it has to be client side, and less than the time out window. What action would be safe to perform? You might have macro that opened a menu and then closed it to simulate a user doing that.
Hello @titanpricer , welcome to Thesoup !
It used to be possible to edit the webd.conf file, but this is no longer possible.
As @Malcolm suggests, you’d need to do it either within the session or use a reverse proxy using something like Apache to keep the session alive within the session or proxy persistence. Of course this would be unsupported and we’ve never tried it.
Agreed about doing something on the client side.
I've been wondering if there's any potential for having a (small) webviewer on the layout which uses JavaScript to do the task.
My first stab at it would probably be using window.setInterval
to trigger a very simple FMP script via FileMaker.PerformScriptWithOption
.
If that didn't work, a greater hack would be to load an html file into the webviewer that would also use window.setInterval
to trigger an action, but instead of using the more standard/robust FileMaker.PerformScriptWithOption
, it would query the DOM to find a known button element, and simulate a click on the button. The button would need to be hooked up to a trivial script that runs, but does nothing consequential. In order to make this work, the html file loaded into the webviewer would need to be hosted from the same server as WebDirect, so as to not cause a cross-origin violation.
Both methods would require editing any layout that needed to be kept alive. The second one, is obviously much more of a hack-like approach. I have used that hack in the past just for fun, but not in an actual production environment. The trickiest part is probably writing the selector/code that will find the button within the DOM, because the page code in WebDirect is not straight-forward to parse.
Understatement of the year.
WebDirect has the worst case of Div-itis I've ever seen.
Hi @titanpricer
You can do this by editing the wpe.prefs file in your FileMaker Server configuration.
The location of this file on windows and mac is:
FileMaker Server / Web Publishing / publishing-engine / conf / wpe.prefs
The line you want to add/edit is:
server/parameters/config/iwp-session-timeout=46800000
The session timeout is in milliseconds. So above 46,800,000 is 780 minutes (13 hrs).
Have been using this for a few years on a client solution without issues.