Custom ASP.NET MVC ActionFilterAttribute - hooks never get called

前端 未结 7 546
故里飘歌
故里飘歌 2021-01-01 18:50

Hi I`m trying to do something that seems kinda easy, and is documented that way but for some reason its not going that easy.

Basiclly I wrote something like this:

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 19:41

    Finally figured out, it was in the end the fact that I have been putting the filter on a function that has in fact been an ActionResult function, but it was returned by another method that called it, so the filters are only being executed once on the entry point Action.

提交回复
热议问题