IIS 7 & IIS 8
Last post Nov 03, 2011 04:16 PM by trampman
Jan 22, 2007 09:22 PM|LINK
I'm using VS.NET 2005 running on Vista.
The issue pertains to being able to upload large files in an ASP.NET application when using IIS 7.0 (and not when using the development webserver).
My Web.config file for my application I have:
However when uploading large files (I've tried with a 60MB file) I get this error from IIS 7.0:
Description: The request filtering module is configured to deny a request that exceeds the request content length.
Error Code: 0x00000000
What you can try:
I've never changed any setting in IIS 7.0 and so would appreciate it if someone can tell me how to change this setting.
But more importantly, it seems that with IIS 7.0 we're now going to have to synchronize such settings in two places? Is that correct?
Thanks in advance for any help.
Jan 22, 2007 09:38 PM|LINK
%windir%\system32\inetsrv\appcmd set config -section:requestFiltering -requestLim
or if you only want to set it for your app:
%windir%\system32\inetsrv\appcmd set config "Default Web Site/<your app>" -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000
Hope this helps
Jan 22, 2007 09:49 PM|LINK
Thank you for your quick reply! I'll try your suggestion...
Is there a GUI that I can use to set this or config file local to my application that I can create in order to set this?
Jan 22, 2007 10:07 PM|LINK
I tried your suggestion and eventually got it working but have another question.
What is the "unit of measure" for the maxAllowedContentLength attribute? In ASP.NET Web.config
maxRequestLength is in KB. It looks like the maxAllowedContentLength is in bytes?
Now in order to get your suggestion to work I had to modify the overrideModeDefault from "Deny" to "Allow" like so:
I'm assuming this change allows for "application level" control? If so, can I not add my setting to the web.config file of the application in question?
I had to "Allow
Jan 22, 2007 10:13 PM|LINK
Ok, I see that appCmd.exe modifies the applications web.config file with the required entries. Great, this is what I was looking for.
Thank you for your help.
Aug 18, 2008 05:08 PM|LINK
With respect to this limit can anyone imagine a way to change the error returned from IIS from the very vague "HTTP Error 404.13 - Not Found" to something more relevant to the actual upload size error that actually occurs?
Apr 02, 2009 12:08 PM|LINK
Funny I just ran across this post and agree making the error more descriptive would help troubleshooting.
Windows Server MVP - IIS
Log archival solution
Install, Configure, Forget
Oct 19, 2009 06:54 PM|LINK
I'm trying to load an app on a site for a server I just converted over from Windows 2003 to Windows 2008, I have tried changing this but I keep getting the same error.
The documentation from Microsoft says to change Applicationhost.config file but the file on my server doesn't even have the record which would make it work. The Web.Config file is set correctly there is nothing to change but it still will not let me upload
more then 30 megs.
Feb 17, 2010 08:06 PM|LINK
The below link may help you..
Aug 18, 2010 08:41 PM|LINK
Parabéns, funcionou 100%!!!