IIS Error 404 has been resolved by me (the installation sequence of IIS and. netframework is inconsistent)

Source: Internet
Author: User

After setting up IIS In win2003 and installing net2.0, run the aspx website code to prompt "HTTP Error 404-file or directory not found". After being depressed for more than two days, I finally got it done today.
Before that, many people mentioned the following solutions on the Internet, but they did not work for me in this case. On the internet, only the user access permission and IIS prohibit the support of ASP by default. However, I finally found a very simple cause, that is, there is a problem with net2.0 installation, because win2003 does not install IIS by default, and I installed net2.0 before IIS, only ASP is displayed in the "Web Service extension" Field of the IIS Site. net V1.1 is not ASP. net V2.0, that is to say, net2.0 does not work, and the website program I want to run is developed based on net2.0, because the solution picture sent by some netizens on the Internet shows ASP. net V2.0, I wondered why net2.0 was obviously installed instead of 2.0, So I remembered the installation sequence at that time, IIS comes out much earlier than net. It can only be supported by net based on the IIS service, later, from the official website and search results, we recommend that you install IIS first and then install net2.0. This verifies my point of view, uninstalling net2.0 and IIS again, and re-installing IIS, install net2.0 and restart it. In addition to ASP. net V ASP. NET V2.0 is added to 1.1, and then IIS is set to run the ASPX page. Error 404 is released.
So here I think the solution to this error is comprehensive, as follows:
1. pay attention to the installation sequence of IIS and net2.0 frameworks. Install IIS first under win2003 and then install net2.0. I am wrong because of the reverse sequence, we recommend that you restart your computer after you have uninstalled IIS and net2.0 and then install IIS in the correct order.
2. permission issues for the directory where the website is located: The permission must have the Asp.net computer account and user. in some environments, the iis_wpg and network services permissions must be enabled, in my environment, I tried to remove these two permissions and only keep the above two without affecting them, but it is not guaranteed to be general.
3. right-click the website name and select the version in the Asp.net tab to confirm that it is 2.0, not 1.1 or 1.0. Of course, if your website code is developed based on net1.0 and non-net2.0, you do not have to modify it, otherwise, you must modify it.
4. IIS-> Web service expansion-> Asp. netv2.0 is to ensure that the status is not allowed, so you can change it quickly. Otherwise, net2.0 does not work.
5. Check whether the parent path is enabled in IIS-> main directory-> Configuration-> options->.
6. Right-click the website name and choose Properties> document> enable default document> and set the corresponding website page correctly.
7. another point is that IIS-> main directory-> Configuration-> wildcard application ing (execution sequence), which needs to insert ASP or aspx applications. asp is C: \ windows \ system32 \ inetsrv \ ASP. DLL, aspx is c: \ windows \ microsoft.net \ framework \ v2.0.50727 \ aspnet_isapi.dll, however, when I set up my website program, this project can run normally without being changed by default without ing. This is not applicable to all server environments of everyone.

8. IIS (Internet server)-web service extension-> Active Server Pages-> right-click this item and then left-click "allow"
9. IIS (Internet server)-web service extension-> include files on the server-> right-click this item and then click "allow ".
Note: When granting permission to the website directory, we recommend that you do not grant the everyone permission. This permission is too large and may cause high security risks, as well as the Asp.net computer account that I am currently granting, only the read permission is granted to the user. The permission for full control and modification is not granted. Currently, my website is running normally, however, in special cases, you can grant full control and modification permissions.

I also encountered a strange phenomenon when setting up IIS: no matter how I set IIS and SQL to include permission settings, I cannot see them at the front-end. the dynamic content of the. Net website only displays some HTML images and JS display effects. The Article does not have one chapter, but there is no problem with entering the website background from login to using the background, viewing the articles added to the website from the background shows normal and depressing. Later, I tried to add the everyone permission for full control and modification to the Home Directory of the website. Refresh the page again. Everything on the front-end of the website is normal and all the articles are published. Then I removed the everyone permission and refresh the front-end again. It was still normal, and I didn't recover the problem that I didn't Display Dynamic Content just now, at first, I thought it was a database connection problem. However, logging on from the background proves that it is not a database connection problem. I think that IIS is not a problem and permissions are caused by conflicts between them. If any hero knows, please explain.

Related Article

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.