June 19th, 2009

You are currently browsing the articles from Information City written on June 19th, 2009.

IIS file size upload limit

There are articles posted regarding the abovementioned subject. I just received a request to increase the file upload size limit in which made me recalls back the previous encounter where IIS have a default file size upload limit configuration prefix. Those changes are required in order to allow bigger size files to be able to transfer via the web application.

By default, ASP.NET only permits files that are 4,096 kilobytes (KB) (or 4 MB) or less to be uploaded to the Web server. To upload larger files, you must change the maxRequestLength parameter of the section in the Web.config file. If you want to change this setting for all of the computer and not just the specific ASP.NET application, you must modify the Machine.config file.

Once amended, it is advisable to reboot the system to allow the new settings take place.

P/S: There is another source claimed that following settings change is required as well:

Modify the value in the AspMaxRequestEntityAllowed property in the IIS metabase, set the maximum number of bytes that are permitted in the entity body of an ASP request. To do this, follow these steps:
1. At a command prompt, type the following command, and then press ENTER:
cd drive:\inetpub\adminscripts
Note In this command to change folders, drive is a placeholder for the hard disk where IIS is installed.
2. At a command prompt, type the following command, and then press ENTER:
cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size
Note In this command, size is a placeholder for the largest file size upload that you want to allow. The maximum value is 1,073,741,824 bytes. Set this value to the lowest possible value that allows for the functionality that you want.
3. At a command prompt, type the following command, and then press ENTER:
iisreset

Written by admin on June 19th, 2009 with no comments.
Read more articles on Knowledge Base and Personal and Programming and Web.