StateServer pass byref threading problem

A

Alex Brown

We are switching from InProc mode to StateServer mode and have a
somewhat unusual problem that I have not seen discussed.

Sometime we pass the session object to a thread by reference and the
thread will modify objects in the session. The thread does some work
and updates status in the session object. The client refreshes every
few seconds and checks the status (it is a long running task). This
works fine in InProc mode. However, this does not work in StateServer
mode. Changes to the session object in the thread are lost outside of
the scope of the thread.

I think I understand what is happening. Unually, asp serializes the
state at the end of the request after the form unload code is called.
My questions is, is there any way to force the session to serialize?
 
A

Alex Brown

More simply put, can I force ASP.NET to update the StateServer copy of
the session or is this only done automatically?

Any help appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top