我已经创建了一个Web Api过滤器(使用System.Web.Http.Filters.ActionFilterAttribute),但我无法让它在ASP.Net MVC 4中运行.我尝试将其添加到RegisterGlobalFilters()方法但是没有用.
System.Web.Http.Filters.ActionFilterAttribute
RegisterGlobalFilters()
因此,如果使用ASP.Net MVC中托管的Web Api,如何注册过滤器?
asp.net-mvc-4 asp.net-web-api
asp.net-mvc-4 ×1
asp.net-web-api ×1