14

I have just installed IIS on Windows Server 2008. If I go to localhost, the default page is displayed, so the web server is ok.

I have added a folder with a page in it in the \inetpub\wwwroot directory. The full path to the page is then C:\inetpub\wwwroot\folder\file.html.

I have restarted the services but if I navigate to localhost/folder/file.html I get a 404 file not found error.

Obviously I have forgotten something simple, but what is it? :)

12

8 Answers 8

13

For anyone that run into this and don't find the other suggestions effective, also check that Windows is displaying file name extensions. Open Windows Explorer, click "View" in the top bar and then check "File name extensions".

I found that my file was actually named index.html.txt even though it was displaying index.html prior to checking the above setting.

3
  • 3
    Thank you. I change this setting on every computer I used but didn't think about it when setting up a server. That fixed it Dec 7, 2017 at 21:55
  • Out the box, I always turn that on for every computer I deal with or support. What planet MS are on when they made it "off" by default is baffling. Oct 21, 2020 at 12:34
  • Haha! I came here looking for answers, and what did I do? I mispelled the domain name in the site binding. doh!
    – bgmCoder
    Jan 26 at 4:46
7

I had this same problem.

Observe your path: C:\inetpub\wwwroot\folder\file.html.

Ensure that:

  • The file name extension you are requesting (in this case, .html) is not being blocked by IIS.
  • The directories along the path you are requesting (in this case, folder) are not being blocked by IIS.

If you are on Windows 8/ Windows 10, you can check those two things in the IIS Manager desktop application.

Here is how:

  1. Open the IIS Manager. You can type it in the Windows search bar.
  2. In the file tree in the 'Connections' box, select the root of web application.
  3. In the Features View that appears in the middle of the screen, select Request Filtering.
  4. In the File Name Extensions tab, ensure that .html does not have the value false.
  5. In the Hidden Segments tab, ensure that NONE of the folders in your path (C:\inetpub\wwwroot\folder\file.html) are listed.

NOTE: If you cannot see the Request Filtering tool, you may not have enabled all of the IIS features. Search for 'Turn off windows features' on your machine. In the Windows Features manager, select all of the boxes in Internet Information Services -> World Wide Web Services and select the box Internet Information Services -> Web Management Tools -> IIS Management Consoles.

1

I've had this issue before - I had to set the username and password in again at Anonymous Authentication and it worked perfectly. You can also switch on Detailed errors at Error Pages in IIS to give more info.

2
  • What did you reset the username and password to? Apr 14, 2014 at 14:49
  • It was a domain account which was part of Admin and IIS users. All I did was put the details in again.
    – Lisa
    Apr 16, 2014 at 6:44
1

Check the following:

  • Find the Authentication Configuration (Anonymous, Basic, Windows, ...)
  • Based on the Authentication configuration, check that the account accessing the file (Anonymous, IUSR, SYSTEM, Authenticated Users, ...) has enough NTFS permissions
  • Check if the file extension is not filtered in Request Filtering
  • Check if the file extension is explicitly declared in MIME types
1
  • Tried to share an .appinstaller file, and need to add it to the MIME types. May 9, 2022 at 13:11
0

I had this same error. My issue was that I accidentally installed another instance of DNN to the same SQL database. I restored a backup of my database to a new database then pointed the config file to the new database. Then both instances worked great.

0

In the IIS Connections pane, click on the Sites node and check the Status column on the right. In my case, the Default Web Site was stopped and was giving me 404 error.

0

I was having the same problem and more. Not only would the html pages not show, but also the images. I noticed the MIME types was not listed in my new computer under the IIS settings and went in and added all the services I could find under Windows Features for IIS. I know its the shotgun approach, and one of those is responsible for the MIME but everything started working correctly once I did this.

0

We ran into this issue after we updated our servers from 2019 to 2022. The problem was that the update added several new options to the https bindings one of which needed to be disabled: Legacy TLS support. Our servers are configured to not use legacy TLS which was conflicting with this new setting. How we fixed it:

  • Open Internet Information Services (IIS) Manager
  • Expand the Sites tree, right click on the Web Site, and select Edit Bindings...
  • Select the https binding and click Edit...
  • Select Disable Legacy TLS and click Ok
  • Recycle App Pool

In addition to this the server update recreated our server's certificate which messed up the https binding and so we had to remove the old copy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .