We are using Windows Azure Web Roles to host our MVC 3 application. 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.
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? 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.
URL Rewrite on by default on Azure Web Roles
Which version of the SDK are you using? Version 1.3 and higher don’t install it by default. See the documentation here:
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). To uninstall URL Rewrite, create a startup task (elevated) that executes the following: