简体   繁体   English

经典Asp .asp扩展页的处理程序映射在IIS集成管道模式下出错

[英]Handler Mapping For Classic Asp .asp extension pages giving errors at IIS Integrated Pipe Line Mode

I am trying to run classic Asp pages in the IIS 7 Integrated pipe line mode. 我试图在IIS 7 集成管道模式下运行经典的Asp页面。 Thus, I have added following Handler mapping into Web.Config. 因此,我在Web.Config中添加了以下Handler映射。

add name="ASPClassic" 
path="*.asp" 
verb="GET,HEAD,POST" 
modules="IsapiModule" 
scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" 
requireAccess="Script"
resourceType="Unspecified" 

But, when .asp pages are being requested, Server Application Unavailable error is raised and the detailed application event log said that: 但是,当请求.asp页面时,会引发Server Application Unavailable错误,并且详细的应用程序事件日志表示:

A request mapped to aspnet_isapi.dll was made within an application pool running in Integrated .NET mode. 映射到aspnet_isapi.dll的请求是在以集成.NET模式运行的应用程序池中进行的。 Aspnet_isapi.dll can only be used when running in Classic .NET mode. Aspnet_isapi.dll只能在Classic .NET模式下运行时使用。 Please either specify preCondition="ISAPImode" on the handler mapping to make it run only in application pools running in Classic .NET mode, or move the application to another application pool running in Classic .NET mode in order to use this handler mapping. 请在处理程序映射上指定preCondition =“ISAPImode”,使其仅在以Classic .NET模式运行的应用程序池中运行,或者将应用程序移动到以Classic .NET模式运行的另一个应用程序池,以便使用此处理程序映射。

Where did I go wrong? 我哪里做错了?

The script processor for Classic ASP is not: Classic ASP的脚本处理器不是:

C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_isapi.dll

but: 但:

%windir%\\system32\\inetsrv\\asp.dll

Here's the correct handler mapping entry from IIS7's applicationHost.config file when Classic ASP is installed: 这是安装Classic ASP时IIS7的applicationHost.config文件中正确的处理程序映射条目:

<add name="ASPClassic" 
     path="*.asp" 
     verb="GET,HEAD,POST" 
     modules="IsapiModule" 
     scriptProcessor="%windir%\system32\inetsrv\asp.dll" 
     resourceType="File" />

It sounds like you've not installed Classic ASP on your server or workstation. 听起来您没有在服务器或工作站上安装Classic ASP。

On Windows 7 you need to go to Control Panel -> Programs and Features then click "Turn Windows features on or off". 在Windows 7上,您需要转到“ 控制面板” - >“程序和功能”,然后单击“打开或关闭Windows功能”。 You'll get a window that looks like this, make sure "ASP" is ticked: 你会得到一个看起来像这样的窗口,确保勾选“ASP”:

在此输入图像描述

On Windows 2008R2 go to Control Panel -> Administrative Tools -> Server Manager . 在Windows 2008R2上,转到“ 控制面板” - >“管理工具” - >“服务器管理器” Click on "Roles" in the left hand panel then scroll down to "Web Server (IIS)". 单击左侧面板中的“角色”,然后向下滚动到“Web服务器(IIS)”。 There should be a list of "Role Services" like this (I've highlighted ASP which is installed on the server I took this screen shot from): 应该有一个像这样的“角色服务”列表(我已经突出显示了安装在我拍摄此屏幕截图的服务器上的ASP):

在此输入图像描述

If ASP is not installed then click on "Add Role Services" and tick the ASP checkbox under Web Server -> Application Development and click Next to complete the installation. 如果未安装ASP,则单击“添加角色服务”并勾选Web服务器 - >应用程序开发下的ASP复选框,然后单击下一步以完成安装。

If all is well then you should see the Handler Mapping in IIS Manager: 如果一切顺利,那么您应该在IIS管理器中看到处理程序映射:

在此输入图像描述

Could it be that in order to run classic asp pages in IIS 7 you still need to install that? 可能是因为为了在IIS 7中运行经典的asp页面,你还需要安装它吗? (It is not Installed by Default on IIS 7.) (IIS 7上未默认安装)

See here how to add the asp module depending on wether this your on windows7 or windows server 2008 : http://www.iis.net/configreference/system.webserver/asp 请参阅此处如何添加asp模块,具体取决于您在Windows7或Windows Server 2008上的内容: http//www.iis.net/configreference/system.webserver/asp

Btw: what you are trying to do is indeed script mapping in classic pipeline mode. 顺便说一下:你要做的是确实在经典流水线模式下进行脚本映射。
See also : http://www.iis.net/learn/application-frameworks/building-and-running-aspnet-applications/wildcard-script-mapping-and-iis-integrated-pipeline_ 另见: http//www.iis.net/learn/application-frameworks/building-and-running-aspnet-applications/wildcard-script-mapping-and-iis-integrated-pipeline_

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM