element-it.com home page
   Home / FAQ / System.Web.HttpException: Maximum request length exceeded  ContactsContacts  RSS feeds. Element-IT software news and release information.RSS 

LiveZilla Live Help
Industry leading company in multiple file upload      
and management solutions since 2002.

 
 
 






    Access to the path is denied    [System.Web.HttpException: Maximum request length exceeded]    OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown    System.Web.HttpException Request timed out    RequestFiltering-requestLimits-maxAllowedContentLength  
FAQ


  "System.Web.HttpException: Maximum request length exceeded"





I got error "System.Web.HttpException: Maximum request length exceeded"

SUMMARY

This problem occurs because the default value for the maxRequestLength parameter in the <httpRuntime> section of the Machine.config or Web.Config file is 4096 (4 megabytes). As a result, files that are larger than this value are not uploaded by default.

SOLUTION

To resolve this problem, use one of the following methods:

  • In the Machine.config file, change the maxRequestLength attribute of the <httpRuntime> configuration section to a larger value. This change affects the whole computer.
  • In the Web.config file, override the value of maxRequestLength for the application. For example, the following entry in Web.config allows files that are less than or equal to 1 GB to be uploaded:
Max value for maxRequestLength attribute is "1048576" (1 GB) for .NET Framework 1.0 or 1.1 and "2097151" (2 GB) for .NET Framework 2.0.

MORE

Note During the upload process of large files, built-in ASP.NET loads the whole file in memory before the user can save the file to the disk. Therefore, the process may recycle because of the memoryLimit attribute of the processModel tag in the Machine.config file. More info you can find in Microsoft KB article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626

PowUpload ASP.NET control handles and stores the contents of the POST request to a file on the server hard disk rather than loading it into memory as the built-in ASP.NET upload support does. So you willn't have problems with memory use while uploading large files.

REFERENCES

Microsoft KB Article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626


    Access to the path is denied    [System.Web.HttpException: Maximum request length exceeded]    OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown    System.Web.HttpException Request timed out    RequestFiltering-requestLimits-maxAllowedContentLength  
ContactsContact Us RSS feeds. Element-IT software news and release information.RSS Privacy  [+]Feedback  Site Map
©2002-2010 Element-IT Software. All Rights Reserved.