title: WebApi 2 Maximum request length exceeded
body: <p>Does anyone know if there is a way of catching this error?</p>
  
  <p>Essentially I'm trying to implement some functionality to allow a user to upload a file from a webpage to a webapi controller.</p>
  
  <p>This works fine, but if the file size exceeds the maximum size specified in the web.config the server returns a 404 error. </p>
  
  <p>I want to be able to intercept this and return a 500 error along with message which can be consumed by the client.</p>
  
  <p>I can't work out where to do this in WebApi as the Application_Error method I've implemented in Global.asax is never hit and it seems like IIS is not passing this through to the WebApi application.</p>