Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Unassigned: MVC OverrideXFilterAttributes are broken [1315]

$
0
0
OverrideActionFiltersAttribute et al should derive from FilterAttribute, not just Attribute. Otherwise, they can't actually be applied as filter attributes in MVC. (The MVC and Web API designs are different here.)

The workaround is not to use our attributes and create your own that correctly inherit from FilterAttribute. For example:
class OverrideActionFilters2Attribute : FilterAttribute, IOverrideFilter
{
public Type FiltersToOverride
{
get
{
return typeof(IActionFilter);
}
}
}


Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>