Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Wait Page

Reply
Thread Tools

Wait Page

 
 
=?Utf-8?B?UGluZWxsYXNCb3k=?=
Guest
Posts: n/a
 
      01-26-2005
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

 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      01-26-2005
The simplest example I've seen for such a page is this:
http://www.aspnetpro.com/NewsletterA...200308bm_l.asp

--
I hope this helps,
Steve C. Orr, MCSD
http://SteveOrr.net


"PinellasBoy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      01-26-2005
The future will hold new options:
http://www.devx.com/dotnet/Article/26747

You also might consider using a queue and a windows service to handle such
background tasks. This design could improve scalability.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"PinellasBoy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
>



 
Reply With Quote
 
=?Utf-8?B?UGluZWxsYXNCb3k=?=
Guest
Posts: n/a
 
      01-26-2005
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...

"Steve C. Orr [MVP, MCSD]" wrote:

> The simplest example I've seen for such a page is this:
> http://www.aspnetpro.com/NewsletterA...200308bm_l.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD
> http://SteveOrr.net
>
>
> "PinellasBoy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >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
> >

>
>
>

 
Reply With Quote
 
vMike
Guest
Posts: n/a
 
      01-27-2005

"PinellasBoy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LWP user agent grabs the intermediate wait page after POST intead ofthe actual result page bhabs Perl Misc 2 02-13-2008 01:55 AM
How to make "fork/wait" to WAIT longer? Huey C Programming 1 03-01-2004 02:01 PM
Does ASP.NET wait for the entire request body before executing the ASP page? Peter Strĝiman ASP .Net 2 10-28-2003 05:59 PM
please wait.. page joe kenney ASP .Net 1 08-14-2003 07:06 PM
Implement a Please Wait Page Stephajn Craig ASP .Net 4 07-25-2003 06:13 AM



Advertisments