views:

1013

answers:

1

Hi All,

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.

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

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

But this module already exists in the httpmodule section of web.config file.

Does anyone know what I have to do to eliminate this problem.

Thanks in Advance.

+18  A: 

Try adding it to the system.webServer section as well?

<configuration>
    <system.web>
        <modules>
            <add name="PerRequestLifestyle" type="..." />
        </modules>
    </system.web>
    <system.webServer>
        <modules>
            <add name="PerRequestLifestyle" type="..." />
        </modules>
    </system.webServer>
</configuration>
Justice
Thanks. Solved the problem.