473,387 Members | 1,572 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,387 software developers and data experts.

When does the httpRuntime maxRequestLength setting kick in?

Hi all

I'm developing a site where visitors can upload images (using the html file
input control). As most webhosting companies set a monthly bandwidth limit I
want to try and limit the size of uploads.

I thought about using the <httpRuntime> "maxRequestLength" setting, which
throws an exception if a HTTP request is too large. Does anyone know if this
will work, or will it occur too late in the request lifecycle. I.E. will the
webhost's bandwidth monitor "capture" the request before ASP.Net (or IIS?)
rejects the request length?
Many thanks
Andy
May 8 '06 #1
1 2307
maxRequestLength is used to monitor the input stream (upload). if the max
length is hit, then asp.net closes the request stream giving the browser an
error. so if you max was set a 2mb, and the user tried to upload a 4mb file,
they would get an error in the middle of their upload, and your webhost
would charge you for 2mb of bandwidth.

-- bruce (sqlwork.com)

"Andy Stephens" <an*************@cheshire.gov.uk-donotspam> wrote in message
news:98**********************************@microsof t.com...
Hi all

I'm developing a site where visitors can upload images (using the html
file
input control). As most webhosting companies set a monthly bandwidth limit
I
want to try and limit the size of uploads.

I thought about using the <httpRuntime> "maxRequestLength" setting, which
throws an exception if a HTTP request is too large. Does anyone know if
this
will work, or will it occur too late in the request lifecycle. I.E. will
the
webhost's bandwidth monitor "capture" the request before ASP.Net (or IIS?)
rejects the request length?
Many thanks
Andy

May 8 '06 #2

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

Similar topics

26
by: Simon | last post by:
I'm doing a survey. When do you think GNU/Linux will be ready for the average Joe? What obstacles must it overcome first?
0
by: JMG | last post by:
Hi everybody, When the file size is larger than about 16 Mo, the download stops without any error message. private void download (string strFullName, string strName) { Response.Clear (); ...
1
by: Artem Kliatchkine | last post by:
Hi All, HttpRuntime settings such as executionTimeout are normally set in Web.config. Is it possible to change them at runtime? I have a rarely executed method which works long time (sometimes...
0
by: JMG | last post by:
Hi everybody, When the file size is larger than about 16 Mo, the download stops without any error message. private void download (string strFullName, string strName) { Response.Clear (); ...
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...
2
by: TheBurgerMan | last post by:
Hi all. I am using W2K3, .NET2 on a machine running AD and Exchange. I started getting the message below last week. I googled the error and not much was returned, but I did find this;...
1
by: dejavue82 | last post by:
Hi, What is the maximum value I can set to the following web.config property to? <httpRuntime executionTimeout=""> I'm asking, since I'm not sure if there is a setting on my host's shared...
8
by: Newcomsas | last post by:
Hello. I'm experiecing a problem with file uploads from ASP pages. On a Windows 2000 - IIS 5 server we're running an ASP Classic application that features an upload form for files of great...
1
by: BizWorld | last post by:
I am trying to cache a full DROP Down that can have lot of values. so i have 500 site users hitting a page in a second. i need to cache some controls that does not change quite often during the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.