4

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? :)

5

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.

  • 2
    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 – Dan Roberts Dec 7 '17 at 21:55
  • 2
    OMFG I just spent an HOUR looking in increasingly detailed IIS log files on a new IIS deployment, and it was this. – Whelkaholism May 23 '18 at 14:42
2

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.

0

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.

  • What did you reset the username and password to? – user1301428 Apr 14 '14 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 '14 at 6:44
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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.