<p>I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008.</p>

<p>But when i tried to run the project creating an application in IIS7 then I recieved the following error message:</p>

<blockquote>
  <p>Looks like you forgot to register the http module
  Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '&lt;add
  name="PerRequestLifestyle"
  type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule,
  Castle.MicroKernel" /&gt;' to the  section on your
  web.config</p>
</blockquote>

<p>But this module already exists in the httpmodule section of web.config file.</p>

<p>Does anyone know what I have to do to eliminate this problem.</p>

Try adding it to the
```
system.webServer
```
section as well?
```
```
<configuration>
    <system.web>
        <httpModules>
            <add name="PerRequestLifestyle" type="..." />
        </httpModules>
    </system.web>
    <system.webServer>
        <modules>
            <add name="PerRequestLifestyle" type="..." />
        </modules>
    </system.webServer>
</configuration>
```
```