title: Custom Errors not working with MVC4 project?
body: <p>I'm trying to follow the answer to this question: </p>
  
  <p><a href="https://stackoverflow.com/questions/13905164/how-to-make-custom-error-pages-work-in-asp-net-mvc-4">How to make custom error pages work in ASP.NET MVC 4</a></p>
  
  <p>I have the following in my Web.Release.config:</p>
  
  <pre><code>&lt;system.web&gt;
  &lt;customErrors mode="On" defaultRedirect="~/Error"&gt;
    &lt;error redirect="~/Error/NotFound" statusCode="404" /&gt;
  &lt;/customErrors&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>I'm running in Release mode.  I've added the following controller: </p>
  
  <pre><code>public class ErrorController : Controller
  {
      public ViewResult Index()
      {
          return View("Error");
      }
      public ViewResult NotFound()
      {
          Response.StatusCode = 404;  //you may want to set this to 200
          return View("NotFound");
      }
  }
  </code></pre>
  
  <p>And views for the controller actions: </p>
  
  <pre><code>@model System.Web.Mvc.HandleErrorInfo
  @{
      Layout = "../Shared/_Layout.cshtml";
      ViewBag.Title = "Error";
  }
  &lt;div class="list-header clearfix"&gt;
      &lt;span&gt;Error&lt;/span&gt;
  &lt;/div&gt;
  &lt;div class="list-sfs-holder"&gt;
      &lt;div class="alert alert-error"&gt;
          An unexpected error has occurred. 
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I can access these pages via manual navigation.  If I navigate to some bogus URL though, I get the standard yellow error page with ugly diagnostics info.  </p>
  
  <blockquote>
  <pre><code>The resource cannot be found.
  </code></pre>
    
    <p>Description: HTTP 404. The resource you are looking for (or one of its
    dependencies) could have been removed, had its name changed, or is
    temporarily unavailable.  Please review the following URL and make
    sure that it is spelled correctly. </p>
    
    <p>Requested URL: /ss</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>