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

07 June, 2009 · less than a minute to read

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

While testing some SCORM content in the Basic Web Player which comes with SLK I came across this error when trying to upload a large file.

Error Summary

HTTP Error 404.13 - Not Found

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

Detailed Error Information

ModuleRequestFilteringModule
NotificationBeginRequest
HandlerPageHandlerFactory-ISAPI-2.0
Error Code0x00000000
Requested URLhttp://localhost:80/basicwebplayer/UploadPackage.aspx
Physical PathC:\working\slk\Samples\BasicWebPlayer\UploadPackage.aspx
Logon MethodNot yet determined
Logon UserNot yet determined

Most likely causes: 

  • Request filtering is configured on the Web server to deny the request because the content length exceeds the configured value.

Things you can try: 

  • Verifytheconfiguration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLengthsetting in the applicationhost.config or web.config file.

It's actually a nicely detailed error message. The problem is that be default IIS7, certainly on Vista, blocks large files at the web server level as well at the application level as part of the request filtering chain. This overrides the maxRequestLength value in the applications web.config file. To resolve this you need to add the following to your web.config file directly under your configuration node: <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483648"/> </requestFiltering> </security> </system.webServer> However, by default you cannot change this on a per application basis,and so need to modify the application.config file in%Windows%\System32\inetsrv\config. The easiest way to do this is torun, in a command prompt running as administrator, %windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/security/requestFiltering

Richard Willis headshot

Written by Richard Willis

Managing Director / Founder

Richard started SalamanderSoft in 2007 after a successful career as a software developer. Wanting to start his own company and with experience in integrating school systems he set out to build the best integration system for schools and to exceed customer expectations. He starting out on his own, doing all the coding, support and sales until finally the growing number of customers meant he needed to start growing the team. He is still heavily involved in coding the core Integration Suite product in addition to running the company and being the first point of contact for prospective customers.

Copyright © 2020 SalamanderSoft Limited