Most IIS run errors are not installed. NET 4.0
Title, this error Google when a lot of various solutions, but the specific reasons are not detailed introduction,
404.2 on an HTTP status code, on MSDN, says:404.2-isapi or CGI restriction is a problem with the configuration of "ISAPI or CGI Restrictions" in IIS,
"ISAPI" is a DLL for IIS to load and invoke, and if no related ISAPI is configured, the content of the Web page cannot be interpreted correctly.
The error message that the "requested content appears to be a script and therefore cannot be handled by a static file handler" is thrown, most likely because the page is not configured with the relevant ISAPI, causing IIS to interpret the page as a static file by default, so an error occurs.
For example: Web site developed with net4.0, but ISAPI does not have "Asp.net_4.0_32bit" DLL configured to host the page program, then IIS must not correctly run the C # code in ASPX,
Solution:
1) First confirm that the website is based on that netframework;
2) then go to "application pool" to find the application pool for the site (right-click the advanced settings of the site), double-click the program pool to see if the program pool is also the same version of the Web site's NET Framework,
Note: net2.0,net3.0,net3.5 corresponds to the NET Framework version of v2.0.50727, and net4.0 is based on v4.0.30319
3) Right click on the site corresponding "Application pool and Advanced settings" see "Enable 32-bit application", if the site is compiled with 32 will be set to true, otherwise false, is generally 32 compiled, so are selected as true;
4) If the above configuration is correct, then go to the essential part of the problem, the configuration of the ISAPI:
A. Double-click the ISAPI filter with feature view, Web site
B. See if there is a DLL corresponding to the framework on which the Web site is based, net2.0,3.0,3.5 corresponding DLL is asp.net_2.0.50727.0, net4.0 is asp.net_4.0_32bit or asp.net_ 4.0_64bit;
C. If there is no corresponding DLL, it is possible that IIS is not installed, that is, missing something, if you do not know which parts to choose, it should complete the entire IIS loaded;
5) If the VS reload IIS has to be re-installed to the NET Framework, run CMD, enter:
C:\Windows\Microsoft.NET\Framework\V4.0.30319\aspnet_regiis-i
Note:C:\Windows\Microsoft.NET\Framework\V4.0.30319\ is the corresponding path of netframework installation;
Such as:
6) Restart IIS, in theory should be able to solve the cause of 404.2 not found most of the problem;
Error Summary HTTP Error 500.19-internal Server error cannot access the requested page because the page's related configuration data is invalid.