469,917 Members | 1,474 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

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 2130
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Artem Kliatchkine | last post: by
reply views Thread by JMG | last post: by
1 post views Thread by dejavue82 | last post: by
1 post views Thread by BizWorld | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.