title: Why is my MVC route not being found when I upload a large file?
body: <p>I am using attribute routing for an MVC 5.2.3 project, and have run across a weird issue.</p>
  
  <p>Users are able to upload files to the site, with a maximum file size of 3 MB. This functionality was and is working just fine. Recently, though, I realized that the size limit was only being enforced via JavaScript. So, I added some handling to check the size server-side before saving the file. I then removed the restriction on the front end, and uploaded a 5.26 MB file to test. To my relief, the upload was blocked. To my horror though, the response wasn't my nicely formatted error message, it was a 404. </p>
  
  <p>Debugging with IIS Express, I found that for large files, the request doesn't even make it to the action.
  On the other hand, uploading small files (tested up to 800KB) still works as expected. I can even decrease my coded-in limit to 1 KB, and successfully block my 800KB files with my nice error message.</p>
  
  <p>Default IIS max request length seems to be about 30 MB. I tried upping that regardless, but no luck. I looked into the jQuery file upload library we use, but that supports files up to 4GB. I also tried recording the request with Fiddler, but couldn't find any obvious reasons for the larger one to fail. I also tried recording a successful file submission, and then replaying it with Fiddler's composer feature, replacing the file with the larger one. I got 404. One final oddity I haven't been able to explain, when looking at the Network tab in Firefox dev tools for a successful request, the Type column will be JSON. Failed/large requests show XML instead.</p>
  
  <p>Why is my routing failing ONLY for large files?</p>