The page you are requesting cannot be served because of the extension configuration

In deployment ASP.NET When the website is deployed to IIS, visit the page http://localhost/UserCenter/user.aspx , but an exception was thrown. At this time, to detect whether the deployment is successful, you can write a text file for testing in the root directory text.txt , and then access the file http://localhost/UserCenter/test.txt If you can see the contents of this file, it means that there is no problem with the deployment. Maybe there is a problem with the code.

 

Abnormal prompt:

HTTP error 404.3 – not found
the page you are asking cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a mime map.

abnormal screenshot

 

The reason for this problem is that there are multiple. Net versions on the machine, so there are multiple ASP.NET Version. Now our application pool is in version 4.0, but this version is not registered in IIS, so this error is reported. Now what we need to do is register the 4.0 ASP.NET Version. In C: windows\ Microsoft.NET \Find IIS registration tools, namely aspnet, in the directory of framework64/v4.0.xxxx_ regiis.exe Then start it in the form of a DOS window, aspnet_ Regiis – I refer to MSDN for details http://msdn.microsoft.com/en-us/library/k6h9cz8h%28VS.80%29.aspx

Running results

 

At this point, restart the application pool and website, and you can see the normal ASPX rendered page.

 

Read More: