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:
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" />
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx