title: MVC InvalidOperationException with custom error pages
body: <p>I have custom error pages setup using</p>
  
  <pre><code>&lt;customErrors mode="On" defaultRedirect="~/Home/Error"&gt;
      &lt;error statusCode="404" redirect="~/Home/PageNotFound" /&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>I created a page that throws and exception and I get redirected to the correct error pages.</p>
  
  <p>However I am noticing these errors in elmah on the production webserver:</p>
  
  <blockquote>
    <p>System.InvalidOperationException The view 'Error' or its master was
    not found or no view engine supports the searched locations. The
    following locations were searched:
    ~/Areas/Football/Views/Draft/Error.aspx
    ~/Areas/Football/Views/Draft/Error.ascx
    ~/Areas/Football/Views/Shared/Error.aspx
    ~/Areas/Football/Views/Shared/Error.ascx ~/Views/Draft/Error.aspx
    ~/Views/Draft/Error.ascx ~/Views/Shared/Error.aspx
    ~/Views/Shared/Error.ascx ~/Areas/Football/Views/Draft/Error.cshtml
    ~/Areas/Football/Views/Draft/Error.vbhtml
    ~/Areas/Football/Views/Shared/Error.cshtml
    ~/Areas/Football/Views/Shared/Error.vbhtml ~/Views/Draft/Error.cshtml
    ~/Views/Draft/Error.vbhtml ~/Views/Shared/Error.cshtml
    ~/Views/Shared/Error.vbhtml</p>
  </blockquote>
  
  <p>Why is it looking for the error page elsewhere? I deleted ~/Views/Shared/Error.cshtml and added my custom error page at ~/Home/Error since i specified a new default in my config file.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>