Getting Classic ASP to run on IIS8.5 comes with a few gotchas that can easily cause problems well beyond what you might expect. In the article below I’ll review the general steps and guidelines that I figured out through trial and error by going through the process myself.
To enable ASP on IIS8.5:
For starters you’ll need to configure your server to allow Classic ASP to run. This might come as a bit of a shock to developers who are used to earlier versions of IIS where Classic ASP was enabled by default. However in IIS 7 and above, you will need to intentionally enable IIS to run ASP.
Here is a link to a support site that gives the step by step instructions for setting up IIS with ASP.NET. This should be enough to get your server going and serving up basic .NET Web sites.
I found that my instance of IIS8 was different from the version in their explanation, but in general the article was decent.
IIS 8.0 Using ASP.NET 3.5 and ASP.NET 4.5
Configuring IIS8 to Serve Classic ASP Sites:
After I had set up my server to host basic sites, I needed to update the configuration to include the ability to host Classic ASP. Here are the steps I took to do so:
- Log onto the Windows Server 2012 machine
- Open Control Panel
- Click to open the Server Manager UI
- Click Add Roles
- Under Installation Type select: Role-based or Feature-Based Installation
- Go through next button if you haven’t configured IIS yet and this is the first time on your Server
- Click on the Server Roles option on the left-hand menu
- Under Roles in the middle screen, scroll down to the option: Web Server (IIS) and open up this option
- Expand the Web Server option
- Find and expand the Application Development option
- You should see the option now to enable ASP. Click the ASP checkbox
- Click the Next button until you reach the confirmation screen, then click the Install option
- Congratulations – Your Web Server will now be set to serve and run classic ASP applications
Keep your Sanity: Enable Errors
Ok, so if you want to stay sane, then you should definitely update IIS to output errors to your browser. You can always disable this in future for security reasons, but when you are setting up your site, it’s very important to know why it is not cooperating:
Specifically, by default IIS7 and above will not send detailed error messages to the browser… you need to allow this manually. If you are stumped as to why your application isn’t working here’s how to get a visual of what’s going wrong behind the scenes:
- In IIS, click your Web site. Click the ASP option in the main window.
- Expand the Debugging Properties option.
- Change to true the option to: Enable Client-Side Debugging
- Change to true the option to: Enable Server-Side Debugging
- Change to true the option to: Send Errors to Browser
Also under the option Enable Parent Paths, set this value to True. This allows you to use the .. notation in your ASP code to traverse directories. Again, for security reasons, Microsoft has disabled this by default.
Getting Further Insight into Errors
If you get errors running your application, then remember that you can also look into the IIS Web site error logs, which are usually found at: C:\inetpub\logs\LogFiles
This is a great resource in addition to viewing errors in browser that should be able to help you track down even the most obscure bug.
Don’t Forget to Escalate your Security
As part of your debugging efforts, you’ll need to change files and test the changes to make sure that IIS is serving your ASP files correctly. While you are doing this, make sure you temporarily escalate your account security level so that you can actually save the changes you are making. By default Windows Server 2012 likes to give the lowest possible permissions, so…
As an admin-level account:
- Right Click the folder you will be working with… this is typically the root Web site folder
- Click the Edit button to change permissions
- Add your account to the list of users and ensure that you have modify as well as write access to the folder (along with the standard: Read, List folder contents, Read & execute)… or just set yourself to full control.
Note that you will need to also give yourself permissions for each sub-folder. Windows 2012 does not automatically propagate your new permissions settings to sub folders unlike earlier versions of Windows. This ends up being annoying, but I guess it is all for enhanced security so I can’t really complain (too much).
Further Handy Resources
Here is a link to the Official Microsoft support site to help you get your Classic ASP applications running under IIS7 and IIS8. There are some very handy resources, so it is worth having a look:
Running Classic ASP Applications on IIS 7 and IIS 8
Optional MIME types:
If you get issues with rendering ASP pages, you may need to check into setting up the MIME types for your site. I did not end up needing to do this, but in case you do, you can add ASP MIME types as follows:
Here is a site that lists many useful Mime types and the files extensions to set for them. Note that some of the newer MS Office extensions aren’t listed here:
Site with a chart that shows you a list of common MIME types and their corresponding file extensions
Try out this site for another large list of extensions. These include some of the more recent MS Office document types:
14 thoughts on “Enabling Classic ASP on IIS8 (Windows Server 2012)”
Thanks, it has helped me a lot!
You are very welcome, I am glad the article was helpful.
Thanx it was short and nice.
Thank you , you saved my day !!
I’m glad the article was useful, thanks for letting me know!
I’ll be needing this very soon. Thanks for publishing this.
Not a problem, I’m glad you found the article helpful.
Good article, found it helpful.
I had to reboot the computer in order for Classic ASP configuration icon to appear
Perfect Information. Thank you
Thank you. You saved me from getting bald.
I have migrated classis ASP website from IIS6 & 2003 server to IIS 8.5 and windows server 2012.
Most of the things are working good except the Request.ServerVariables(“LOGON_USER”). It is empty always. Please help me to resolved this issue.
Excellent post Justin. I noticed something odd after migrating my .asp site over to windows 2012: seems IIS 8 is caching the web site. I have pages that I’ve deleted that still appear in the browser, and new pages are not being found. I’ve set the Output Caching to not caches .asp pages to no avail. Have you run across this before? Thanks for your time.