Friday, July 22, 2005

How to upload file(s) bigger than 4 MB in ASP.NET

The maximum file size you can upload by default is 4 MB. This can be increased in the web.config file by adding the following configuration setting:

<httpRuntime maxRequestLength="4096" />

1,024 Kiliobytes = 1 Megabyte
4096 is the default in Kilobytes. Hence; 4,096 KB is equal to 4 MB. If you want to allow files bigger than 4 MB simply add the above setting so your web.config file looks like this.


<configuration>
<system.web>
<httpRuntime maxRequestLength="4096" />
</system.web>
</configuration>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home