whats proper context handling in 2013 4.1?

Whats the latest proper way to reset the session context when receiving data in the main thread? I’ve got images I need to update when new data arrives on a socket. This used to work, then sessions changed and I added this to the top of the handler where the controls had to be accessed:

dim Context as new WebSessionContext(app.SessionForControl(self.Page))

and that worked then until the latest release. With the last version 4.1 if I compile the app I get no updates for the pictures, unless I switch to another page and switch back, then they display, but only the latest data not any more updates that might arrive.

When compiled with 2013.3.2 that works perfectly, when compiled with 2013.4.1 I get nothing. Whats the official, condoned, proper way to send data to a control in a context from the main thread now?

How are you pushing the new images out to the sessions?

The control on the webpage is actually a container control generated dynamically. It contains a web picture view. Any control that wants updates from a particular stream registers itself with that stream, so the stream has an array of container control objects to call back into when it receives a new image. When a new image arrives via the socket in the main thread I walk that array and call into each one which basically does just this:

  dim Context as new WebSessionContext(app.SessionForControl(self.Page))
  //dim Context as new WebSessionContext( ObjSession)

  dim wp as new WebPicture( CurrentPic, "public.jpeg")
  wp.MIMEType = "image/jpeg"

  ThePicture.Picture = wp

where ThePicture is the name of the WebPictureView. You can see the old commented line of how I originally reset the context, and then the new one as recommended here or on the mailing list to me and now I need another way to get it properly set, or perhaps I’m going about this all wrong?

To be clear, I’m not 100% positive that it’s not something else thats wrong, but the same code compiled in 3.2 works perfectly, but does not display images in 4.1. Other controls that are not images but just included html that use the same mechanism for updates, call back and setting context also do not work so I assumed it was a change with the context. Data that comes in on the main thread does not reliably get to my context sensitive controls, but everything else that does not require the context set to work work fine.