I also was getting the same problem but after brain storming with IIS and google for many hours. I found out the solution.
This error is because some settings are disabled in IIS applicationHost.config
.
Below are the steps to solution:
C:\Windows\System32\inetsrv\config\applicationHost.config
and open in notepadChange the following key value present in
<section name="handlers" overrideModeDefault="Deny" />
change this value from "Deny" to "Allow"
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
change this value from "Deny" to "Allow"
It worked for me.