Link to home
Start Free TrialLog in
Avatar of OneCorner
OneCorner

asked on

how to deploy classic ASP on XP with IIS 5.1

Hi,

I have old classic ASP pages set up and run fine on the test server.  I want to bring the ASP pages down to my local machine and set it up to run.  Can someone tell me how to set up classic ASP pages on IIS 5.1?

Thanks,
OneCorner.
Avatar of purplepomegranite
purplepomegranite
Flag of United Kingdom of Great Britain and Northern Ireland image

IIS 5.1 should support classic ASP natively i.e. installing it from Add/Remove Windows Components will make ASP available.

http://www.microsoft.com/windowsxp/evaluation/features/iis.mspx
Avatar of OneCorner
OneCorner

ASKER

I already have IIS 5.1 installed and set up.  I am asking if someone can tell step by step how to create a web site in IIS
Avatar of Loganathan Natarajan
I went thru all the links you recomemded above.  However,  It is still not working.  
Ok, what exactly is not working?

Once you have installed IIS (without modifying the website settings within IIS admin), you get an Inetpub folder, within which is wwwroot.  The wwwroot folder is basically the root of your website.  Within here you can put asp and html files, and then browse to them in your web-browser using http://localhost/file.htm (in this case, file.htm would be located in the wwwroot folder).

ASP files should be processed automatically as ASP, you don't need to configure this.

Please elaborate on the exact problem you have.
This is what and why it is not working.

1) On the Windows 2003 server, we have IIS 6.0.  In the virtual directory where all the ASP pages live, it is called c:\inetpub\wwwroot\ASP_Pages\lib1\asp_page1_lib1.asp,
..\..\ASP_Pages\lib1\OpenConn.inc,....so on and ...
2) In the .asp, .inc and .fnc files, these files were referencing to as follows:
<!-- #include virtual = "lib1/OpenConn.inc" -->
<!-- #include virtual = "lib1/CommonFunctions.inc" -->
<!--#include virtual = "lib2/SessionConfirm.inc" -->
<!--#include virtual = "lib2/Transactions_new.fnc" -->
<!--#include virtual = "lib3/Products.fnc" -->

3) In the IIS 6.0, I created a new website and pointed to the cirtual directory, c:\inetpub\wwwroot\ASP_Pages.

Everything work just fine.  However, when I copy the ASP_Pages folder down to my laptop with XP and IIS 5.1.  I did the followings:

1) On my laptop, I copied ASP_Pages folder to c:\inetpub\wwwroot.
2) Open up the IIS 5.1, Web Sites, Default Web Sites.  The ASP_Pages folder is shown under Default Web Sites.
3) Right mouse click on the folder, Properties, Click on the "Create" button, set the "Execute Permission" to "Scripts Only", clicked on "Document" tab and set the "Default.asp" to be first.
4) Open up the IE browser and type in "http://localhost/Intralock/login.asp"
5) It displayed that the page can not be displayed.  

I did the followings to fix it:

1) In all the files with the followings, I have to add "ASP_Pages" in infront of "lib1"
<!-- #include virtual = "ASP_Pages/lib1/OpenConn.inc" -->
<!-- #include virtual = "ASP_Pages/lib1/CommonFunctions.inc" -->
<!--#include virtual = "ASP_Pages/lib2/SessionConfirm.inc" -->
<!--#include virtual = "ASP_Pages/lib2/Transactions_new.fnc" -->
<!--#include virtual = "ASP_Pages/lib3/Products.fnc" -->

WHY DO I HAVE TO ADD "ASP_Pages"?  I DO NOT WANT TO DO THIS.  THE REASON IS THAT I HAVE TO SEARCH EVERY SINGLE FILE TO INSERT "ASP_Pages" INTO.  WHAT CAN I DO TO NOT TO INSERT IT IN?

Thanks!

The VIRTUAL tag you are using means that the path is relative to the base folder of the website.  In your case, this appears to be c:\inetpub\wwwroot.  So the current behaviour is correct.

When you browse to http://localhost/Intralock/login.asp, you are browsing to a page in the default website - not the one you have created.  The easiest way to overcome the problem would be to change the default website root folder to c:\inetpub\wwwroot\ASP_Pages.  Or, change the port for the website you have created (e.g. make it port 81) and browse to the site including port number, e.g. http://localhost:81/Intralock/login.asp
In IIS 5.1, To change the port to 81 has to be done at the Default Web Sites level.  Then all the virtual directories created under the default web sites will be using port 81.  Please make me understand this.  I don't quite get it.  It is clear and easier to understand with IIS 6.0 than 5.1 to me.
Point 3 above, you said you create a new WEBSITE.  Did you mean virtual directory, or website?  Each website in IIS 5 or 6 can have it's own port.  Have you got more than one website, or are all your folders under the default website?
In IIS 6.0, I created individual web site.  In 5.1, all my folders under the default website.
By the way,  I looked into the IIS 5.1 and 6.0.  In 5.1, ti does not allow you to create individual website.  Everything is under default website.  In 6.0, you can create individual website.
Really?  Haven't got IIS5.1 to hand to check, but am surprised, I'm sure I've created new websites in the past - though having said this, the XP version of IIS has been limited (and I have mainly dealt with server versions), so maybe the server version is different.

If everything is under the default website, you need to ensure that the links work in relation to the site root.  In this case, it would mean changing the site root to c:\inetpub\wwwroot\ASP_Pages, as then your include links are valid.
You meant to say changing the site root to c:\inetpub\wwwroot\ASP_Pages at the Default website level and in the "Home Directory" tab.  If that the case, what about other folders are not belonged to ASP_Pages?  What will be their "Home Directory"?  Again all folders are under the same default website level.

The point I am making is that your include statements are this:
<!--#include virtual = "lib3/Products.fnc" -->

This means that the folder references (i.e. lib3) must reside in the root directory.  Which is c:\inetpub\wwwroot.  To not have to include the ASP_Pages reference, you need to either change your site root or move the lib3 etc. folders.  Either of these solutions will of course have knock on effects, as you mention.

One thing I have just looked up and checked is that IIS5.1 is ONLY available on Windows XP Pro.  The version I was thinking was the Win2k server version - but this is actually 5.0 - so there may be differences.

I will install IIS5.1 on a virtual machine when I have the time (maybe later on today) and see what options there are.  The only other solution to your problem is if you are able to specify an includes folder that IIS will look in for ASP include files.  I do not know if this is an available option, so will have to check.
Let me know once you have a chance to check it.  I don't think that I want to move the lib3 and other folders out to the root folder.
Any more ideas?  Thanks!

Ok! What I did was that I copied the project folder of the ASP pages in d:\inetpub\wwwroot\Test_MMS.  I then changed the home directory of the virtual path in IIS to point to d:\inetpub\wwwroot\Test_MMS instead of c:\inetpub\wwwroot.  However, it is still not working.  It is still complainning that a function file is not found, but the function file is there.

Good news!  I got it to work.  However, I have questions.  They are:

1) In IIS 6.0, I would be able to name the Host Header Value for each website.  How do I do that in IIS 5.1?

2) In IIS 6.0, I have to switch back and forward in the properties of the websites if I want to use the http://localhost/... for different website.  I just need to delete the "IP address: Default, TCP port:80" in the Advanced WebSite Identification(AWSI) in the Properties in one website and add the "Default 80" in AWSI in the Properties of another website.  In IIS 5.1, how would I do that?

Sorry for not getting back to you - still haven't managed to check on a virtual machine.  However, should be able to do that now so will post back shortly.
In IIS5.1 you can add the host header value in the same way as 6.0:
- right-click default website, properties
- under website tab, click Advanced
- click Add.  You can add another (or the same) port with a different Host Header value.

This of course will still point to the same website.  To create new websites in IIS5.1 (MS have hidden the functionality from the MMS console), there is a good article here: http://andreineculau.wordpress.com/2006/01/23/multiple-websites-using-iis-51-on-windows-xp/

Once the new websites are added, you can adjust them accordingly.

2.  The same way, once you have more than one website (as opposed to just virtual directories).

I think the guide on adding more than one website above will solve most of your issues now.
I'll read the link to send to me regarding IIS 5.1 with multiple websites as active localhost as http://localhost/Test1/....  and http://localhost/Test2/....  .  I still don't get it how you can create multiple web sites in 5.1.  Even in IIS 6.0, I still have to switch back and forward on localhost.  

Any other ideas, please update me!  Thanks!
ASKER CERTIFIED SOLUTION
Avatar of purplepomegranite
purplepomegranite
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial