File upload size limit

Release 1.0 - ...

By default, the ASP.NET File Upload control accepts files up to a size limit of 4MB. Uploaded files larger than the size limit are rejected. The size limit is configurable through an optional child element of the httpRuntime section of the web.config configuration file:

  CopyCode image Copy Code
<system.web>
  <httpRuntime  maxRequestLength="102400" executionTimeout="360"/>
</system.web>

maxRequestLength
Limits the file upload size for ASP.NET application. The size is specified in kilobytes. The default is 4096 (4 MB). The maximum value is 2097151 (2 GB) for .NET Framework 2.0.
This limit can be used to prevent denial of service attacks that are caused, for example, by users posting large files to the server. If the threshold is exceeded, a ConfigurationErrorsException is thrown.
 
executionTimeout
Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.
This time-out applies only if the debug attribute in the compilation element is False. If the debug attribute is True, to help avoiding application shut-down while you are debugging, do not set this time-out to a large value.
The default is 110 seconds.
 

Note: the httpRuntime element exposes many other attributes. For a complete list, see the MSDN documentation.