What is the correct usage of “runAllManagedModulesForAllRequests” in ASP.NET MVC2/3?

∥☆過路亽.° 提交于 2019-12-03 04:30:57

问题


I've read various posts and questions about the use of runAllManagedModulesForAllRequests in the modules section of <system.WebServer> and I'm concerned that I'm using this setting incorrectly.

All my ASP.NET MVC applications are written using .NET Framework 4.0 and MVC2, plus we have a beta of an application that uses MVC3.

These apps are deployed to servers running Windows 2008R2/IIS7.5. The sites are configured to run in Integrated Pipeline/.NET 4.0 application pools.

If I set runAllManagedModulesForAllRequests="false" then I get a HTTP Error 403.14 - Forbidden error from IIS. If I set this to true then all is well.

However this article suggests this is a bad thing to do and a fix:

Don't use runAllManagedModulesForAllRequests="true" when getting your MVC routing to work

Is it really that bad, should I follow this advice?


回答1:


How bad it is depends on the site traffic, if you are working on a high traffic website I'd say don't use it, and remove unneeded modules.



来源:https://stackoverflow.com/questions/4567844/what-is-the-correct-usage-of-runallmanagedmodulesforallrequests-in-asp-net-mvc

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