Session.close event firing without a

Why would a session close event fire, but no session open event?

We have a web app that responds to handleURL and HandleSpecialURL, but doesn’t really to anything with sessions.

I added a log message in Session.Open and Session.close just to track any connections via a web browser, but I only get the Session.close event fire.


Likely this happens if a session could not be started properly. Eg. if you hit the web-app with a browser with JavaScript disabled, or a bot or just using curl from the commandline. In this case the request comes in, a Session is prepared, some content (with the client side framework) is returned but the client would not respond on it, so the session is not Opened. These aborted sessions are then cleaned up after the timeout, like other aborted sessions.

HandleSpecialURL has no Session context, so no Session object gets created. I can’t explain why you’re seeing a Session.Close event though. The documentation for HandleURL does not have a note about Session context, so you may need to ask someone from Xojo for clarification.

It could be that Tobias, We use a port check to monitor if the server is running which only checks for connection. Maybe that only causes a close event to clear up the fact that the session was never properly initiated.