IIS7 & Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule reporting problems

UPDATE:

In Windsor 2.5, the assembly name is Castle.WindsornotCastle.MicroKernel


I am trying to deploy an ASP.NET MVC application for IIS7 and I get this error:

It looks like you forgot to register the http Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule http 'module in the section on your web.config

My httpModules contains:

<httpModules>
   <add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel"/>
</httpModules>
Section

system.webServer contains

<handlers>
  <remove name="PerRequestLifestyle"/>
  <add name="PerRequestLifestyle" preCondition="managedHandler" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.Microkernel" verb="*" path="*.castle" />
</handlers>

I added a part verb="*" path="*.castle"as I was getting errors when they were missing. Not sure if their values ​​are correct.

Does anyone know what the problem is?

+5
source share
3 answers

, HTTP- /system.webServer/modules configuration/system.web/httpModules.

+6

, Application_Start, ASP.NET, , / PerWebRequest Lifestyle, , , .

Contrib HybridPerWebRequestTransient Lifestyle, , , Transient Lifestyle.

( zip ), , DLL .

Castle.Windsor 3.0, , ( 3.1 ).

: .LifeStyle.HybridPerWebRequestTransient()

+4

, , , - dll, web.config...

Castle.Core Windsor 2.5.1...

+1

All Articles