Thursday, 5 February 2009

Castle and IIS7

If you are using Castle and IIS 7 you may receive the following error:

Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '' to the section on your web.config

This error actual means that you haven't add the PerRequestLifestyle to the modules section within system.webServer.

Just add the following in to your web.config


<configuration>
    <system.webServer>
        <modules>
            <add name="PerRequestLifestyle" type="..." />
        </modules>
    </system.webServer>
</configuration>

No comments: