c# - Is it possible to turn off the canonical hostname URL Rewrite rule from the codebehind? -


I was thinking that it is possible to close the canonical hostname URL rewrite rule with the URL rewrite 2.0 IIS 7.5 module.

I am locally developing on IIS 7.5. The rewrite rule of this URL is the web. Config has been set in.

In this way I am deploying: I am using web debugger to publish my web application. New web Conflict changes, which VS 2010 was started with, there is no substitute for me because it is corrupt: and will not be decided until the release of VS 2010 SP1. I am not using web deployment projects anymore because WebDepage is not working with web deployment projects. As a result, I'm manually deploying to web.config before switching over to the rewrite rule on the Web.

If I want to debug something locally now, then I have to close the rule manually.

Is there a solution like this pseudo code?

  If (Properties Settings. TurnOffCanonicalHostNameWithLocalHost) {URLRewriteModule ["CanonicalHostName"]. Competent = valid; } Input = "{HTTP_HOST}" pattern = " 

  & lt; Localhost "reject" = "true" />  

Comments