Monday, February 7, 2011

What is maximum upload file size in asp.net, and how to set up, MaxRequestLength

What is maximum upload file size in asp.net, and how to set up,  MaxRequestLength
You can change this setting in web.config:
<system.web>
  <httpRuntime  maxRequestLength="102400" executionTimeout="360"/>
</system.web>

If this attribute set to limited size, can be used to prevent denial of service attacks (DOS).

Default value:  4096 (4 MB).
Maxium size:  1048576 (1 GB) for .NET Framework 1.0/1.1 and 2097151 (2 GB) for .NET Framework 2.0.

Reference:
http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength.aspx