Quantcast HTTP Error 404.13 Not Found, Windows IIS 7 + maxAllowContentLength - digitalFAQ Forum
Go Back    Forum > Digital Publishing / Web Sites > Website and Server Troubleshooting

LinkBack Thread Tools
02-13-2011, 08:34 PM
kpmedia's Avatar
kpmedia kpmedia is offline
Site Staff | Web Hosting, Photo
Join Date: Feb 2004
Posts: 4,314
Thanked 370 Times in 339 Posts
If you run a Windows 2008 IIS7 server, and decide to allow attachments from users, you'll run into problems past 30 MB unless you customize the server settings. By default, Windows IIS 7 will only allow a maximum of 30 megabytes of data to be uploaded via HTTP requests, by way of the maxAllowedContentLength filter.

End-users will get generic error messages, either "HTTP Error 404.13 - Not Found" or a plain/useless "HTTP Error 500" when trying to upload anything larger than 30MB. However, as any decent Windows admin knows, accessing the site from the server will reveal the full error log in a browser **. For example:


Error Summary: The request filtering module is configured to deny a request that exceeds the request content length.
Module: RequestFiltertingModule
Notification: BeginRequest
Error Code: 0x00000000
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: Verify the configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowContentLength setting in the applicationhost.config or web.config file.
Unlike IIS6 and IIS5, the errors from IIS7 are actually slightly useful. Still slightly useless, but far better than it had been in past years. And this is one of the few situations were the "things you can try" is actually pretty close at giving you enough information to further research the problem. (Most times, the suggestions are politicianese -- words that mean nothing.)

You have three primary solutions:

(1) The maxAllowedContentLength filter can be disabled entirely, but that's a really bad idea.

(2) Alter the web.config for your application, which makes the bad assumption that your app is native to Windows and comes with a web.config that can be easily edited. For an ASP.NET app, I'm sure this is great. But when you're serving PHP or MySQL content, further complicated by panels such as Plesk, this becomes a guessing game on which app needs permissions, and/or where's the web.config. No thanks.

(3) The better solution is to increase the limit to something higher, just slightly above your max file size, system-wide. (For example, if you want to allow 32MB uploads, the set it to 36MB.) There's several ways to change the config file, either by clicking through the OS and opening the file in an editor, or by using several variations of DOS commands. This is what I suggest:

Start > Run > CMD to to go command prompt.
Go to your Windows directory, into the System32 folder, and then again into Inetsrv
Call it "slow" or a "waste of time", but I prefer to enter folders one by one. I always have, since the late 1980s. It's harder to screw something up when you're entering less data into the command prompt. For the impatient, you can enter this:
cd %windir%\system32\inetsrv\
Then you'll want to SLOWLY AND CAREFULLY enter this change syntax:
appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600
You'll get this confirmation:

You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.

Note the number at the end. This is your new max size, in bytes. This example is 100MB (3 x 32MB uploads at one time)
104 857 600 bytes = 100 megabytes
104,857,600 = 100MB

Remember to account for language/database timeouts, when deciding on filesize. For example, a 30-second timeout is probably inadequate for a 32MB upload on most home/office broadband connections. You'll find 60-90 seconds is needed for a stable 32MB upload via HTTP.

Then there are also setting within PHP and MySQL, for example, via the my.ini and php.ini, which limit the max upload sizes. Further on, the actual software (vBulletin, for example) has its own internal max attachment settings. The smallest settings wins! So if you want a 32MB upload, you'll have to ensure all settings, all across the board, will allow for it.

** Notes on web browsers:
On a Windows 2008 webserver, I suggest Google Chrome or Firefox -- not Internet Explorer. That malware-allowing butcher job of a browser should NEVER be run on a server. Chrome is also much leaner, and will operate faster. For the security worriers, Firefox and Chromium both offer portable no-install editions that can be unzipped, used in a temp folder, and then deleted. Keep the zip, repeat as needed.

... and if you're looking for a reliable Windows host, be it dedicated or VPS, look no further than EuroVPS. For the past 5 years, EuroVPS has proven themselves to me to be one the best Windows hosts in the world. (Not in Europe? Not a problem. Their servers are peered directly to New York, and give excellent speeds all across North America. Don't pick your host based on geography -- pick your host because of server and service quality!) Windows is already a slight pain in the butt by itself -- you don't want a bad host to add to that stress.

- Did my advice help you? Then become a Premium Member and support this site.
- Please Like Us on Facebook | Follow Us on Twitter

- Need a good web host? Ask me for help! Get the shared, VPS, semi-dedicated, cloud, or reseller you need.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix "Pack Header not found" cyber-junkie Copy DVDs, Duplicate, Replicate 5 08-15-2010 09:22 PM
Disk error problem kschwi Videography: Cameras, TVs and Players 5 07-19-2009 12:50 PM
Power calibration error trying to copy a disc ? d.smyth Copy DVDs, Duplicate, Replicate 1 01-19-2006 08:16 AM
CD error-checking for Macintosh? bbee Blank Media 3 01-01-2006 07:48 AM
Power Calibration Error, is my burner dying ? Pepeart Blank Media 4 09-30-2005 09:04 AM

Thread Tools

All times are GMT -5. The time now is 01:14 AM