<<Go
to FAQ's section
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
|