I was getting the above error while trying to run an ASP.NET page deployed inside IIS 8 in Windows 8 machine.
The fix was to enable the ASP.NET option of the IIS feature
Start -> Run -> appwiz.cpl -> Turn Windows features on or off -> Internet Information Services -> World Wide Web Services -> Application Development Features
Hope it helps.