element-it.com home page
   Home / FAQ / RequestFiltering-requestLimits-maxAllowedContentLength  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


  "The request filtering module is configured to deny a request that exceeds the request content length."





I got error "The request filtering module is configured to deny a request that exceeds the request content length" at IIS 7.

SUMMARY

This problem occurs because by default in IIS 7 enabled requestFiltering that have MaxAllowedContentLength property. It specifies, in bytes, the maximum length of content in a request. The default is 30000000 (approximately 30 megabytes.)

SOLUTION

To change this value you must include following code in your Web.config file if you want to apply this setting only to you application. If you want to change this setting for all of the computer and not just this ASP.NET application, you must modify the Machine.config file. By default, the element is set to the following parameters in the Machine.config file: The Machine.config file is located in the \System Root\Microsoft.NET\Framework\Version Number\CONFIG directory.



If you have error that requestFiltering cannot be overriden you must edit mashine.config file and change string
<section name="requestFiltering" overrideModeDefault="Deny" />
to <section name="requestFiltering" overrideModeDefault="Allow" />

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 Developer Network:
http://msdn2.microsoft.com/en-us/library/ms689462.aspx


    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.