I get the error while trying to visit the home page of a deployed ASP.NET 4 application in IIS7: 404.2 The Page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
How can this be resolved?
This error occurs because the requested ISAP (Internet Server API) and/or CGI (Common Gateway Interface) resource is restricted on the computer that is running IIS 7.
After installing .NET Framework 4.0 on a machine, there are a few configuration changes you need to do to IIS in order to get an ASP.NET 4.0 page running.
To resolve this issue you have to follow the steps mentioned below:
- Open IIS and click on the sever name.
- In Feature View, double click "ISAPI and CGI Restrictions".
- Select ASP.NET V4 and click Allow in action panel. It will be set to Allowed.
Now your application should run without issues.