Maximum Request Length Exceeded
Posted by Jason on December 11, 2008 at 9:52 am
It’s hard to believe how badly this is handled in IIS. Admittedly I’ve only tried it in IIS 6, but I see no evidence that it gets any better in IIS 7.
So here’s the problem – you create a website that allows the upload of images (or any file types for that matter). It’s very likely you’re going to want to limit the size of those uploads or you’ll end up in a world of pain when your users go and use up all your disk space. By default IIS allows upload sizes of 4Mb which is ample for image purposes. However, if someone uploads a file above that size you’re likely to want to notify them by telling them gently they’re an idiot for not reading the note above the file input field and then allow them to reselect a file.
But you can’t because the requests never gets to your page. IIS simply drops the request and seems to respond with nothing at all. That leaves the user looking at a ‘Web site could not be found’ error, which is misleading and just plain wrong.
(more…)