AppCmd Migrate Config and Remove HttpModules

Michael Schwarz on Tuesday, November 18, 2008

In some of my Web projects I’m using the <remove name="..."/> [1] tag in web.config section system.web/httpModules. When you’re using the appcmd migrate config command not all removed httpModule configurations are copied to the new section below system.webServer.

Before:

```<system.web>
<httpModules>
<remove name="PassportAuthentication" />
<remove name="Profile" />
<remove name="AnonymousIdentification" />
<remove name="BlockModule" />
</httpModules>
</system.web>
```

After:

```
<system.webServer>
<modules>
<remove name="Profile" />
<remove name="AnonymousIdentification" />
</modules>
</system.webServer>
```

Why is PassportAuthentication and BlockModule not added to be removed? Well, it is simple to modify your web.config manual, but I would like to know what the difference is.

If you’re reading my blog you may have noticed another bug using appcmd [2].