IIS does not load custom HTTP module from web.config

Solution 1:

I figured this out shortly after I asked the question - IIS7 uses a different schema for the web.config. The correct place to load a module is now:

<system.webServer>
  <modules>
    <add name="MyModule" type="MySolution.Web.MyHttpModule, MySolution.Web" />
  </modules>
</system.webServer>

Solution 2:

7 years later: It is not specific to the IIS version, it is specific to the application pool mode: classic versus integrated.

  <system.webServer><!--for integrated mode-->
    <modules>
      <add name="modulename" type="blabla.modulenamehere" />
    </modules>
  </system.webServer>

  <system.web><!--for classic mode-->
     <httpModules>
      <add name="modulename" type="blabla.modulenamehere" />
    </httpModules>
  </system.web>