MVC 3 Custom Errors Not Showing

From a fresh MVC 3 Project, I've modified an Index() action to throw an exception. I expect the stock Error.chhtml view to be rendered, because I've set in the web.config. Instead, I still get the "yellow screen of death" while running from within VS.

<system.web>
  <customErrors mode="On" />
  ...

My HandleError attribute is set globally from the global.asax.cs.

    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new HandleErrorAttribute());
    }

...unmodified, per the default project setup. I've run against both IIS express and VS Dev Server. Nothing causes the custom error page to surface. What am I missing?

6
задан tereško 1 March 2013 в 11:10
поделиться