How to stop server-side processing when the user clicks the browser stop button (ASP.net C #)

I remember, I could easily do this in PHP, but cannot find the answer for ASP.Net. I have a web application that connects to a Pop3 server to download emails when a user clicks a button or at set intervals. This process can take a very long time, depending on the number of emails downloaded. I noticed that when I click the browser stop button, the process continues to download emails, not allowing the user to go to another page. I tried the Response.IsClientConnected property, but it does not seem to work.

Any help would be greatly appreciated.

+4
source share
1 answer

You can not. The stop button in the browser stops showing the answer. The server, however, will continue to create a response until it is complete.

+3
source

All Articles