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>

相关文章

判断URL文件是不是在于在。private static bool UrlIsExist(...
由于在.net中,Request时出现有HTML或Javascript等字符串时,...
public static bool ProcessIdCard(this string idCard, out...
protected void Page_Load(object sender, EventArgs e){ Sc...