473,805 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What happens to Cancelled HTTP Requests


What happens to a cancelled http request from the server perspective?

Here's the scenario.

I request a page from the web server and page requires lot of processing.
Before the response comes to the browser I either hit the Stop button on the
browser or moved on to another page.

Now at the server, does it continue to process the request? or does ASP.Net
terminate the processing because the TCP connection of the HTTP requests is
longer active?

Whats the story here?

Thanks a lot.

Chandra
Nov 18 '05 #1
3 1725
ASP.NET doesn't know that the user hit the stop button, or if they
closed the browser - it will continue to toil away at the request in
hopes it can bring happiness to the user.

If you have a really processing intensive section of code you can call
Response.IsClie ntConnected in code and skip all the hard work if the
property returns false. I would not litter the code by placing these
checks everywhere though, because it would be the exceptional case
that a client has disconnected, and also because I have some doubts as
to the accuracy of the property.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 12:57:01 -0700, "Chandra"
<Ch*****@discus sions.microsoft .com> wrote:

What happens to a cancelled http request from the server perspective?

Here's the scenario.

I request a page from the web server and page requires lot of processing.
Before the response comes to the browser I either hit the Stop button on the
browser or moved on to another page.

Now at the server, does it continue to process the request? or does ASP.Net
terminate the processing because the TCP connection of the HTTP requests is
longer active?

Whats the story here?

Thanks a lot.

Chandra


Nov 18 '05 #2
Response.IsClie ntConnected will not detect the stop until data is sent to
the client (as http over tcp/ip does not do heartbeats). you would have to
turn page buffering off, and flush responses doing the processing to detect
earlier.

-- bruce (sqlwork.com)
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:lr******** *************** *********@4ax.c om...
ASP.NET doesn't know that the user hit the stop button, or if they
closed the browser - it will continue to toil away at the request in
hopes it can bring happiness to the user.

If you have a really processing intensive section of code you can call
Response.IsClie ntConnected in code and skip all the hard work if the
property returns false. I would not litter the code by placing these
checks everywhere though, because it would be the exceptional case
that a client has disconnected, and also because I have some doubts as
to the accuracy of the property.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Wed, 20 Oct 2004 12:57:01 -0700, "Chandra"
<Ch*****@discus sions.microsoft .com> wrote:

What happens to a cancelled http request from the server perspective?

Here's the scenario.

I request a page from the web server and page requires lot of processing.
Before the response comes to the browser I either hit the Stop button on thebrowser or moved on to another page.

Now at the server, does it continue to process the request? or does ASP.Netterminate the processing because the TCP connection of the HTTP requests islonger active?

Whats the story here?

Thanks a lot.

Chandra

Nov 18 '05 #3
Ah, thanks Bruce.

--
Scott
http://www.OdeToCode.com/

On Wed, 20 Oct 2004 15:26:23 -0700, "bruce barker"
<no***********@ safeco.com> wrote:
Response.IsCli entConnected will not detect the stop until data is sent to
the client (as http over tcp/ip does not do heartbeats). you would have to
turn page buffering off, and flush responses doing the processing to detect
earlier.

-- bruce (sqlwork.com)


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

92
6553
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption? cheers, reed
125
14874
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
4
3084
by: John Martin | last post by:
I am making my first attempt at a project using VBA and have hit a problem. I can find nothing to help in any book. My code is generating a message "Runtime error 2001 You canceled the previous operation." I created a relatively simple form, which allows the user to view and add details of patients. I put a filter option control on the form so that the patients could be filtered to those allocated to a chosen member of staff. This...
2
1819
by: jeffrod444 | last post by:
Hi, I've been having problems getting my forms to work correctly. If seen other threads addressing this issue, however, these are not working for me. The short of my problem is this. I am trying to open a new form and initialize it with a db query based on the info in the current form. This wasn't a problem until I changed the table's primary key to an Autonumber. tblLockCore.lockId is the autonumber at the source of the problem... ...
4
1262
by: Peter Rilling | last post by:
Okay, I need to create an HttpHandler that will process all requests to the server so that I can perform special logging. What happens if there are more than one handler registered with the same file extension? For instance, someone accesses a .aspx page. Normally that would only be handled by normal handler. What I want to do is register a handler for this extension, but also allow the normal handler to process it after I am done. I...
5
1191
by: kevin goff | last post by:
I am seeing that our CPU spikes for several minutes at 100% for the asp.net process. This happens several times a day and seems to last for 10 min or so and use a lot of memory. I'm trying to find out what page it is that is causing these problems. How can i find out what pages are executing at the time of the spike? Thanks, kevin goff kevin_goff@nospam.nospam
3
1236
by: Peter Rilling | last post by:
I believe the AppDomain can be recycled by IIS, right? When this happens, what happens to the Application and Session variables that existed for the AppDomain? Are they carried over to the new AppDomain for furture requests from the user, or are they disposed of?
0
1241
by: Ken T. | last post by:
I have questions regarding what happens on the web server side during an asynchronous web method call when the client aborts its request via .Abort() call. Background: My client app asynchronously calls a web method in a "broker" web service that I've written. My broker service method in turn synchronously calls another web service to perform backend processing. This second, synchronous call can take up to a minute to return. My...
4
9670
by: Phil Stanton | last post by:
I am opening a report (in Preview) from a menu system I use the following code if there is no data in a report Private Sub Report_NoData(Cancel As Integer) MsgBox "There are no errors in Membership Head of Families", vbInformation Cancel = True
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10613
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.