简体   繁体   English

在Windows Azure Web角色中禁用/关闭URL重写模块

[英]Disable/Turn Off URL Rewrite Module in Windows Azure Web Role

We are using Windows Azure Web Roles to host our MVC 3 application. 我们正在使用Windows Azure Web角色来承载我们的MVC 3应用程序。 From many of the performance related questions here on SO, I have seen that the URL Rewrite module can have a performance impact on an MVC 3 application, even when not being used. 从SO上与性能有关的许多问题中,我已经看到URL重写模块即使不使用MVC 3应用程序也会对性能产生影响。

With that said, is there a way in either the web.config or ServiceDefinition files to disable or remove the URL Rewrite module on Azure? 如此说来,web.config或ServiceDefinition文件中是否可以禁用或删除Azure上的URL重写模块? One way that I have thought about is using a .cmd file on startup, similar to what we use to extend the App Pool timeout and recycle periods on the application, but cannot find a command line method of disabling the module. 我考虑过的一种方法是在启动时使用.cmd文件,类似于我们用来延长应用程序池的应用程序池超时和回收周期的方法,但是找不到禁用模块的命令行方法。

URL Rewrite on by default on Azure Web Roles 默认情况下,在Azure Web角色上启用URL重写

Impact of URL Rewrite on Server URL重写对服务器的影响

Method of increasing App Pool timeout on Azure 在Azure上增加应用程序池超时的方法

Which version of the SDK are you using? 您正在使用哪个版本的SDK? Version 1.3 and higher don't install it by default. 1.3版及更高版本默认情况下不安装它。 See the documentation here : 请参阅此处的文档:

If you wish to use the IIS URL Rewrite module, you must install it and configure your rewrite rules. 如果希望使用IIS URL重写模块,则必须安装它并配置重写规则。 See URL Rewrite Module for more information. 有关更多信息,请参见URL重写模块。

Update: 更新:

I've double checked and it seems that URL Rewrite 2 is still installed on the Web Roles (I'm using the 1.7 SDK). 我已仔细检查过,似乎Web角色上仍安装了URL Rewrite 2(我使用的是1.7 SDK)。 To uninstall URL Rewrite, create a startup task (elevated) that executes the following: 要卸载URL Rewrite,请创建一个启动任务(高架),该任务执行以下操作:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM