Prevent Caching of Attributes in ASP.NET MVC, force Attribute Execution every time an Action is Executed

后端 未结 2 707
一个人的身影
一个人的身影 2021-01-03 03:59

According to various articles (e.g. here and here) attribute results on ASP.NET MVC Actions may be cached and not executed again when a con

2条回答
  •  太阳男子
    2021-01-03 04:29

    I just finished a spirited discussion with Craig Stuntz (the author of the first article you listed).

    I ended up using an AuthorizeAttribute with AuthorizeCore to guarantee that authorization is called even in the event the page is cached.

提交回复
热议问题