gpt4 book ai didi

asp.net-mvc - 看起来您忘记在 IIS7 中注册 Windsor CaSTLe 的 http 模块

转载 作者:行者123 更新时间:2023-12-02 13:59:17 25 4
gpt4 key购买 nike

我在我的一个 MVC 项目中使用 Windsor DI 框架。当我尝试从 Visual Studio 2008 运行时,该项目运行良好。

但是当我尝试运行在 IIS7 中创建应用程序的项目时,我收到了以下错误消息:

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 部分中。

有谁知道我必须做什么才能消除这个问题。

最佳答案

我有同样的错误,但它是由另一个原因引起的:

我尝试在 Application_Start 处解析 IService 以进行自定义路由类处理,但 IService 的类型已注册到 PerWebRequestLifestyle.路由子系统处于比 Web 请求更高的级别,并且在路由处理时对象不存在。

关于asp.net-mvc - 看起来您忘记在 IIS7 中注册 Windsor CaSTLe 的 http 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/258011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com