【发布时间】:2015-10-06 17:45:08
【问题描述】:
在VS2013 项目设置中,我将ASP.NET Web API 应用程序从IIS EXPRESS 更改为在同一台计算机上的IIS 中运行。它在IIS Express 中工作,但如果没有关于ExtensionlessUrlHandler-Integrated-4.0 的错误,我无法让它在IIS 中运行
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
我已经尝试了下面帖子中的所有内容,但除了将应用程序池从 Integrated 更改为 Classic 之外,没有任何方法可以阻止此错误。该选项也不起作用,因为会带来更多错误。
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode
我正在使用 VS 2013、ASP.NET 4.5.1、IIS 7.5,它在 Windows Server 2008 R2 Standard 上运行
这是我的 web.config system.web 和 webserver 部分
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<customErrors mode="Off" />
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="false">
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
这是返回的错误
Server Error in Application "DEFAULT WEB SITE"
Internet Information Services 7.5
Error Summary
HTTP Error 500.24 - Internal Server Error
An ASP.NET setting has been detected that does not apply in
Integrated managed pipeline mode.
Detailed Error Information
ModuleConfigurationValidationModule NotificationBeginRequest HandlerExtensionlessUrlHandler-Integrated-4.0
Error Code0x80070032
Requested URL http://localhost:80/Token
Physical Path C:\inetpub\wwwroot\Token
Logon Method Not yet determined
Logon User Not yet determined
Failed Request
Tracing Log Directory C:\inetpub\logs\FailedReqLogFiles
Most likely causes: system.web/identity@impersonate is set to true.
Things you can try: If the application supports it, disable client impersonation.
If you are certain that it is OK to ignore this error, it can
be disabled by setting system.webServer/validation@validateIntegratedModeConfiguration to false.
Move this application to an application pool using Classic .NET mode
- for example, %SystemRoot%\system32\inetsrv\appcmd set app "Default Web Site/" /applicationPool:"Classic .NET AppPool"
(You can set "Classic .NET AppPool" to the name of another application pool running in Classic managed pipeline mode)
【问题讨论】:
标签: asp.net visual-studio iis