Session.close event firing without a session.open

  1. 5 months ago

    Lee B

    Jan 9 Pre-Release Testers, Xojo Pro

    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.

    Lee

  2. Tobias B

    Jan 9 Pre-Release Testers, Xojo Pro Bern, Switzerland

    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.

  3. Tim P

    Jan 9 Pre-Release Testers Rochester, NY
    Edited 5 months ago

    http://docs.xojo.com/WebApplication.HandleSpecialURL
    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.

  4. Lee B

    Jan 10 Pre-Release Testers, Xojo Pro

    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.

    Lee

or Sign Up to reply!