IIS6: In the system.web section of your web.config
<configuration>
<system.web>
<httpModules>
<add name="MyModule" type="My.Namespace.NHibernateSessionPerRequest`1[[My.Namespace.MyType, My.Assembly]], My.Assembly"/>
</httpModules>
</system.web>
</configuration>
IIS7: In the system.webserver section of your web.config:
<configuration>
<system.webServer>
<modules>
<add name="MyModule" type="My.Namespace.NHibernateSessionPerRequest`1[[My.Namespace.MyType, My.Assembly]], My.Assembly"/>
</modules>
</system.webServer>
</configuration>
For both, replace "My.Namespace" with the class namespace and "My.Assembly" with the name of the assembly.
source
share