This issue occurs because the requested Internet Server API(ISAPI) resource or the requested Common Gateway Interface(CGI) resource is restricted on the computer running IIS 7.0. This error states that you haven't allowed ISAPI and CGI Restriction in your system. When you tried to run your application in Classic mode but your .Net Framework is still in v4.0 you might get this error if you haven't allowed ISAPI and CGI Restriction.
Things you can try and Most likely cause as suggested by Microsoft
Steps to solve :
1. Open your IIS (Either Directly by going on program list or by searching Inetmgr) and click on Server Name.
2. On the Right Hand side of the server (Only in Features View) you will see an icon of "ISAPI and CGI Restrictions". Open it by double clicking it.
3. If your machine is 64 bit you will find two instances of ASP.NET v4.0.30319 otherwise there will be only one instances. If there is two instances allow both of them.
Please Like and Share the Blog, if you find it interesting and helpful.