newbie really simple question

F

Faroch Bhatt

Hi, I am using Windows XP Pro on a home computer. I have just installed IIS
that came with Windows XP Pro. I am using Microsoft Visual Studio .Net
V1.1.4322. I hope this is all the infromation you need.

I have created a file fred.htm in c:\inetpub\wwwroot with the following text

<html><body><b>fred</b></body></html>

I launch Internet Explorer and type in http://localhost/fred.htm and I see
fred displayed in bold. All is working.

I have created a file fred.asp in c:\inetpub\wwwroot with the following text

<html><body><b>fred</b>
<%
Response.Write ("bhatt")
%>
</body>
</html>

I launch Internet Explorer and type in http://localhost/fred.asp and I see
this below. I don't know why. I know this is simple question but I don't
know why. Please help.
Fred

I see this:

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be displayed.

--------------------------------------------------------------------------

Please try the following:

a.. Open the localhost home page, and then look for links to the
information you want.
b.. Click the Refresh button, or try again later.

c.. Click Search to look for information on the Internet.
d.. You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer
 
C

Curt_C [MVP]

just for a test take out the <%....%> and leave all the HTML tags, or just
rename the .HTM to .ASP and see if it opens then.


Also, you are in a DotNet (ASP.NET) group, not an ASP one, you may want to
jump over to the ASP ones.
 
F

Faroch Bhatt

Thank you Curt. Taking out the<% .. %> does not make a difference.

Sorry. I will post to a ASP group if I get no answer here. I won't do it yet
in case someone accuse me of cross posting.
Thank you
Fred
 
S

Steve C. Orr [MVP, MCSD]

Visual Studio.NET is made for creating ASP.NET files. Thos files have an
ASPX extension, not ASP.
If you have similar problems with your ASPX pages, you may need to repair
your IIS mappings as described here:
http://SteveOrr.net/faq/3in1.aspx
 
F

Faroch Bhatt

Aha. If I rename fred.asp to fred.aspx, and type in
http://localhost/fred.aspx, it does display in Internet Explorer. But it
only says "fred" and not "bhatt". The "bhatt" is written out in a <%
Response.Write("bhatt") %> code.

I think this means IIS 5.1 cannot run normal .asp pages but it can run .aspx
and htm by default config. I will try to find an option to turn .asp
handling on.

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top