Accessing session from thread



Is there a safe way to gain access to the session object from inside a
spawned thread, in ASP.NET?

I'm familiar with the principle of creating a data storage object, passing a
reference to the thread, and then adding the object to the session. But this
won't work when using StateServer because of serialization (session only
contains a snapshop of the object at the point I added it, and the changes
made by the thread occur elsewhere).

Ideally I'd like:

void MyThreadWorker()
{
HttpSession sess = somemagicroutine();
sess["counter"] = 1;
}

Thanks,

John


.



Relevant Pages

  • how to abondon session in the form authentication(Global.asax.cs)
    ... The application is using Form authentication. ... and the principle haven't been added (This event ... this time since the session ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: Authentication and sessions
    ... A session creates a short term cookie, which refers to the session variables ... the session itself for authentication. ... Other people could be using the computer and gain access. ...
    (microsoft.public.dotnet.framework.aspnet)