I’m creating a new ASP.net website via Visual Studio. I then try to run the default.aspx page it generates, and it throws this error:

I’ve tried deleting the affected lines as suggested by MSDN but to no avail! I am on Windows 7, with ASP.net installed
Any ideas?
This is a common error when you assign the Site (that includes a web.config from .net 3.5) to an application pool that is running in 4.0. It causes some of the entries in web.config to be duplicated, so you can: 1) clean up the web.config to remove those duplicated entries, or 2) change the application pool to one that is using .net 2.0.