I have a simple web api controller where action methods are decorated with various built in and custom filters.Now I want to create another controller which inherits from the first one, how can I remove\bypass all the action filters on the derived controller?
Base controller:
public class ValuesController : ApiController
{
// GET api/values
[Authorize]
[CustomFilter]
public virtual IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
}
Derived controller:
public class ExtenderController : ValuesController
{
//Must bypass [Authorize] and [CustomFilter]
public override IEnumerable<string> Get()
{
return base.Get();
}
}