Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP won't execute from HTML in PWS

Status
Not open for further replies.

lucyWeb

Technical User
Jul 8, 2002
4
US
I'm a novice using PWS to experiment with ASP. My ASP pages display correctly in the browser, but when I display my index.html in the browser and link to the ASP page from that file, I get a 'do you want to download a file from this location' type dialogue box.

Permissions are set correctly on the folder in PWS (scripts okay, execute not okay.)

Both the index and the ASP page are in the right folder.

WHY is this happening? Thank you SO much for any help.
 
It sounds liker FrontPage server extensions isn't installed (Start>Programs>Windows NT Option Pack>PWS).

If FrontPage server extensions is installed then you'll need to check that the link is correct:

and not c:\ Localhost is th default name when installing PWS but it could also be your computer name taken from the control panel.

Does this help at all?

Simon
 
Thanks for your answer.

I don't think I WANT to use FrontPage extensions; I'm trying to keep it as simple as possible in hopes my head won't fall off.

I'm using which should be fine because the index displays correctly and the link is set up properly....I'm really stuck on this. Is it possible I'm supposed to be using 'response.write' to display to the user? I'm using dummy code that displays okay unless it's called from the index page. This is the file the index page links to: (Any other ideas?)

<%@ Language=VBScript %>
<H1>What's For Dinner</H1>
<Table>
<%
set dbObj = server.createobject(&quot;ADODB.Connection&quot;)
dbObj.open &quot;lucy&quot;
SQLQuery = &quot;SELECT Food From tFood&quot;
set RSFood = dbObj.execute(SQLquery)
do while not rsFood.eof
%>

<TR>
<TD> <FONT FACE = &quot;verdana&quot; SIZE = 2>
<% = rsfood.fields(&quot;food&quot;) %>
</font> </TD>

</TR>
<%
rsFood.movenext
loop
%>
</HTML>
 
OKAY. I've figured something out. It's not a problem with the link (I linked to a simple ASP and it worked fine.) Guess I should have checked that before assuming.

Anyway, it seems to be a problem linking to an ASP that fiddles around with a DB. I still don't know why. At least I know what.

Any thoughts?
 
I'll check this, but I think unless FrontPage server extensions is installed you'll only be able to use html files on PWS. The server extensions is a program that parses the ASP code and generates the HTML code from it.

When you run FrontPage Server Administrator I think you only need to click on install, and it should only take a couple of minutes.

Simon
 
So does this page display correctly on your PWS?

<html>
<head>
<title>test</title>
</head>
<body>
<%Response.Write &quot;hello world&quot;%>
</body>
</html>
 
Hi,
Yes thanks it does. After some screwing around, so did the database connection, and everything else. It seems like it might be that I wasn't on the internet when I was first messing with it. Is that even possible? I'm using PWS to test, not to publish, and since individual asp pages worked I didn't question it. Now since I had a probem with the call to the ASP page from HTML, I wonder if it needs to go through the motions...It's still mysterious to me. But now since I'm working on adding records to the DB from ASP, I've got something new to be mystified by.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top