For IIS :
Change authentication mode to 'None' in web.config.
Go to your web.config file and change following line
<authentication mode="None" />
For Visual Studio :
The error is coming because you are opening your website incorrectly...
open the site where the web.config file is at root directory
if you are opening site where web.config file is inside some folder like websites(where web.config is inside website folder):
Websites:website1:web.config //Gives you this error so open the site like "website1"
website1:web.config
or try this link:
<http://blogs.msdn.com/b/robgruen/archive/2005/09/12/464196.aspx>
hope you get it