我安装了DotNetOpenAuth SDK-3.4.5.10201。vsix,我不能让它工作。它在本地工作(当我作为localhost运行时),但当我尝试发布它不工作。

我得到的IIS错误消息是:

错误总结 HTTP错误500.22 -内部服务器错误 一个ASP。检测到在集成管理管道模式中不适用的NET设置。

and:

模块ConfigurationValidationModule 通知BeginRequest 处理程序StaticFile 错误码0x80070032

下面就如何解决这个问题给出一些建议:

Things you can try: Migrate the configuration to the system.webServer/modules section. You can do so manually or by using AppCmd from the command line - for example, %SystemRoot%\system32\inetsrv\appcmd migrate config "Default Web Site/". Using AppCmd to migrate your application will enable it to work in Integrated mode, and continue to work in Classic mode and on previous versions of IIS. If you are certain that it is OK to ignore this error, it can be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false. Alternatively, switch the application to a Classic mode application pool - for example, %SystemRoot%\system32\inetsrv\appcmd set app "Default Web Site/" /applicationPool:"Classic .NET AppPool". Only do this if you are unable to migrate your application. (Set "Default Web Site" and "Classic .NET AppPool" to your application path and application pool name)

问题是我没有访问ISS服务器的权限,因为我不是它的所有者。有办法解决这个问题吗?


当前回答

添加<validation validateIntegratedModeConfiguration="false"/>可以解决问题,但并不适用于所有情况。我已经在这个问题上跑了几次,我希望帮助其他人不仅克服这个问题,而且理解它。(随着iis6逐渐成为神话和谣言,这一点变得越来越重要。)

背景:

这个问题和围绕它的困惑始于ASP的引入。NET 2.0和iis7。IIS 6过去和现在都只有一种管道模式,它相当于IIS 7+所称的“经典”模式。对于运行在iis7 +上的所有应用程序,第二种较新的、推荐的管道模式称为“集成”模式。

那么,有什么不同呢?关键的区别在于ASP。NET与IIS交互。

Classic mode is limited to an ASP.NET pipeline that cannot interact with the IIS pipeline. Essentially a request comes in and if IIS 6/Classic has been told, through server configuration, that ASP.NET can handle it then IIS hands off the request to ASP.NET and moves on. The significance of this can be gleaned from an example. If I were to authorize access to static image files, I would not be able to do it with an ASP.NET module because the IIS 6 pipeline will handle those requests itself and ASP.NET will never see those requests because they were never handed off.* On the other hand, authorizing which users can access a .ASPX page such as a request for Foo.aspx is trivial even in IIS 6/Classic because IIS always hands those requests off to the ASP.NET pipeline. In Classic mode ASP.NET does not know what it hasn't been told and there is a lot that IIS 6/Classic may not be telling it. Integrated mode is recommended because ASP.NET handlers and modules can interact directly with the IIS pipeline. No longer does the IIS pipeline simply hand off the request to the ASP.NET pipeline, now it allows ASP.NET code to hook directly into the IIS pipeline and all the requests that hit it. This means that an ASP.NET module can not only observe requests to static image files, but can intercept those requests and take action by denying access, logging the request, etc.

克服错误:

If you are running an older application that was originally built for IIS 6, perhaps you moved it to a new server, there may be absolutely nothing wrong with running the application pool of that application in Classic mode. Go ahead you don't have to feel bad. Then again maybe you are giving your application a face-lift or it was chugging along just fine until you installed a 3rd party library via NuGet, manually, or by some other means. In that case it is entirely possible httpHandlers or httpModules have been added to system.web. The outcome is the error that you are seeing because validateIntegratedModeConfiguration defaults true. Now you have two choices: Remove the httpHandlers and httpModules elements from system.web. There are a couple possible outcomes from this: Everything works fine, a common outcome; Your application continues to complain, there may be a web.config in a parent folder you are inheriting from, consider cleaning up that web.config too; You grow tired of removing the httpHandlers and httpModules that NuGet packages keep adding to system.web, hey do what you need to. If those options do not work or are more trouble than it is worth then I'm not going to tell you that you can't set validateIntegratedModeConfiguration to false, but at least you know what you're doing and why it matters.

好读:

ASP。IIS 7.0上的NET 2.0突破性更改 ASP。与iis7集成 HTTP处理程序和HTTP模块概述

当然,有很多方法可以把各种奇怪的东西放到ASP中。NET管道从iis6 /Classic通过咒语,如通配符映射,如果你喜欢这样的事情。

其他回答

这招对我很管用:

删除原创建的站点。 在IIS中重新创建站点 清洁解决方案 构建解决方案

我刚创建这个网站的时候好像出了问题。我讨厌类似于“重新启动机器,然后重新安装窗口”的解决方案,而不知道是什么导致了错误。但是,这对我很有效。简单快捷。希望它能帮助到其他人。

在你的网里。配置确保这些键存在:

<configuration>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
    </system.webServer>
</configuration>

以及检查Asp。Net impression =在IIS站点认证中禁用

我花了几个小时来解决这个问题,因为我在这里找到的关于这个错误的所有设置都是一样的,但它仍然不工作。 问题是我在我的web服务中有一个文件夹,文件应该从这个文件夹发送到WinCE设备,在将该文件夹转换为经典应用程序后。netappool开始工作了。

在我的情况下,我在bin文件夹中丢失了dll,在web中引用。配置文件。 检查一下你是否使用了web中的任何设置。配置,但实际上没有dll。

谢谢

我们在部署Azure应用程序服务时遇到了这个问题。我们的问题是我们必须从系统中移动模块。Web /httpmodules到system.webserver/modules。按工作方式移动子条目。这似乎与应用程序的年龄和它在升级到Azure应用程序服务之前运行的IIS实例有关。