asp.net - Notifying the user after a long Ajax task when they might be on a different page -


I have an Ajax request for a web service that usually completes 30-60 seconds. In some cases it can take up to a few minutes. During this time the user can continue to work on other tasks, which means that they may be on a separate page when finished.

Is there a way to say that the original request is complete?

  • Wrap the web service with your own service
  • Use my web service to set a flag anywhere
  • >
  • Check that flag in the next page requests
  • Is there any better way to do this? If you are essential, then I am using jQuery and ASP.NET.

    You can add another method to your web service that will allow you to check the status of a previous request Allows Then you can use AJAX to choose web service every 30 seconds or so. You can store anything in the request ID or session, so your AJAX call knows whether to choose a request ID, no matter which page you are on.


    Comments