PDA

Click to See Complete Forum and Search --> : ASP


Hutty
Apr 19th, 2000, 08:10 PM
I wrote an ASP program using notepad. It was an example straight from a book. The program doesn't display the results correctly. I'm assuming that ASP is installed on the web server. Is there a way to check to see if ASP is installed or any ideas what may be happening? I checked the coding on two examples from the book, but still can't get the desired results.

HarryW
Apr 19th, 2000, 08:43 PM
Hmm.. Try making a file called 'hello.asp' or something and put this in it:


<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<H1><%="Hello world"%></H2>
</BODY>
</HTML>


If that displays incorrectly I'd say there's a problem with ASP. A bit clumsy I know but I never installed ASP so I'd have no idea how to find out.

Hutty
Apr 19th, 2000, 08:50 PM
I tried it and nothing displayed on the page. So I'm assuming that ASP is not installed on the server. Unfortunately, the web server is new and so is the administrator. Thanks.

thinh
Apr 19th, 2000, 10:29 PM
Try the following:
first line of the file always be...
<% language=vbscript %>

<html>
<head><title>Time Test</title></head>
<body>
The time is: <% =Time %>
</body>
</html>
and save it as *.asp...

to be able to run ASP you need IIS, or PWS, or any other server which have ASP support... if you are running on any other platforms accept Windows 95/98 with a server that doesn't support ASP then you might want to check out http://www.chilisoft.com... they have a program called chilisoftASP which will enable you to run *.ASP on any server.

HarryW
Apr 19th, 2000, 10:37 PM
I've never included that <% language=vbscript %> line, and my VBScript works fine...

Hutty
Apr 19th, 2000, 10:46 PM
By including the first line <%@ LANGUAGE='VBSCRIPT" %> I get the result: "The time is:". That's the problem that I've having. It doesn't recognizes some of the coding.

HarryW
Apr 19th, 2000, 11:02 PM
Well like I said before, it sounds like there's a problem with ASP, like maybe it's not installed. If the web server's new maybe they didn't get around to installing it yet.

Apr 20th, 2000, 04:28 AM
the following code is optional if the default scripting language for the webserver is VBScript:

<%@ LANGUAGE="VBSCRIPT" %>

HarryW, you've never had a problem(by not including that line) because the default server side scripting language on the server you're using is VBScript.

I'm not sure what the difficulty is in determining whether or not you can run ASP on your machine. Either you installed PWS or IIS or you didn't. If you did, then ASP is installed by default(unless for some strange reason you deleted asp.dll which resides in your system32(on nt) directory and is responsible for parsing asp). Also note, you have to request asp pages from a web server, that is, you have to use the http protocol on PWS/IIS to initiate the asp parsing engine. Running c:\youraspfile.asp in a webbrowser will not work, it has to be requested from a web server.

HarryW
Apr 20th, 2000, 07:05 AM
Oh yeah, I forgot about that last point :) *Doh*

Same goes for PHP.

thinh
Apr 20th, 2000, 07:45 AM
Doh, all of us except pvb...

Hutty
Apr 21st, 2000, 07:23 PM
PVB is correct. That's exactly what I'm doing with regards to just running an ASP file. I simply created a file in a folder on server. Now, how do I request ASP from the server?

Thanks!

Apr 21st, 2000, 09:16 PM
Assuming you've installed PWS/IIS with all of the defaults your root web directory, http://127.0.0.1/ or http://yourmachinename/, will be physically located in c:\inetpub\wwwroot\ - which is where you want to put all of your asp files, probably in a subdirectory.

If you don't know where your physical root directory is located, go to Start > Programs > Windows NT Option Pack 4 > Internet Services Manager and start the IIS Manager MMC. Righ click on Default Website and select properties. Click on the Home Directory tab and next to Local Path you should see c:\InetPub\wwwroot\ (which is the default) or whatever physical directory has been assigned for root web. (it should be the same for PWS but I don't have PWS installed so the above refers to IIS which i do have installed. it should be the same up to this point though...)

So for example you've created a file named HelloWorld.asp then put that in c:\InetPub\wwwroot\. Open up your browser and type in http://127.0.0.1/HelloWorld.asp or http://YourMachineName/HelloWorld.asp and you have just requested your page from the webserver.

asmodia
Apr 23rd, 2000, 06:20 PM
Totally going off the subject here. But does anyone know how i can register my IP address so that i can use my computername on the net? I guess i have to register it with a DNS yeah?

Say for example i have the IP 123.123.123.2 people have to type in http://123.123.123.2 to get on to my web server. If i change my computer name to danscomputer.com does that mean people can type in http://danscomputer.com to get to my site?

Has anyone done this? Can anyone help me?

I am wanting to do it for a company. So tell me it the painfull way.

Cheers,

Apr 23rd, 2000, 09:11 PM
go here http://www.networksolutions.com and register danscomputer.com(it's actually available if you want that one). I think it's around 70 bucks for 2 years registration and I believe they allow you to save that name for up to 10 years now. Anyway, i think if you running the show you have to install DNS on your machine, but I'm totally positive. I'm sure they've got FAQ's that cover all of that.

Hutty
Apr 24th, 2000, 02:31 AM
PVB,
I tried your suggestion by putting the ASP files in th C:\InetPub\wwwroot directory. That didn't work. Actual I didn't have the WinNT, OptionPack, Internet Service Manager, etc. path on my machine. I installed PWS, but was still unable to get an ASP file to run correctly. The helpdesk are not too responsive, if you know what I mean. Any more suggestions?

Strangely, I'm able to run other ASP files from the PWS sample directory. However, running these files has brought a potential problem to my attention. For some time, while browsing, I constantly get error messages when loading certain pages. The error is "An error occurred on this page while reading the script

Line: 70
Char: 1
Error: Object Required
Code: 0

Do you want to continue running script on this page?"


I hope this help shed some light on my problem.

Thanks!

[Edited by Hutty on 04-24-2000 at 04:06 PM]

[Edited by Hutty on 04-24-2000 at 04:39 PM]

Apr 24th, 2000, 06:41 AM
Sounds more like a javascript error rather than an ASP error, if ASP fails you won't get a choice on whether you want to finish running the script, it just fails. If there's javascript on the page that's failing, check and make sure it's perfect(i.e. no errors), if it's still failing post or email the code.