Monday 8 February 2016

(Solved) Maximum Request length Exceed error in .Net Application

When working with file in .net which has large uploads it gives error “Maximum Request length Exceed” because default upload file size is 4MB. So if we want to upload file size greater than 4MB we need to increase size of file upload size in web.config file.
So to increase size of upload file we need to add following blocks to web.config file
  1. MaxRequestLength is given in KB and is the max size of request supported by ASP.NET
  2. MaxAllowedContentLength is given in bytes and is max length of content in a request supported by IIS.
  3. Here, Both values MaxRequestLenth and MaxAllowedContentLength properties has same value 1 GB in KB and bytes respectively
  4. If in an application both value is specified, then smaller from both value gets the priority.
For more detail you can refer,
http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded

No comments:

Post a Comment