asp.net-mvc-3 - 禁用/关闭 Windows Azure Web 角色中的 URL 重写模块

标签 asp.net-mvc-3 azure azure-web-roles

我们正在使用 Windows Azure Web 角色来托管我们的 MVC 3 应用程序。从 SO 上的许多与性能相关的问题中,我发现 URL 重写模块可能会对 MVC 3 应用程序产生性能影响,即使不使用也是如此。

话虽如此,web.config 或 ServiceDefinition 文件中是否有办法禁用或删除 Azure 上的 URL 重写模块?我考虑过的一种方法是在启动时使用 .cmd 文件,类似于我们用来延长应用程序的应用程序池超时和回收周期的方法,但找不到禁用该模块的命令行方法。

URL Rewrite on by default on Azure Web Roles

Impact of URL Rewrite on Server

Method of increasing App Pool timeout on Azure

最佳答案

您使用的是哪个版本的 SDK? 1.3 及更高版本默认不安装它。请参阅文档 here :

If you wish to use the IIS URL Rewrite module, you must install it and configure your rewrite rules. See URL Rewrite Module for more information.

更新:

我已经仔细检查过,似乎 URL Rewrite 2 仍然安装在 Web 角色上(我使用的是 1.7 SDK)。要卸载 URL 重写,请创建一个执行以下命令的启动任务(提升):

wmic product where name="IIS URL Rewrite Module 2" call uninstall

关于asp.net-mvc-3 - 禁用/关闭 Windows Azure Web 角色中的 URL 重写模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11954103/

相关文章:

c# - Mono,asp.net C#和MVC的操作方法和教程

asp.net-mvc - 有关 HttpContext、HttpContextBase 和操作过滤器的问题

asp.net-mvc - MVC定制授权属性以验证请求

entity-framework - 修改 Entity Framework 迁移是否安全,以便以不同的方式执行而不是删除并重新创建索引?

sql - 检查子查询中是否存在记录

asp.net - 在没有 UrlScan 的情况下删除/隐藏/禁用 Azure/IIS7 中过多的 HTTP 响应 header

.net - Web 角色中的 app.config 未复制到 Azure SDK 1.8 和 Visual Studio 2010 中

asp.net-mvc-3 - 尝试加载 64 位 C++/CLI 程序集时出现 ASP.NET MVC3 运行时错误

performance - Azure 云服务性能差异

Azure - 在同一云服务中为每个 Web 角色使用子域