You get this error when running your application or trying to view the web service in browser???
Reason: Your Microsoft .NET Framework is not properly installed, not properly configured or not registered with the Microsoft IIS web server.(This happens when your IIS is installed after the installation of Visual Studio development environment or When you have uninstalled and re installed your IIS after installing .net framework)
Solution: Open visual studio command prompt, Goto and type aspnet_regiis -u then aspnet_regiis -i. (Try doing for all the installed versions)