I am setting up a server with Windows Server 2016 for the first time, and when creating a new IIS website, I am finding that all requests return 404 Not Found.
Looking through the web server logs, there are no requests being logged. Looking at the HTTPERR log, I can see NotFound errors being logged, but the documentation that I have looked at (https://support.microsoft.com/en-us/help/820729/error-logging-in-http-apis) doesn't list NotFound as a supported error reason.
The app is a vanilla ASP.NET MVC application based on .NET Framework 4.6.2; I have tried placing an empty index.html in the application root folder and setting it as the default document, but that doesn't work either.
Here's a typical line from the logs:
2018-03-26 00:39:19 192.168.3.252 60475 192.168.3.11 443 HTTP/0.9 GET / - 404 - NotFound -
Two things are puzzling me from that log entry – why does it give the HTTP version as 0.9 instead of 1.1 or 2.0 as I would expect, and why does give the path as / instead of e.g. /index.html
or /home/index
as I would expect?
Best Answer
The logged path is always the one from the actual HTTP request, never a resulting path i.e. HTTP path after the rewrite or real filesystem path. This part of your log line is completely normal.
The
HTTP/0.9
is just a result of a (either malformed or ancient) very simpleGET /
request without theHTTP/version
part and additional request lines: the HTTP 0.9 was a one-liner protocol without any headers, including theHost:
introduced in the HTTP 1.1 standard. The lack ofHost:
header means that the Default Web Site gets used instead of the binding your actual site has. If the default web site doesn't have index, the404 - Not found
may have been caused by that.From the details in your question alone I can't deduce what could be causing such queries. Could there be something between the browser and the IIS?