Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 424
Pyae Phyo Aung Avatar asked Mar 12 '13 08:03

Pyae Phyo Aung


1 Answers

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:

enter image description here

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):

enter image description here

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:

enter image description here

like image 140
Kev Avatar answered Nov 03 '22 09:11

Kev