Right now any filter attributes on a pagemodel class or handler method are just ignored.
If we can't support this we should make it throw.
Discussed with @rynowak ...
Assigning this to the person already working on it https://github.com/aspnet/Mvc/pull/6417
Hey @pranavkm, I just found this issue via 8df30325407be3d3c30c850e6f63b1d2969b1dea and have a question:
I am trying to retrieve the filter metadata for a razor page by inspecting the action descriptors from IActionDescriptorCollectionProvider
. However, due to this line, the filter descriptor collection is always empty.
This works perfectly fine for controller actions but from the change it seems that this only works from within the CompiledPageActionDescriptor
? Is this really intended that page actions are incompatible to this filter metadata infrastructure? What would be the way to retrieve all page actions then including the applied filters?