HTML/CSS file not served in IIS

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Razak (razak_at_mmsc.com.my)
Date: 06/14/04


Date: Mon, 14 Jun 2004 19:50:46 +0800

On my Win XP, IIS 5.1, I made a simple html file like follows:-

<HTML>
<HEAD>
<TITLE>ASP Test Page</TITLE>
</HEAD>
<BODY>
Test
</BODY>
</HTML>

The problem is, browser takes quite a while and finally displays 'The page
cannot be displayed' error. The IIS log indicates status code 200:-

11:23:23 127.0.0.1 GET /test.htm 200

I made a simple asp file as follows:-

<%
   str="Test"
%>
<HTML>
<HEAD>
<TITLE>ASP Test Page</TITLE>
</HEAD>
<BODY>
<%=str%>
</BODY>
</HTML>

The browser displays the page correctly as expected. But when I insert
<link> tag as follows:-

<HTML>
<HEAD>
<TITLE>ASP Test Page</TITLE>
<link href="styles.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY>

</BODY>
</HTML>

again, the browser takes a long time and at the end, displays the page
correctly, but without the styles defined in styles.css. The IIS log is as
follows:-

11:35:59 127.0.0.1 GET /test.asp 200
11:35:59 127.0.0.1 GET /styles.css 206

The styles.css is a simple file like below:-
BODY
{
    COLOR: black;
    FONT-FAMILY: Tahoma, Verdana, Arial;
    BACKGROUND-COLOR: darkorange
}

I further tested the file by replacing the <link> tag with:-

<link href="C:\Inetpub\wwwroot\styles.css" rel="stylesheet" type="text/css">

in both the asp and htm files. The asp file displays the page correctly
along with the styling. But the html still have the same problem as stated
above.

I have been searching the internet but it seems like nobody have this kind
of problem. FYI, i have reinstalled my Win XP just to fix this problem, but
it still not working.

Please help me.



Relevant Pages

  • Re: HTML mail [was Re: FEL was Re: Hi]
    ... Try it in a browser, ... HTML, per se. ... But you can create an entire page without HTML, HEAD, or BODY ... and the browser will presume to insert them into their proper ...
    (Fedora)
  • Re: Strange cell colours
    ... whether it is supposed to be HTML or XHTML. ... particular version of any particular browser would do with it. ... Which has no CSS, which is what you were complaining about. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Why does textarea.value= not work
    ... I have never had a textarea content change, in any browser. ... var x = obj.form.bigbox; ...
    (comp.lang.javascript)
  • Re: Looking for advice
    ... You are basically asking if there is a way to serve web pages w/o ... out the html page directly. ... share drive and let the user open up the file in the browser. ... > have anyone to configure IIS or anything else. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: need client side form converts get to a post
    ...  the offset on the serialized list is slightly ... initiated from the browser as well. ...
    (comp.lang.javascript)