我安装了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通过咒语,如通配符映射,如果你喜欢这样的事情。
添加<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通过咒语,如通配符映射,如果你喜欢这样的事情。