Custom ASP.NET MVC ActionFilterAttribute - hooks never get called

前端 未结 7 547
故里飘歌
故里飘歌 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:28

    Your code generally looks good to me. It could be related to what you are doing (or not doing) in your Action method. If you aren't returning a view, etc., it's possible your "ResultExecuting" event handler isn't being called. I would grab the sample here and see what gets logged for your action.

提交回复
热议问题