By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,734 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,734 IT Pros & Developers. It's quick & easy.

Whats the best way for a thread to update session information?

P: n/a
I'm developing a website which at one point has a hefty amount of data
processing to do. I delegate this to a separate thread and on the results
page do an auto-refresh every few seconds until the results are available.

In my thread I take a reference to the page that invoked the thread, so that
I can get access to the session object. The thread writes to the session to
indicate that it has finished. This all worked fine, until I decided to
switch from InProc to StateServer. Whilst I don't get any errors, it behaves
as though the session object my thread is referencing is different to the
one that my results page is referencing and my communications therefore
don't work any more.

So, my question is, what is the best way for a thread to get access to the
current session object?

(I'm sure it should be sooo easy but ....)

thanks in advance,

Brian.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
Brian,

I am not sure if I understand you, however if I do.

I don't see the sence of what you are doing, you are creating probably a
bunch of overhead to tell the client that he has to watch what is mostly
done by a WaitCursor.

However your pages are stateless, which means that as soon that you do the
sent, the page is gone out of memory, with all that belongs to him except
the session information, his extra threads are left alone.

Maybe can you do what you want by creating an extra windowservice or
webservice which than can return the information because of a session.id

As I said, be aware that you are creating a bunch of overhead, where your
user has to wait for. A webserver is not a one to one operating process, it
should be able to handle an enormous amount of clients.

I hope this gives some idea's,

Cor
Nov 21 '05 #2

P: n/a
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
Brian,

I am not sure if I understand you, however if I do.

I don't see the sence of what you are doing, you are creating probably a
bunch of overhead to tell the client that he has to watch what is mostly
done by a WaitCursor.

However your pages are stateless, which means that as soon that you do the
sent, the page is gone out of memory, with all that belongs to him except
the session information, his extra threads are left alone.

Maybe can you do what you want by creating an extra windowservice or
webservice which than can return the information because of a session.id

As I said, be aware that you are creating a bunch of overhead, where your
user has to wait for. A webserver is not a one to one operating process,
it should be able to handle an enormous amount of clients.

I hope this gives some idea's,

Cor


I don't mean to appear dense, but how does one implement a WaitCursor for a
web page? I've only seen it used on desktop applications (where session
isn't an issue anyway).

thanks,

Brian.
Nov 21 '05 #3

P: n/a
Brian,

AFAIK is in in most cases (there are exceptions) in ASPNET automatic when
the page is waiting for a postback.

Cor
Nov 21 '05 #4

P: n/a
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...
Brian,

AFAIK is in in most cases (there are exceptions) in ASPNET automatic when
the page is waiting for a postback.

Cor


Never seen it, and I don't want to risk the browser timing out.
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.