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.
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!
<% Response.Write("<script>This page is hacked! 😂😂😂</script>") %>
Thanks! It works!
It's not actually nessecary to enable 32-bit support unless your Classic ASP application uses 32-bit COM objects. It will run fine without enabling 32-bit support.
Thanks for the helpful post. It looks like I have to have IIS Web Management Tools enabled in the first step to get started on adding an IIS app pool.
Thank you very much. This made installing a working environment to support legacy classic ASP very simple and straightforward. An excellent tutorial, which I have saved for future reference.
As Erik points out, you don't necessarily have to set enable 32 bit applications to True. The issue arises because a lot of Classic ASP hobby sites use a JET database (otherwise known as an mdb format Access database) for the back end. the ODBC and OLEDB drivers for JET are 32 bit only. If you're using SQL Server or MySQL then the it doesn't matter. You might also find your site depends on an old third party component which is 32 bit only.
You're missing steps. "Run ASP in Azure App Service" If you're writing a tutorial it's not a good idea to assume people already know where everything is. That's the whole purpose of a tutorial.
Thanks for your post. There are so many options for Windows 10 that you over look them.
Thanks for your tutorial. It worked for me.😊
Excellent! Worked for me! Thank you for sharing :)
Thank you very much. You have saved me who knows how many hours...
Great article! How do I enable "EnableParentsPaths" support in Azure for Classic ASP pages?
thanks it's work for me thank you
Dear Edi Wang Thank you very much indeed for your clear and fully detailed explanation of how to enable Classic Asp on IIS. Very different from many guides one finds which skip all the steps obvious to the writer but not the reader, and are often wrong beside. But a question: vbcript is enabled; but not, apparently database usage. Well not DAO anyway. Is there any help with that avaialble? (I know, its an ancient system, but...) In any case, thanks again for getting me this far Denis