Codewarp Home
Login | Site Map

Dedicated Knowledge Base

Article 163
Title Upload larger files

By default, ASP.NET permits only files that are 4,096 kilobytes (KB) (or 4 megabytes [MB]) or less to be uploaded to the Web server. To upload larger files, you must change the maxRequestLength parameter of the <httpRuntime> section in the Web.config file.

Note When the maxRequestLength attribute is set in the Machine.config file and then a request is posted (for example, a file upload) that exceeds the value of maxRequestLength, a custom error page cannot be displayed. Instead, Microsoft Internet Explorer will display a "Cannot find server or DNS" error message.

If you want to change this setting for all of the computer and not just this ASP.NET application, you must modify the Machine.config file.

By default, the <httpRuntime> element is set to the following parameters in the Machine.config file:


The Machine.config file is located in the \System Root\Microsoft.NET\Framework\Version Number\Config folder.

Modified Date 9/24/2005

    Your feedback is important to us. Please send us comments:

    Contact Us Contact Us