开发者

Could not load type 'Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule' from assembly 'Castle.Windsor'

开发者 https://www.devze.com 2023-03-15 10:24 出处:网络
I\'m getting this error intermittently during debugging an MVC3 application. Intermittently being that if I modify the code within the app, rebuild and test, the error appears. If I make a change the

I'm getting this error intermittently during debugging an MVC3 application. Intermittently being that if I modify the code within the app, rebuild and test, the error appears. If I make a change the web.config (e.g. add a space), the error goes away and everything works as expected. Thoughts?

Web.config

<system.web>
...
<httpModules>
  ...
  <add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.Windsor" />
</httpModules>
</system.web>
  <system.webServer>
<modules runAllManagedModulesForAllRequests="true">
  <add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.Windsor" />      
...开发者_如何学运维.
</modules>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
....


When you edit the web.config it will force the application to be destroyed and re-started, this may not be happening when you edit and re-build the code.

What kind of change are you making when the error is thrown?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号