Link to home
Start Free TrialLog in
Avatar of Robert Batchelor
Robert BatchelorFlag for United States of America

asked on

How do I test my website with ASPs locally?

I have a lot of experience with MS Access and just a little with HTML and ASPs via MS FrontPage.  I have inherited a very simple website with just a few ASPs and about 20MB of data.   I need to test it on my computer because my satellite upload speed is very slow.  How do I test my website with ASPs locally?  Would a program like ASP.Net Web Matrix help?  I have MS Office 2003 Pro and Windows XP Pro.
Avatar of b0lsc0tt
b0lsc0tt
Flag of United States of America image

bobbat,

You use IIS (Internet Information Services).  It is a service that should already be installed but is probably not running on your XP Pro computer.  You can copy the website files to the wwwroot folder (e.g. C:\Inetpub\wwwroot) or add the folder to IIS as a "website."  You can usually access a management program (Internet Services Manager or Personal Web Manager) from the Administrative Tools folder in your Control Panel.  Once it is running then you can test the site using a url like http://localhost/test.asp.

If you will be testing a database then your setup will depend on the type of connection you are using in your code.  You can set up a data source in the Administrative Tools folder if that is what you need.

Let me know what details I can provide to help you or if you have any questions.

b0lsc0tt
Both the above solutions are correct. the below is to make the installation simple.


Make sure you have IIS installed in your Windows XP pro Machine. There are many ways to test IIS one of the way is open your internet explorer and type http://localhost and press enter, if IIS is allready setup then the default page will be opened.

If IIS is not installed then you need windows xp pro CD. Insert your CD in CDROM mostly it will start automatically there you select "Install Optional Components" then you select "Internet Information Services" in it.

Once the Installation is completed, then you browse through c:\inetpub\wwwroot forlder. This the root folder inside wwwroot folde create another folder and copy all your website files in it.

2 things you have to take care is.

1) Check the path of the Database in your application if you are using App.MapPath then the database should be copied into wwwroot folder.

2) Where ever your database resides give read write permissions to that folder.

You can access your site with http://localhost/<folder Name>/<your starting page>


IIS comes with windows. run the same cd and choose INSTALL OPTIONAL SERVICE/OPTION PROGRAME i forgot the exact word. it wil install IIS. u can also download .net service from ms web site.
www.microsoft.com/downloads/ details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&displaylang=en

Avatar of Robert Batchelor

ASKER

Thanks to everyone...

There are optional program within IIS such as FrontPage 2000 Server Extentions and some of those options have options have options.

Which do I load?
I loaded the options I thought I would need and got the welcome page: http://localhost/localstart.asp

Now what?

Is the .net service running now?  If so, do I have to manually download updates from Microsoft?

I have the following folders on my ftp site:
_vti_cnf and
webroot.             My Access Database in a subfolder named fpdb.

Where and how do I move _vti_cnf and webroot to my http://localhost?
>>Is the .net service running now?
You need the .net framework. IIS alone is not enough.
http://msdn.microsoft.com/netframework/downloads/updates/default.aspx

hongjun
1. When you want to work only with ASP you dont need to worry about .NET service

2 Browse webroot folder and see whether your website files are exisitng in it if so then create a folder in
   C:\inetpub\wwwroot and download all the files from webroot into it.

3 For your database download the fpdb folder into c:\inetpub\wwwroot

Finally dont worry about _vti_cnf folder
Do I load the .NET Framework Version 2.0 Software Development Kit
Or
.NET Framework Version 2.0 Redistributable Package
Or
something else?
Redistributable.
But then if you don't need to run asp.net, then you don't really need it.
My website contains the following folders:
_vti_log, anonymous, aspnet_clinet, cgi-bin, fpdb, images, stats, upload

and the following files: 10 with an .asp extension, 10 with the .htm extension, 2 with the .html extension and 1 with an .asa extension.

What would be the best way to test the whole website including the asp?
forget about all the folders just download fpdb,images,stats,upload  folders and all your 10 asp 10 htm 2 html and 1 asa into wwwroot folder. As i suggested previously dont create any folder in C:\inetpub\wwwroot. Just download all the above said folders and files into C:\inetpub\wwwroot directly.


c:\
|
Intepub
          |
          wwwroot
                |
             fpdb
             images
             stats
             upload
             .htm (10 files)
             .asp (10 files)
             .html (2 files)
             .asa

I guess now it is clear how you should place your files and folders in your windows XP Pro computer.
I'm clear on the location of the folder & files.  I have another two hours to go in order to download the 345MB SDK file...
Ok all the best. Post here if you have any further difficulties
The NetFramework SDK dowload aborted at the 250MB out of 345MB point.  Not sure I need this for just ASP . . .

When I click on the index.htm file it opens OK and then I click on the login button.  When this page (login.asp) opens, it seems like I am in edit mode, i.e. the following text appears in the user name box: "<%=Request.Cookies("ADMIN")("N")%>".  If I enter a user name and password, the html and script behind the page appears.

But I want to be able to login like I do on the real Internet.  How do I do that?
dont worry about your SDK.

how are you opening index.htm page?

open like this http://localhost/index.htm then it will work
The index page opens and works but I get the same results as before.


There is a line in the global.asa file that shows the file name of the MDB File:
Application("Database1_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/Demo BE 839.mdb"

Does this have to change?

No it is an Application variable whose value is retained in every page. Nothing to cvhange in it. Do one thing zip all the .htm, .html, .asp and .asa files including database and upload in your website and give me the url to download it. I will check what changes are needed to be done in it
Go to: ftp://ftp.beautysequinerescue.org/

You are only interested in the file:  "File for cherukuri30.zip"
Disregard the other files in this website.  
 
Type in the user name:  "tresa0323"
Type in the PW:  "beauty06"
 
 
Bob & Theresa
Beauty's Haven Farm and Equine Rescue, Inc.
ok i will get back to you in next 3 to 4 hrs after testing it.
Hi Bob,

I tested your site based on the files i downloaded through ftp i found minor corrections to be done.

Modify 2 things

NUMBER 1

Open login.asp
Modify the blow lines

Original
<INPUT TYPE="text" NAME="UserName" size="55" VALUE='<%=Request.Cookies("ADMIN")("N")%>'></INPUT></TD>

Modified
<INPUT TYPE="text" NAME="UserName" size="55" VALUE='<%=Request.Cookies("ADMIN")("N")%>'></TD>

Original
<INPUT TYPE="password" NAME="password" size="55"></INPUT>&nbsp;

Modified
<INPUT TYPE="password" NAME="password" size="55">&nbsp;

Original
<INPUT TYPE="submit" VALUE="Login"></INPUT>

Modified
<INPUT TYPE="submit" VALUE="Login">

I just deleted </INPUT>

if you are confused with above modifications please download the login.asp file from bob folder in ftp and replace it in your local computer

NUMBER 2

Please download "_fpclass" folder into wwwroot folder and then try to open the website locally

http://localhost/index.htm


I renamed the login.asp file to loginORIGINAL.asp and the _fpClass folder to _fpClassORIGINAL and then copied your versions in the directory where the original are located.

Or was I supposed to overwrite them?

I still get "<%=Request.Cookies("ADMIN")("N")%>" in the user name box. . .
bob can u give me the url of you original site to browse. is it the same

www.beautysequinerescue.org
Go to http://www.lcpmci.com/

Double Click on the control that reads "Repair-Search Login"

Use a User Name and PW of BobP (case sensitive).

Select a Model Number then a Serial Number then view the status of the repair.

The data is dummy.
bob i uploaded a zip file (bob.zip) in your ftp site please download it and extract it. A folder with the name bob will be extracted, copy all the files from that folder into c:\inetpub\wwwroot folder and test the site

After testing locally i uploaded the files. Let me know if you are still encountering the same problem
Yes, same results.  I compacted and repaired the database but that had no affect.
bob this is something really strange , Lets make a small test on IIS copy the below script and paste it in a notepad

<%
Response.Write Time
%>

save the notepad as test.asp in c:\inetpub\wwwroot. make sure when you are trying to save the file in notepad change the "save type as" in the save dialog box.

after saving it open internet explorer and type http://localhost/test.asp and press enter you should see the time displayed in the internet explorer. Please let me know.
Thank you for you patience.  The time displayed was: 5:41:55 PM
Your IIS is perfectly installed before trying out different way can you goto internet explorer properties and can you clear the offline contents and cookies and try open the http://localhost/index.htm
It Works!!!!!!!!!!!!!!!!!!!!!!!!

This must be the longest Experts Exchange on record . . .

The only part that is not quite right is the FedEx Button:  The picture does not display and the tracking number does not appear in the tracking number box at the FedEx site.

Can you help me solve this too?
bob sometimes we overlook minor issues which makes us sweat :) anyway glad it worked for you. Now for your pictures
download the images folder from http://www.lcpmci.com/ and overwrite in c:\inetpub\wwwroot

:)
I get <%=Request.Cookies("ADMIN")("N")%> in the User Name box again.

I deleted cookies, offline content, temporary files (%temp%), and rebooted.

bob download the login.asp from bob folder from ftp site and overwrite in c:\inetpub\wwwroot and try it.

I made a small modification and uploaded the login.asp in bob folder
I do Not get <%=Request.Cookies("ADMIN")("N")%> in the User Name box.

When I click the login button it open to the code:
<%
        'Database Connection  --------
        set CN = Server.CreateObject("ADODB.Connection")
        CN.ConnectionString = Application("Database1_ConnectionString")
        CN.Open
      'Recordset  ------------------
      set RS = Server.CreateObject("ADODB.Recordset")
      strSQL = "SELECT Name, Password, UserNumber FROM qryUSysSecurity WHERE Name = '" & Request.Form("UserName") & "';"
      'Testing ------------
      'response.write "strSQL = " & strSQL & "<br>"
etc.
Bob there are only 2 possible reasons for this

1. you are not opening the index with http://localhost/index.htm (you might be going into c:\inetpub\wwwroot folder and double clicking the index.htm)

in ASP you have to always open http://localhost/index.htm in internet explorer only  
(you should not double click and open index.htm from folder)


OR


2. your IIS is working sometimes and sometimes it is not responding. Instead of going deep into it leats make it like this.

Uninstall IIS from your computer

start->settings->control panel->add/remove programs->add/remove windows components->uncheck IIS and click ok this will uninstall IIS


Installation

Insert windows XP cd and select install optional components and select internet information services


Please let me know
Reinstall IIS, tried it many times and it Works!!!!!!!!!!

FexEx picture appears but the number does not go in the tracking number box.  I know it does on other sites, say shopping sites, but I have never gotten it to work here.  Can it be fixed?

let me work on it in my system and will post you once done
please post URL of any other site just for my reference to see how fedex works
ASKER CERTIFIED SOLUTION
Avatar of Sridhar Cherukuri
Sridhar Cherukuri
Flag of Tanzania, United Republic of 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
You're a genius--it works!

 I will try it later with a more recent tracking number.  FedEx only keeps the last few months on their website and that one is a year old!

Thanks
Most welcome, Finally we concluded this discussion. :)

Cheers

Cherukuri