title: MVC 4 HttpNotFound() and 404 error
body: <p>I have a controller in which I am processing a part of the url and if it matches some criteria I will return a View but if not I will return a <code>HttpNotFound()</code>.  </p>
  
  <p>Now I have set up a friendly 404 page which a user will be redirected to if a 404 is thrown so why doesn't the HttpNotFound redirect to this page?</p>
  
  <p>I would expect the 404 to be thrown then the page to be redirected to the error page as set up in the web.config but it just shows the default 404 page.  I have checked with other urls that don't exist and these all redirect to the proper error page</p>