#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2015
    Posts
    3
    Rep Power
    0

    IIS 8.5 will display .aspx, but not .html


    I'm trying to get IIS 8.5 working on Windows 8.1. I put 2 test files in the folder C:\inetpub\wwwroot\jsTest. One is named test.html. The other is named test.aspx. Both contain the following code (and nothing else):
    Code:
    !DOCTYPE html>
    <html>
    <head>
    	<title>Page Title</title>
    </head>
    <body>
    	<form>
    	TEST
    	</form>
    </body>
    </html>
    In IE, I navigate to 404 Not Found. The test.aspx file displays TEST, as it should. test.html displays nothing. If I click on View Source for the html file, this is what I get:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv="Content-Type" 
    content="text/html; charset=windows-1252"></HEAD>
    <BODY></BODY></HTML>
    Can someone tell me what I'm missing here? Why does the html have to be in a .aspx file for it to work?
    Thanks.
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,526
    Rep Power
    4541
    I haven't used IIS since IIS6 so won't be much help, but

    What do you mean by
    In IE, I navigate to 404 Not Found.
    First guess, check your IIS settings for default document(s).
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2015
    Posts
    3
    Rep Power
    0
    Originally Posted by Doug G
    I haven't used IIS since IIS6 so won't be much help, but

    What do you mean by

    First guess, check your IIS settings for default document(s).

    The forum software translated the url into the 404 message. It should have read like this:
    I navigated to "http://localhost/jsTest/test.html".

    I specify the documents explicitly, so it's not a problem with the default documents.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,526
    Rep Power
    4541
    Since you're getting something in the view source for the html page, I'd double-check my page for any non-printing characters hiding there. Maybe the aspx interpreter can ignore a bad character that the straight html doesn't. Just guesses. Also there should be an IIS error log somewhere that may give some clues.

    ( Hmm, I wonder why the "quick reply" here isn't word-wrapping long sentences )

    Comments on this post

    • Will-O-The-Wisp agrees : Might have a fix for the lack of word-wrap soon! Still trying to figure out if it's in the AdminCP or if that's a dev thing.
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2015
    Posts
    3
    Rep Power
    0
    I found the problem. If you drill down into Windows Features, World Wide Services -> Common HTTP Features --> Static Content needed to be checked.

IMN logo majestic logo threadwatch logo seochat tools logo