No Session object in context

Since Xojo 2017.2.1 I have a lots of errors in my WebApp: “Warning: No Session object in context”.

The app crashes when I read values from a session.variable. Did 2017.2.1 change something, and I had to change my sourcecode?

my code is very simple:

dim projektnummer as string = session.MZSession_Projektnummer

here I get the crash: “Warning: No Session object in context” with a Nil Exception.
but there is a content in the session.MZSession_Projektnummer

Where is that code located?

that was a good hint:

when I use the a label and the mouse down event: the code works.

it is only in a “pagereceived” event of a HTTPSocket.

[macOS 10.13, Xojo 2017r2.1, 64bit]

Right PageReceived fires on the main thread and has no idea which session it’s associated with. You’ll have to create a SessionContext before trying to access properties or controls within a particular session.

Oh. My fault. Thank you.