This is a migrated thread and some comments may be shown as answers.

[Solved] Menu security checking chokes on sealed custom authorisation filters

0 Answers 63 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nick
Top achievements
Rank 1
Nick asked on 16 Nov 2009, 12:40 PM
Just in case anyone else comes across this problem, I've spent a day chasing down an issue where I added the new ASP.NET MVC Menu to my project to find that some of the menu items did not render.

I worked out that missing menu items were those where a custom authorisation filter was used on the controller.  After having no luck replicating this in a test project I noticed that my colleague had declared the custom filter classes as NotInheritable (Sealed for our C# friends).

After removing this keyword from the custom filters, all the menu items appeared as expected.

Hope this helps someone....

Nick

Tags
Menu
Asked by
Nick
Top achievements
Rank 1
Share this question
or