经典Asp .asp扩展页的处理程序映射在IIS集成管道模式下给出错误 [英] Handler Mapping For Classic Asp .asp extension pages giving errors at IIS Integrated Pipe Line Mode

查看:89
本文介绍了经典Asp .asp扩展页的处理程序映射在IIS集成管道模式下给出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在IIS 7 集成管道模式下运行经典的Asp页面.因此,我将以下处理程序映射添加到Web.Config中.

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" 

但是,当请求.asp页时,会出现服务器应用程序不可用错误,并且详细的应用程序事件日志显示:

在集成.NET模式下运行的应用程序池中发出了映射到aspnet_isapi.dll的请求.仅当在经典.NET模式下运行时,才能使用Aspnet_isapi.dll.请在处理程序映射上指定preCondition ="ISAPImode"以使其仅在以Classic .NET模式运行的应用程序池中运行,或将应用程序移至以Classic .NET模式运行的另一个应用程序池,以使用此处理程序映射./p>

我哪里出错了?

解决方案

Classic ASP的脚本处理器不是:

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

但是:

%windir%\system32\inetsrv\asp.dll

在安装经典ASP时,这是IIS7 applicationHost.config文件中正确的处理程序映射条目:

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

听起来您没有在服务器或工作站上安装Classic ASP.

在Windows 7上,您需要转到控制面板->程序和功能,然后单击打开或关闭Windows功能".您将获得一个如下所示的窗口,请确保已选中"ASP":

在Windows 2008R2上,转到控制面板->管理工具->服务器管理器.单击左侧面板中的角色",然后向下滚动到"Web服务器(IIS)".应该有一个这样的角色服务"列表(我突出显示了从屏幕截图中获取的服务器上安装的ASP):

如果未安装ASP,则单击添加角色服务",然后在 Web服务器->应用程序开发下选中ASP复选框,然后单击下一步"完成安装.

如果一切正常,那么您应该在IIS管理器中看到处理程序映射:

I am trying to run classic Asp pages in the IIS 7 Integrated pipe line mode. Thus, I have added following Handler mapping into Web.Config.

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:

A request mapped to aspnet_isapi.dll was made within an application pool running in Integrated .NET mode. Aspnet_isapi.dll can only be used when running in Classic .NET mode. 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.

Where did I go wrong?

解决方案

The script processor for Classic ASP is not:

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:

<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.

On Windows 7 you need to go to Control Panel -> Programs and Features then click "Turn Windows features on or off". You'll get a window that looks like this, make sure "ASP" is ticked:

On Windows 2008R2 go to Control Panel -> Administrative Tools -> Server Manager. Click on "Roles" in the left hand panel then scroll down to "Web Server (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):

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.

If all is well then you should see the Handler Mapping in IIS Manager:

这篇关于经典Asp .asp扩展页的处理程序映射在IIS集成管道模式下给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆