Reputation: 26782
I'm using ASP.Net MVC (still 1.0 for now) with Castle ActiveRecord and NHibernate.Linq. All is fine under IIS 6.
However, I'm faced with a problem deploying my app to IIS 7: ActiveRecord's SessionScope.Current seems to be not available for some reason.
Any ideas?
Upvotes: 1
Views: 673
Reputation: 566
In order to use the same web.config file on IIS7 and older versions, put the SessionScopeWebModule in the section like this:
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ar.sessionscope" type="Castle.ActiveRecord.Framework.SessionScopeWebModule, Castle.ActiveRecord" />
in addition to the original <system.web>
section settings:
<configuration>
<system.web>
<httpModules>
<add name="ar.sessionscope" type="Castle.ActiveRecord.Framework.SessionScopeWebModule, Castle.ActiveRecord" />
Make sure you set the <validation validateIntegratedModeConfiguration="false"/>
in the <system.webServer>
section as well.
Upvotes: 3
Reputation: 99740
If you're using IIS 7 Integrated Mode you need to register the ActiveRecord HttpModule in the system.webServer/modules section instead of system.web/httpModules
See
Upvotes: 1