Fri, 17 May 2024


How to increase the request size limit and make possible the upload of larger files?

By: Anton, NetArt Media
Thu, 15 July 2021

If you ever used the ASP.NET file upload control you may be have noticed that if you try to upload a file which size exceeds 4MB, the upload fails.

The reason for this is the ASP.NET precaution against denial-of-service attacks which by default limits the size of the requests at 4MB.

However if in your application you need to upload larger files you may increase this limit, by simply modifying the maxRequestLength attribute in your machine.config file.


<httpRuntime ... maxRequestLength="[Your Value]" ... />


Category: Web Development
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox