This error can happen for couple of reasons, either IIS is not installed correctly or script maps are overwritten. Please execute the following commands and reset IIS.

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir
C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>Service
ModelReg.exe -i
Remember to reset IIS after executing the previous commands.

If you are using Windows 8/2012 IIS 8, then please make sure HTTP Activation for WCF is enabled as shown below