Thursday 29 September 2011

The request filtering module is configured to deny a request that exceeds the request content length

HTTP Error 400 Bad request 
Unable to upload larger/bigger files on to Web Server (IIS)

Include the following setting in the application's Web.Config file.

<system.webServer>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="2000000000" />
            </requestFiltering>
        </security>
    </system.webServer>

This setting allows you to upload a file of size up to 2000MB .

The same can be achieved by the following command too.
%windir%\system32\inetsrv\appcmd set config "Default Web Site/<Your WebSite>" -section:requestFiltering -requestLimits.maxAllowedContentLength:2000000000


No comments:

Post a Comment