1

My ASP.NET application is running on IIS6. Today one of our customers encountered an error after trying to upload a file with 35MB of size.

Normally, maxRequestLength is set to 102400 (100MB) in our web.config, so there was something wrong about this issue.

Upon googling, I've noticed maxAllowedContentLength property, clearly denoting that It works on IIS7 (as i've written above, my application is running on iis6).

Strangely, now when a user tries to upload a file, maxAllowedContentLength value is taken into consideration and not maxRequestLength.

Using maxAllowedContentLength has solved my issue, but I'm kinda confused about how it worked. (IIS version difference) Any idea about how this has worked?

2
  • Are you sure It's not a framework question ? Commented Feb 15, 2012 at 19:35
  • umm Yeah? Somehow maxRequestLength is getting by-passed. Commented Feb 15, 2012 at 19:39

1 Answer 1

2

that's a strange behaviour, as you said if you're using IIS6 the correct setting to edit is maxRequestLength , btw consider that this is present in the machine.config as well. Also, the executionTimeOut (and incidently the maxRequestLength) is ignored when you're in debug mode.

Sign up to request clarification or add additional context in comments.

3 Comments

Yeah, at first when i was in debug mode everything seemed ok. But then I was able to pinpoint the issue at live. The only thing I can think of is, we're using telerik's radUpload component, and previous developers have assigned both the httpHandler and httpModule of it both in <system.web> and <system.WebServer>
Now that I think of it, compilation debug is set to true in our application. So both the executionTimeOut and maxRequestLength is ignored. So It should take 4MB as default maxRequestLength, but I'm pretty sure they've been uploading files between 10-20 MB. Now things got more complicated.
Found that aswell, default maxAllowedContentLength is 28.6MB it says, now things are clear. Thanks for reminding me about compilation mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.