IIS file exists but is reported as 404 issue Resolution

Source: Internet
Author: User

Encounter a strange problem, in IIS7.5, some styles and JS files exist, but access is reported 404.

According to the online search solution, found that can not solve, different problems caused by the same.

Online Solutions:

1. The appropriate MIME information is not configured to be resolved by adding the appropriate MIME information.

Open the IIS configuration, looked under, has added the style file, so it is not the problem.

2. Re-register the. NET Framework because IIS is installed after. NET is installed, and the. aspx page access is not enabled

HTTP error 404.2-not Found The page you requested is not available because of the ISAPI and CGI Restrictions list setting on the WEB server. Open IIS, the right side of the selection of basic settings, the application pool next to the selection, mode to classic, is to switch the management mode for the Classic mode.

Presence Environment: Win7 + IIS7.0

Workaround: IIS root node, right "ISAPI and CGI restrictions", set the Forbidden Dotnet version entry to allow-if not available, the path is as follows:

This is not right, because it is not just installed, has been running for a long time, and other sites are normal.

Later in the net search for a long time, did not find ideas.

The suspect is a path jump is incorrect, so configuration webconfig lists the file list and wants to confirm that the file exists.

The level click Query, found that the filename with "." Directory access is not normal, reported 4040.

Go to server local access to see why (because no detailed error information is rendered outside of the access).

See, the style file and JS file all directory Access is rejected by URLScan.

View URLScan logs

Should be this URLScan configuration has a problem, on the search for the configuration of the article, modify the configuration, resolved.

Reference: http://www.cnblogs.com/ttzhang/archive/2010/04/27/RunPhpOnIIS7viaFastCGI.html

Solution:

URLScan rejected the request, opened a log file in the URLScan log directory C:\Windows\System32\inetsrv\urlscan\logs\, and found many similar "rejected url+contains+ High+bit+character URL "of the record, this is why??? The original IIS7.0 on the installation of URLScan, all requests will be aspnet_filter and request filtering filtering, request filtering filter rules in the URLScan installation directory C:\Windows\ System32\inetsrv\urlscan\urlscan.ini file, in which there is a rule allowhighbitcharacters=0,iis the official website is interpreted as: This feature either allows or Rejects all requests to IIS 7 that contain NON-ASCII characters and logs the error code 404.12, which allows or denies all requests that contain non-ASCII characters and records in the log 404.12 error, the rule defaults to 0, and the request URL containing the high-order character is rejected. We will change the value of the allowhighbitcharacters to 1, and the image will finally display normally.

IIS file exists but is reported as 404 issue Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.