473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ERROR_INTERNET_CONNECTION_ABORTED when handling BeginRequest

Hello

I'm using .NET Framework v2.

I'm trying to cancel the request writing a BeginRequest handler in
Global.asax.
Here is sample code:

// Just some condition to check - in this sample checking for request size
int maxRequestLengthBytes = 2000;
if (Request.ContentLength maxRequestLengthBytes)
{
Response.Clear();
Response.StatusCode = 200;
Response.Write(@"<html><head></head><body></body></html>");
Response.Flush();
if (Context.ApplicationInstance != null)
Context.ApplicationInstance.CompleteRequest();
return;
}

Instead of return code 200 IE gets ERROR_INTERNET_CONNECTION_ABORTED and
retries the request. What am i doing wrong? Any help is appreciated.
Thanks in advance.
Aug 27 '07 #1
0 2928

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

Similar topics

0
by: Sjaakie | last post by:
Hello, On BeginRequest event I check and set user language settings. First I check for browser's accepted languages and set Cultureinfo. If browserlanguage is not supported, CultureInfo is set to...
2
by: NET_NET_2003 | last post by:
Hi, I have programmed a module, but I have a small problem. I need to call a method but after the data has been sent to the client (or when the client is disconnected). Which event can I use? and...
1
by: Juan Stang | last post by:
I'm trying to implement some kind of page controller, a class that will intercept all incoming requests and route them appropriately. More specifically, I'd like to intercept a request for a...
25
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
3
by: Alan Silver | last post by:
Hello, I have some pages that are protected by forms authentication, and am adding code to the global.asax so that if someone tries to load (say) /order83.aspx, if they are logged in, it will...
4
by: Al Williams | last post by:
Hi, I have error handling in place throughout my application. I also start the application wrapped in error handling code to catch any unexpected exceptions (i.e. exceptions that occur where I...
0
by: Artur | last post by:
I'm trying to write a code that will change prefix (http to https and vice versa). It half works now, because I can reach Application_BeginRequest method in Global.asax file only when NOT in...
0
by: Artur | last post by:
After trying to solve this, I noticed another strange thing. When in secure connection Page_Load method of page is not invoked (Load event not fired). I looked where this method is assigned to this...
2
by: Patrice | last post by:
It looks like we have sometimes a very significant delay (for example 10 s and sometimes more) between the beginrequest and page_load event. It would make me think of some kind of locking issue...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.