Re: How to use HttpSessionState with SqlState

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



not really. with non inproc state servers the following happens

BeginRequest

deserialize Session Store to new Session Object

request processing

serialize Session object to Session Store
End Request

this means if you hold a reference to a Session object in a background
thread you can read it, but updates won't be refected in the store. with the
inproc, no serialization happens, a reference is passed around, so its
always the same object.

you should create a background request queues, with a pool of request
threads. use an input and output queue.

then your page processing looks like:

client request
queue up long request request
store reqid in session
return to client

client poll
if reqid not done return to client
else
remove response for reqid from queue
process response
return to client

-- bruce (sqlwork.com)













"forinti" <forinti@xxxxxxxxx> wrote in message
news:1127511004.725436.314260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Is it possible to use the Session object, with SqlState, when outside
> of a request scope?
>
> I have some very slow queries that I fire asynchronously, while the
> user sees a wait page. Therefore, when my results are ready, I don't
> have HttpContext.Current. Even though I can save a reference to the
> current Session object, I'm not sure I can rely on it, since I have
> SqlState configured (actually I'm still developing with InProc).
>
> Any help with this will be greatly appreciated.
>
> Thanks.
>


.



Relevant Pages

  • Re: httphandler and session state
    ... As I mentioned in your previous request, you need to implement a placeholder interface: ... IReadOnlySessionState // or IRequireSessionState if you want write access ... > I'm having problems to access my variables stored in Session Object, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to instantiate HttpRequest Object in class level
    ... In the below code i am instantiating the request and session object at ... HttpServletRequest request; // Returns Null Pointer Exception ... Java you use 'new' to make a new instance of an object: ...
    (comp.lang.java.programmer)
  • How to instantiate HttpRequest Object in class level
    ... In the below code i am instantiating the request and session object at ... Is it possible to instantiate a request object at class level. ... // Returns Null Pointer Exception ...
    (comp.lang.java.programmer)
  • Re: Handle Http Session
    ... One way is the Session object, which is by far the easiest method. ... It might sound like a good idea to store the database connection in the Session object, but that's really one of the worst things one can do. ... The session object lingers around for 20 minutes after the last HTTP request, so that would basically swamp your database with connections. ...
    (microsoft.public.dotnet.languages.csharp)