This project is read-only.

Do Filter-Overrides work in the current RC (MVC 5.0.0 RC 1)

Aug 31, 2013 at 7:44 PM

do Filter-Overrides work in the current RC ?

When I try to execute the action-method in the following listing, the DemoActionFilter, which extends FilterAttribute and inherits IActionFilter is executed although the action-method is annotated with OverrideActionFiltersAttribute.

What's wrong here?

public class HomeController : Controller

    public ActionResult Contact()
        ViewBag.Message = "Your contact page.";

        return View();
Sep 27, 2013 at 11:20 AM
Sep 27, 2013 at 6:51 PM
Yes, it's a bug. In MVC (unlike Web API), filters need to inherit from FilterAttribute (not just Attribute) if they want to be able to be applied via an attribute.

I've filed the bug: