您的位置:首页 > 其它

The given filter instance must implement one or more of the following filter interfaces

2012-09-25 13:49 405 查看
创建了一个 ActionFilter , 但在FilterConfig.cs 的 RegisterGlobalFilters 的方法中添加时, 报错:

The given filter instance must implement one or more of the following filter interfaces: IAuthorizationFilter, IActionFilter, IResultFilter, IExceptionFilter.

原因:命名空间错了

应使用 System.Web.Mvc

不该用 System.Web.Http.Filters
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐