Answered by:
Why install IIS get 404?

Question
-
Hi,
I just installed the IIS web server role from server manager and copy an .aspx to wwwroot. But when I start the website and access the localhost. It just return 404. I think the URL should be correct.How could I access the aspx from local IIS server?
Thanks in advance.
Wednesday, October 25, 2017 4:34 PM
Answers
-
Hi Jamsyan998,
You may first check the HTTP status code in the IIS log. IIS returns a numeric code that indicates the status of the response.
IIS 7.0, IIS 7.5, and IIS 8.0 define the following HTTP status codes that indicate a more specific cause of a 404 error:
404.0 - Not found.
404.1 - Site Not Found.
404.2 - ISAPI or CGI restriction.
404.3 - MIME type restriction.
404.4 - No handler configured.
404.5 - Denied by request filtering configuration.
404.6 - Verb denied.
404.7 - File extension denied.
404.8 - Hidden namespace.
404.9 - File attribute hidden.
404.10 - Request header too long.
404.11 - Request contains double escape sequence.
404.12 - Request contains high-bit characters.
404.13 - Content length too large.
404.14 - Request URL too long.
404.15 - Query string too long.
404.16 - DAV request sent to the static file handler.
404.17 - Dynamic content mapped to the static file handler via a wildcard MIME mapping.
404.18 - Querystring sequence denied.
404.19 - Denied by filtering rule.
404.20 - Too Many URL SegmentsFor your reference:
The HTTP status code in IIS 7.0, IIS 7.5, and IIS 8.0
In addition, please check if the following link is helpful:
IIS 8.5 throwing 404.3 errors for ASPX pages
https://stackoverflow.com/questions/28283420/iis-8-5-throwing-404-3-errors-for-aspx-pages
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Best Regards,
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- Proposed as answer by Anne HeMicrosoft contingent staff Wednesday, November 1, 2017 6:41 AM
- Marked as answer by Jamsyan998 Monday, November 13, 2017 1:37 PM
Thursday, October 26, 2017 3:13 AM
All replies
-
Something here might help.
https://blogs.iis.net/tomkmvp/troubleshooting-a-404
or also ask in microsoft official IIS/FTP/SMTP forums here.
or asp.net over here.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Anne HeMicrosoft contingent staff Wednesday, November 1, 2017 6:41 AM
Wednesday, October 25, 2017 4:49 PM -
Hi Jamsyan998,
You may first check the HTTP status code in the IIS log. IIS returns a numeric code that indicates the status of the response.
IIS 7.0, IIS 7.5, and IIS 8.0 define the following HTTP status codes that indicate a more specific cause of a 404 error:
404.0 - Not found.
404.1 - Site Not Found.
404.2 - ISAPI or CGI restriction.
404.3 - MIME type restriction.
404.4 - No handler configured.
404.5 - Denied by request filtering configuration.
404.6 - Verb denied.
404.7 - File extension denied.
404.8 - Hidden namespace.
404.9 - File attribute hidden.
404.10 - Request header too long.
404.11 - Request contains double escape sequence.
404.12 - Request contains high-bit characters.
404.13 - Content length too large.
404.14 - Request URL too long.
404.15 - Query string too long.
404.16 - DAV request sent to the static file handler.
404.17 - Dynamic content mapped to the static file handler via a wildcard MIME mapping.
404.18 - Querystring sequence denied.
404.19 - Denied by filtering rule.
404.20 - Too Many URL SegmentsFor your reference:
The HTTP status code in IIS 7.0, IIS 7.5, and IIS 8.0
In addition, please check if the following link is helpful:
IIS 8.5 throwing 404.3 errors for ASPX pages
https://stackoverflow.com/questions/28283420/iis-8-5-throwing-404-3-errors-for-aspx-pages
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Best Regards,
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- Proposed as answer by Anne HeMicrosoft contingent staff Wednesday, November 1, 2017 6:41 AM
- Marked as answer by Jamsyan998 Monday, November 13, 2017 1:37 PM
Thursday, October 26, 2017 3:13 AM -
Hi Jamsyan998,
Just to check if the above reply could be of help, if yes, you may mark useful reply as answer, if you have other concerns, welcome to feedback.
Best Regards,
Anne
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.Wednesday, November 1, 2017 6:42 AM