asp.net-mvc – 看起来你忘了注册HTTP模块与Windsor城堡与IIS7

前端之家收集整理的这篇文章主要介绍了asp.net-mvc – 看起来你忘了注册HTTP模块与Windsor城堡与IIS7前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的一个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部分。

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

解决方法

尝试将它添加到system.webServer部分?
<configuration>
    <system.web>
        <httpModules>
            <add name="PerRequestLifestyle" type="..." />
        </httpModules>
    </system.web>
    <system.webServer>
        <modules>
            <add name="PerRequestLifestyle" type="..." />
        </modules>
    </system.webServer>
</configuration>
原文链接:https://www.f2er.com/aspnet/254075.html

猜你在找的asp.Net相关文章