Outputcache doesn't work with routing

冷暖自知 提交于 2019-12-03 21:44:37

You now need [OutputCache] attribute on your controller actions.

With MVC actions results are cached (variation by some parameter value is possible).

I got this working by making the module and handler registrations exactly like in this article (http://msdn.microsoft.com/en-us/magazine/dd347546.aspx).

Earlier I had my registrations last in the block and now I moved them to the top. I also added attribute runAllManagedModulesForAllRequests="true" in this block
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">

So now outputcache page directive is working!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!