October 28, 2003 at 11:33 am
I started developing a small website, with windows XP profesional and IIS. I created one test file (test.asp)
<%response.write "Hai"%>
and put it in the default web directory (c:/intepub/wwwroot)
but when i run this file through http://localhost/test.asp, it is not showing "hai"
But when i create simple html file it is working fine. only ASP scripts are not running
what could be the reason , is it problem with ASP.dll?
October 28, 2003 at 11:47 am
If it's not showing Hai, what is it showing?
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
K. Brian Kelley
@kbriankelley
October 28, 2003 at 11:51 am
Do you have the
<%@Language=VBScript%>
at the top.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
October 29, 2003 at 1:03 am
If you can't get any ASP script to run properly, I would take a look at the configuration of IIS.
Can you run a HTML file by http:/localhost/yourfile.html or do you see something like c:\inetpub\wwwroot\yourfile.html in the URL of your browser?
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 29, 2003 at 1:59 am
looking at the snippet of code it looks as though you are embeding your asp within html..
try this
copy the bit below and save as test.asp
<%
'**************************
'* test.asp *
'* Sample ASP Page *
'* 29-10-03 *
'* Andoi *
'**************************
'Start of VB Script
Response.write "Test ASP Page"
'End of VB Script
%>
October 29, 2003 at 2:20 am
Create an application for your local site.
This is done in IIS MMC. Goto Home Directory and look at 'Application Settings'. If the Application Name is greyed out, click on create to create an application and your script should then work.
October 29, 2003 at 4:41 am
Umm. This may seem obvious but nobody has asked yet.
Have you put the htnl and body tags in your test.asp?
IE:
<%@Language=VBScript%>
<%
response.write "<html><body>"
response.write "Hai"
response.write "</body></html>"
%>
October 29, 2003 at 6:33 am
hi
pinhead is right. without creating an IIS app it won't execute ASP scripts ...
if you're using IIS6 be aware that scripting itself is deactivated per default!
best regards,
chris.
October 29, 2003 at 7:03 am
You don't actually need to put any HTML tags in a page like this
Hence, putting
<%="Hello"%>
will return 'Hello' to a web page.
It's only when you start to write proper pages that you should put these in.
For a test page - <%="Hello"%> will suffice.
October 29, 2003 at 7:21 am
quote:
pinhead is right. without creating an IIS app it won't execute ASP scripts ...
This may be a misleading statement (at least in IIS 4/5). The main root "default web site" has to be an application, but sub directories do not have to be created as an application in order for asp pages to work.
October 29, 2003 at 10:14 am
If it's not showing Hai, what is it showing?
[]
It is not showinng anything, just a blank page i am seeing, no errors also
I have put <%@Language=VBScript%> at the top
HTML files are working fine. no problem
Even if you write somthing outside the <%%> tag also working,
i am using .asp extension only for the file.
Inside the tag (<%%>) whatever is ther, it is not working..
October 30, 2003 at 9:20 am
quote:
Create an application for your local site.This is done in IIS MMC. Goto Home Directory and look at 'Application Settings'. If the Application Name is greyed out, click on create to create an application and your script should then work.
Yes it was greyed, i clicked on the 'Create' Button, after that Application Name became 'Default Application'
But still scripts are not executing
whatever is there inside the tag <%%> is not at all executing?
I am using Windows XP Professional
November 5, 2003 at 12:42 am
In mmc if you right click on "default web site" and then choose the "Home Directory tab" check what the application name is if there is one then check what the permissions are set for:
"none", "scipts", "scipts and executables"
Not that any are bad suggestions but to my knowledge:
-you don't strictly need
<%@Language=VBScript%>
-you don't need any html
<%="boo"%>
should give you: boo
Dave
Trainmark.com IT Training B2B Marketplace
(Jobs for IT Instructors)
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply