Uploading file size over 4 MB in .NET

Matt Schaeffer picture Matt Schaeffer · Aug 23, 2011 · Viewed 8.1k times · Source

I am having trouble uploading a file size over 4 MB. I've tried adding

<httpRuntime maxRequestLength="102400" executionTimeout="99999" />

to my Web.Config like many posts have suggested, but it just isn't working. Files under 4 MB work just fine, so I'm nearly certain I'm running into the 4 MB limit. Are there any settings in IIS that I might need to change?

Answer

Chris B. Behrens picture Chris B. Behrens · Aug 23, 2011

You need to update the value of maxrequestlength in the web.config:

Maximum value of maxRequestLength?

Max Request Length