Not being an active ‘web’ developer for some time I stumble across an issue to make a small .Net 4.0 web application to work on a new Windows 2008 R2 server. After copying the application files to the local server (inetpub) and even creating the application in IIS (with no warnings or indications of a problem) I tried to test the application from the local machine.
That’s when I got the ‘HTTP Error 404.2’ error with further details ‘The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.’. As usual I did not read the whole page again and went on to find an answer on Google which did not really help too much – but it did point me in the right direction. Eventually I went back and read the full error/warning page that actually list the solution…
The solution is to enable .Net 4.0 for IIS (this is a 64-bit machine) doing the following:
- Open the IIS Manager and navigate to the server level.
- In the Features view, double-click ISAPI and CGI Restrictions to verify that the Web service extension is set to Allowed.
At least next time I will know better (or find it quicker) 😉