Tuesday, 30 September 2008

Increasing IIS7 request filtering limits

As a new security enhancement feature, IIS7 has mechanism to filter out all requests which are larger than specific limit (default is 30Mb).

However there are situation where some web servers require handling very large requests such as Audio/Video file uploads.

In such a scenario administrators are required to change this default setting. This can be achieve following below steps.

  1. Open a command prompt window with administrator privileges
    1. Start->Run-> runas /user:Administrator cmd
  2. Change your current directory to Internet Server directory
    1. cd c:\Windows\systems32\inetsrv
  3. Then run following command

appcmd set config "My Site/MyApp" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600 -commitpath:apphost

maxAllowedContentLength is the maximum request size to be set. In above example we are setting it to 100Mb.

No comments: