Wait Page

G

Guest

I have an stored procedure which takes long time to execute. So I am trying
to execute the procedure in another thread by using the thread start
function. After the SP starts processing I want to take the user to a "wait"
page and then return them after the processing is over.

The wait page has http-refresh header which takes it back to the starting
page. Once the starting page has reloaded in page_load procedure I would
like to check whether the processing has finished and if not redirect back to
the wait page.

Problem is I do not know how to pass data back to the application main
thread from the secondary thread. I tried using session using
synchlock.Session, but it errors out.

I also tried to use a callback. But since the callback procedure also
executes in a secondary thread I am getting the same error.

Please help
 
G

Guest

Thanks Steve,

I have seen variant of the same approach on couple of places on the web,
one is http://www.eggheadcafe.com/articles/20050108.asp
But this approach requires that you have two asp.net pages one starting page
other the end page where the actual processing will take place. There is
nothing wrong of this method, just I was trying to avoid to split the code on
two different pages...
 
V

vMike

PinellasBoy said:
I have an stored procedure which takes long time to execute. So I am trying
to execute the procedure in another thread by using the thread start
function. After the SP starts processing I want to take the user to a "wait"
page and then return them after the processing is over.

The wait page has http-refresh header which takes it back to the starting
page. Once the starting page has reloaded in page_load procedure I would
like to check whether the processing has finished and if not redirect back to
the wait page.

Problem is I do not know how to pass data back to the application main
thread from the secondary thread. I tried using session using
synchlock.Session, but it errors out.

I also tried to use a callback. But since the callback procedure also
executes in a secondary thread I am getting the same error.

Please help
Can you just stay on the page and make the wait portion visible (and the
rest not visible) while the server is processing. One way to check for
completed process is to use cache. You can put something in cache while
processing, check for it and continue the wait page if the cache item is
still present. Once the operation is completed, clear the cache can
redisplay. Don't know if this helps or not.

Mike
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top