29 June 2011

Maximum Request Length Exceeded ASP.NET

I got this error Maximum request length exceeded while i was trying to upload several files, or a single big size file. As default, max file upload size is 4MB.
We can easily have a solution by not touching our asp.net c# source code.

Just add a single line of code in your Web.config file, and you are done.

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="32768" />
  </system.web>
</configuration>


Now we will not get maximum request length exceeded error in asp.net.

2 comments:

RonyC said...

This is not a solution. It's more like a workaround. Initial problem is not solved with this.

Unknown said...

at least it got my problem solved for now ,i have sent days on this before i saw this blog
thanks man for sharing