我在我的一个 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 模块
发布评论