Recently I was setting up a new website and came across this error! DON'T be fooled by this error, it does not mean switch on Directory Browsing.
My OS is Windows 2008, IIS 7.0 and the new site is running on .NET 4.0
This is what you need to do to correct the issue.
1.) Run a command prompt as Administrator.
2.) Copy and paste the following text “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i”
I hope this helps someone else out there.
Server Error in Application "DEFAULT WEB SITE/TESTSITE"
Internet Information Services 7.0