title: How can I make the HandleError attribute work without web.config setting (customErrors)?
body: <p>I can't get <code>[HandleError]</code> attribute in MVC 5 to work.</p>
  
  <p>I have this Controller</p>
  
  <pre><code>[HandleError]
  public class HomeController : Controller
  {
      public ActionResult WelcomePage()
      {
          throw new Exception("Oops!");
          return View();
      }
  }
  </code></pre>
  
  <p>Which gives the yellow screen of death.</p>
  
  <p>If I add in the web.config</p>
  
  <pre><code>&lt;system.web&gt;
    &lt;customErrors mode="On" /&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>it works. But if I remove the <code>[HandleError]</code> it still works, so it's setting in the web.config has higher presedense I guess.</p>
  
  <p>But should't you be able to only use the <code>[HandleError]</code> without relying on some web.config setting?</p>