-->

How do I setup IIS 7.5 for Classic ASP on windows

2020-04-18 06:52发布

问题:

I'm a java developer that has been tasked with some Classic ASP work. I'm trying to setup IIS 7.5 in Windows 7 64 bit and was able to get the server configured to get the localhost screen for IIS to show up. I found this setup link from MS, but it just had the basics.

What I'm attempting is to display the ASP's and also to setup Visual Studio for debugging, but what I've found on the web has been confusing to say the least.

I have Visual Studio 2010 and the asp's aren't in the regular folder structure like c:\inetpub\wwwroot\, but are in a main directory, like c:/projects/asps/ with other folders called includes, css, images, etc... The asps are all in the asps and includes directories.

What is the simplest way to setup classic asp's for display and debugging for windows 7, given this folder structure? By the way, I believe we are using ASP 2.0 in this application, but I'm not sure how to tell.

Right now I'm getting this error trying to hit a default.asp file in the root:

Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /LM/W3SVC/2/ROOT/global.asa, line 48 800401f3

It's when it first tries to create an object in the global.asa file, so maybe I need to register a dll or something?

回答1:

Step 1. Create root folder for your site and move all your files, folders into it.

Step 2. Create application pool and make sure that you assigned it to run as no managed code. Pipeline as classic. Make sure that your site have this app pool assigned to it.

Step 3. Enable ASP in your IIS Management panel. By default in IIS 7+ it is disabled.

Step 4. Verify that your ISAPI restrictions points to proper dlls to run ASP not asp.net.

Step 5. Define default documents

Step 6. Run your site

In regards of debugging classic asp - you can dream about it. Only way to debug those suckers is to use response.write before and after each line of code where you suspect failure occurs. Visual studio does not provide any tools to debug classic asp sites. To work with your classic ASP site in VS2010 you will need to open it as a web site not a project. Just use open web site and point to the folder where your site lives.



回答2:

I used the information from this link: How to setup IIS 7 for Classic ASP. Even though I was using IIS 7.5, I followed the same instructions, except that I added in a virtual directory.

Then I commented out the offending lines in the global.asa file. Basically it was pointing to the registry to get server information, hence my error as I was trying to run things locally on my machine.

After that I was able to hit the default.asp at the root and bring it up.



回答3:

IIS 7.5 on 64bit has dissabled ASP Classic because is 32bit native code. You need activate the 32bit option on IIS check this tutorial from microsoft: http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis