6
votes

I was downloaded Mvc4Future nuget package in my ASP.NET MVC 5 project. When I use the ActionFilter attributes such as [AjaxOnly] will cause "Inheritance security rules violated by type" exception. Here is the full message:

Inheritance security rules violated by type: 'Microsoft.Web.Mvc.AjaxOnlyAttribute'. Derived types must either match the security accessibility of the base type or be less accessible.

How can I fix this problem?

1

1 Answers