Why is my ASP.NET Web API ActionFilterAttribute OnActionExecuting not firing?

前端 未结 6 1383
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 01:47

I\'m trying to implement what\'s seen here: http://www.piotrwalat.net/nhibernate-session-management-in-asp-net-web-api/ but I\'m having an issue with my NhSessionManag

6条回答
  •  悲&欢浪女
    2020-12-08 02:07

    If you're working in a project contains both MVC and WebAPI assembilies, could you check what's the namespace your ActionFilterAttribute's namespace. It's fairly confusing cause there are two ActionFilterAttributes under both:

    • WebAPI: System.Web.Http.Filters
    • MVC: System.Web.Http.Mvc

提交回复
热议问题