Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 825
Product
FileUp
Version
5 and above
Title
Error: "System.Web.HttpException: Maximum request length exceeded"
Problem

When uploading large files in .NET, the following error may be received:

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

This error relates to ASP.NET's maxRequestLength setting. By default, ASP.NET limits requests to 4096 kilobytes (or 4 MB), as explained in this Microsoft KB article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626. This error will occur if an upload is larger than 4 MB and you have not adjusted the maxRequestLength setting for your application in web.config or machine.config.

Solution

FileUp Standard Edition can accept uploads of up to 4 gigabytes. FileUp Enterprise Edition can accept unlimited size uploads. However, when using the product in .NET, it is important to configure the application settings to make sure ASP.NET doesn't block the large uploads before FileUp can process them.

The maxRequestLength parameter is set in the httpRuntime section of web.config (or machine.config). maxRequestLength is set in kilobytes. So, for example, if you want to allow uploads of 100 MB, you would set maxRequestLength to 102400.

There are some other settings in httpRuntime which you may want to modify for large uploads. Below is an example httpRuntime element. Please adjust the settings according to the needs of your application.

 
 
<httpRuntime 
      executionTimeout="1200" 
      maxRequestLength="102400" 
      useFullyQualifiedRedirectUrl="false" 
      minFreeThreads="8" 
      minLocalRequestFreeThreads="4" 
      appRequestQueueLimit="100" />

For more information about various ASP.NET application settings which apply to large uploads, see the FileUpEE or FileUpSE documentation:

FileUpEE - Large Uploads in ASP.NET:
http://support.softartisans.com/fileupeev4/doc/dotnet/aspdotnet_largeuploads.asp

FileUpSE - large uploads in ASP.NET:
http://support.softartisans.com/docs/fileupv4/prog_g_dotnet_largeuploads.htm

Created : 4/22/2004 8:35:51 PM (last modified : 4/24/2012 4:03:56 PM)
Rate this article!
 
Comments