Tuesday, August 19, 2008

Watch out for maxAllowedContentLength - its in bytes!

I was just troubleshooting a HTTP Error 404.13 - Not Found error in one of applications that handles some large file uploads.  I had set my maxAllowedContentLength to 2097151 (which is the max allowed value for the httpRuntime maxRequestLength parameter, in KB).  Oddly, it wasn't working and I was still receiving the 404.13.

Some time later, after actually reading the MSDN documentation, it clicked to me that maxAllowedContentLength is in bytes, not kilobytes! Doh!