title: Custom Error Handler for Http Error 405 in MVC
body: <p>I can't seem to figure out how to custom handle this error. I have a endpoint defined like this:</p>
  
  <p>[HttpGet]
     public ActionResult Test() { ... }</p>
  
  <p>If I try to POST to this endpoint it throws the http 405 error which is correct. The problem is I want to provide a custom error page and not the IIS default one. I've tried breaking in the application_error method in global.asax but it never get's called, and I've tried adding the <code>&lt;customErrors /&gt;</code> section in web.config but to no avail. </p>
  
  <p>Any suggestions?</p>