Re: Handling requests that have a long response time

Tech-Archive recommends: Fix windows errors by optimizing your registry



"SJ" wrote ...

>I have a request to the server that could take upto 10 mins to come back
> and display the results.
> I want to either
> a) Redirect to a new "Please wait" page till the processing is done, then
> redirect back to the results page , or
> b) Display a "Please wait" message on the same page that sends the request
> to the server and refresh the page to display the results.
> I know websites like orbitz and travelocity do this.
>
> Any idea how I would accomplish this?

Hi SJ,

I'm not sure if this is the "best" approach - but it is certain "an"
approach :o)

Presumably whatever you are 'triggering' is database driven? Hencing the
processing time? My thought was that perhaps if you were able to ascertain
an ID of sorts, you could keep redirecting to the same page every 10 seconds
or something sending the ID in the form or querystring, and, if this page
receives an ID then it checks the current "state" of the processing, until
it comes back and says "I'm done" it keeps refreshing every 10 seconds.

The page could easily have an animated .gif or something on it to indicate
that something is still happening.

As I said, probably not the best approach, but an approach none the less.

I've fired things off using threading before to ensure they complete, but
I've never (yet) had the need to wait around to see what the outcome was on
the same request.

I don't feel I've been much help - sorry..

Rob


.



Relevant Pages

  • Re: How to intercept error when httpRuntime maxRequestLength is ex
    ... Jos's comments of using a secondary progress window on the client to ... HttpRequest request = HttpContext.Current.Request; ... To redirect the client your server has to send back a response. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Every ASP.NET application - a multithreaded windows app?
    ... Windows Service, that would be running all the time on the server, and your ... web application would give it the request. ... whoever is processing the request, and if it is complete, display the ... >> is important, because for me, the GIF only kept animating, if the script ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Frame for Response.Driect or Server.Transfer
    ... if the result of your server side code ... > frames to other pages. ... >> code and then redirect the user somewhere else. ... >> Response.Redirect or Server.Transfer what frame to display the page in or ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: My web server is being redirected (more info)
    ... >> I host my friends site on my home server. ... >> It appears that Apache2 is redirecting the request to the loopback ... # We now support multiple apache configurations on the same server. ... # Format: Redirect old-URI new-URL ...
    (comp.os.linux.networking)
  • Re: HTTP ping pong
    ... The server responds with web page. ... This is the browser parsing the HTML, ... Sometimes there is a redirect. ... browser to request the next leg and wait for the response. ...
    (comp.lang.java.help)