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:

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

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

    ReplyDelete

Note: Only a member of this blog may post a comment.