IIS 7 defaultly not allowing ISAPI and CGI through .Net 1.1-4 by default.
So if you are working with older code on IIS7 you may face such issue..
To solve this problem you need to follow these steps.
- Open IIS and click the server name
- Double click “ISAPI and CGI Restrictions”
- Right click ASP.NET v4.0 (whichever you are running) and select “allow”