title: HttpModule not called in .NET 4.5
body: <p>Just spent a lot of time sifting through contradictory advice on this problem, and thought I'd post my solution.</p>
  
  <p>My environment is .NET 4.5, Visual Studio 2012, working on an MVC 4 application. I created an Http Module like I'd done in the past, and added it to Web.config like so:</p>
  
  <pre><code>&lt;configuration&gt;
   &lt;system.web&gt;
    &lt;httpModules&gt;
     &lt;add name="MyModule" type="Services.MyModule, Services" /&gt;
    &lt;/httpModules&gt;
   &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>However, the application never called the module's Init(). Eventually, I found advice that the modules should instead be inside <code>&lt;system.webServer&gt;</code>, and the element named <code>&lt;modules&gt;</code> instead of <code>&lt;httpModules&gt;</code>, like so:</p>
  
  <pre><code>&lt;configuration&gt;
   &lt;system.webServer&gt;
    &lt;modules&gt;
     &lt;add name="MyModule" type="MyModule" type="Services.MyModule, Services" /&gt;
    &lt;/modules&gt;
   &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Re-ran the application, and it called Init() as expected. FWIW, the page with the direction is here:
  <a href="http://msdn.microsoft.com/en-us/library/ms227673.aspx">http://msdn.microsoft.com/en-us/library/ms227673.aspx</a></p>
  
  <p>HTH</p>