“runAllManagedModulesForAllRequests”的正确用法是什么?在 ASP.NET MVC2/3 中?

发布于 2024-10-09 19:19:46 字数 751 浏览 0 评论 0原文

我在 modules 部分阅读了有关使用 runAllManagedModulesForAllRequests 的各种帖子和问题,我很担心我错误地使用了此设置。

我的所有 ASP.NET MVC 应用程序都是使用 .NET Framework 4.0 和 MVC2 编写的,此外我们还有一个使用 MVC3 的应用程序测试版。

这些应用程序部署到运行Windows 2008R2/IIS7.5的服务器。这些站点配置为在集成管道/.NET 4.0 应用程序池中运行。

如果我设置 runAllManagedModulesForAllRequests="false",则会收到来自 IIS 的 HTTP 错误 403.14 - 禁止错误。如果我将其设置为 true 那么一切都很好。

然而这篇文章表明这是一个不好的要做的事情和修复:

让 MVC 路由正常工作时,不要使用 runAllManagedModulesForAllRequests="true"

这真的那么糟糕吗,我应该遵循这个建议吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡写薰衣草的香 2024-10-16 19:19:46

它有多糟糕取决于网站流量,如果您正在开发高流量网站,我会说不要使用它,并删除不需要的模块。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文