ASP is an old technology of Microsoft that even before .NET was born. I have used ASP 3.0 to create my first personal blog in 2003. Nowadays, it is hard to find ASP web applications still active on the internet. But we can still bring the 1996's classic ASP back to life on today's Windows 10 and even in Azure.

Some history


ASP and its successor, ASP.NET are completely different. ASP uses the VBScript/JScript (not JavaScript) script engine to execute on the server side and returns the generated HTML. ASP.NET on the other hand, whether it is an ancient WebForm or a modern MVC, needs to be compiled and executed by the .NET runtime. ASP's development tools don't have to be Visual Studio, any text editor will do the job. So we don't need to install special development tools for writing ASP code today. VSCode, and even notepad will do the job.

Run ASP on Windows 10


Because ASP is way too old, IIS in Windows 10 does not enable ASP support by default, so we need to find it manually and turn it on.

Run "appwiz.cpl", and select "ASP" under Windows features / Internet Information Services

Go to Application Pools and create a new application pool just for ASP environment named Classic ASP

Set .NET CLR Version to No Managed Code. This is because ASP is not executed by .NET, there is no need for CLR to exist. 

Set Managed pipleline mode to Classic. (Optional, but it's more ASPish way to make IIS more "decouple" with ASP.NET pipeline).

Enter Advanced Settings of this application pool

Set Enable 32-Bit Applications to True. Because at the age of ASP, computers aren't 64 bit architecture, the VBScript engine can only run at 32 bit.

Now, create an empty folder in your local drive, set it as an Application or a Website under IIS. E.g.: helloasp pointing to D:\Workspace\OldSchool

And set it's Application Pool to use Classic ASP.

Prepare an ASP test page

Create a new file named "default.asp" under the website's root directory.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Hello ASP</title>
</head>
<body>
    <% Response.Write("I am back!") %>
</body>
</html>

In this code, <% Response.Write("I am back!") %> is an ASP code to output content.

It's interesting that ASP would have never dreamed that one day it will be written in Visual Studio Code:

Back to IIS and browse our website, you will see this ASP page running:

If doesn't, check if "default.asp" is in your Default Document settings in IIS.

Run ASP in Azure App Service


Azure App Service actually supports ASP although it's not mentioned in the official materials. But one premise is that in order to run ASP, your App Service Plan environment must be Windows.

Enter Configuration in App Service settings.

Under General settings, set Platform to 32 Bit, and change Managed pipeline version to Classic. Although ASP is not in the Stack list, but keeping it as .NET 4.7 won't affect anything.

If you like, you can change HTTP Version to use 2.0. ASP would never have seen itself running under HTTP2 on a cloud PaaS system, interesting!