5

I remember I could easily do this in PHP but can't seem to find an answer for ASP.Net. I have a web app that connects to Pop3 server to download emails when a user clicks a button or at set intervals. This process can take a very long time to finish depending on the number of emails to be downloaded. I noticed that when I click the browser stop button the process still continues to download emails preventing the user from navigating to another page. I have tried Response.IsClientConnected property but it doesn't seem to be working.

Any help would be highly appreciated.

1
  • Actually php does it by default but you can override it by setting ignore_user_abort(true).
    – Steven
    May 17, 2011 at 10:05

1 Answer 1

5

You can't. The stop button in the browser will only stop rendering the response. The server however, will keep building the response till it's complete.

1
  • True, you have to move to another page or close your browser to forcefully close the connection (Therefore have Response.IsClientConnected return true)
    – Polity
    May 17, 2011 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.