IIS 7 and Above
Last post Nov 03, 2011 12:16 PM by trampman
Jan 22, 2007 05:22 PM|skumar2003|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 05:38 PM|thomad|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 05:49 PM|skumar2003|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 06:07 PM|skumar2003|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 06:13 PM|skumar2003|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 01:08 PM|gcinseattle|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 08:08 AM|steve schofield|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 02:54 PM|mbarga1|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 04:06 PM|g_ravi_kiran|LINK
The below link may help you..
Aug 18, 2010 04:41 PM|camanducci|LINK
Parabéns, funcionou 100%!!!
Jan 13, 2011 12:34 PM|mglil|LINK
Oct 19, 2011 05:51 AM|bvinodkumar1977|LINK
Nov 03, 2011 12:16 PM|trampman|LINK