看起来您忘记使用 IIS7 向 Windsor Castle 注册 http 模块 [英] Looks like you forgot to register the http module with Windsor Castle with IIS7
问题描述
我在我的一个 MVC 项目中使用 Windsor DI 框架.当我尝试从 Visual Studio 2008 运行时,该项目运行良好.
I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008.
但是当我尝试运行在 IIS7 中创建应用程序的项目时,我收到以下错误消息:
But when i tried to run the project creating an application in IIS7 then I recieved the following error message:
您好像忘记注册 http 模块了Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '<addname="PerRequestLifestyle"type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule,Castle.MicroKernel"/>'到您的部分web.config
Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule Add '<add name="PerRequestLifestyle" type="Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule, Castle.MicroKernel" />' to the section on your web.config
但是这个模块已经存在于 web.config 文件的 httpmodule 部分.
But this module already exists in the httpmodule section of web.config file.
有谁知道我必须做些什么来消除这个问题.
Does anyone know what I have to do to eliminate this problem.
推荐答案
尝试将其添加到 system.webServer
部分吗?
Try adding it to the system.webServer
section as well?
<configuration>
<system.web>
<httpModules>
<add name="PerRequestLifestyle" type="..." />
</httpModules>
</system.web>
<system.webServer>
<modules>
<add name="PerRequestLifestyle" type="..." />
</modules>
</system.webServer>
</configuration>
这篇关于看起来您忘记使用 IIS7 向 Windsor Castle 注册 http 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!