OzanYukruk
OzanYukruk

Reputation: 205

ASP.NET File Upload, maxRequestLength

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?

Upvotes: 1

Views: 3079

Answers (1)

Giorgio Minardi
Giorgio Minardi

Reputation: 2775

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.

Upvotes: 2

Related Questions