title: Handling 404 Not Found for WebApi
body: <p>I am creating an </p>
  
  <blockquote>
    <p>Asp.Net MVC + AngularJS</p>
  </blockquote>
  
  <p>application. Within a WebApi Controller, I have handled any sort of exception (500, 404 etc). On the other hand, all unhandled exceptions get caught in </p>
  
  <blockquote>
    <p>Global.asax.cs</p>
  </blockquote>
  
  <p>file's </p>
  
  <blockquote>
    <p>Application_Error</p>
  </blockquote>
  
  <p>method.
  However, if a whole API is missing from the application, it shows the 404 error on the browser's console as expected, but I need to redirect to a proper UI (html/cshtml) in this case too. How can I handle this type of exceptions?</p>
  
  <p><strong>P.S.</strong> I have tried using the </p>
  
  <blockquote>
    <p>customErrors</p>
  </blockquote>
  
  <p>property in the </p>
  
  <blockquote>
    <p>Web.config</p>
  </blockquote>
  
  <p>file too, but it was in vain.</p>