26 asp.net-mvc iis-7 castle-windsor
我在我的一个MVC项目中使用windsor DI框架.当我尝试从Visual Studio 2008运行时,该项目工作正常.
但是,当我尝试在IIS7中运行创建应用程序的项目时,我收到以下错误消息:
看起来您忘记注册http模块Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule将"<add name ="PerRequestLifestyle"type ="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule,Castle.MicroKernel"/>'添加到您网站上的部分.配置
但是这个模块已经存在于web.config文件的httpmodule部分中.
有谁知道我必须做些什么来消除这个问题.
Evg*_*vin 45
我有同样的错误,但它是由另一个原因引起的:
我试图解决IService在Application_Start自定义路由类处理,但键入IService与被注册PerWebRequestLifestyle.路由子系统保持在Web请求的更高级别,并且路由处理时不存在对象.
yfe*_*lum 35
尝试将其添加到该system.webServer部分?
<configuration>
<system.web>
<httpModules>
<add name="PerRequestLifestyle" type="..." />
</httpModules>
</system.web>
<system.webServer>
<modules>
<add name="PerRequestLifestyle" type="..." />
</modules>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10875 次 |
| 最近记录: |