I had this error message when I tried to run a Silverlight application as a sub directory of my SharePoint application in IIS with the Silverlight application running under .NET 4.0. Try checking that all the sub directories of your SharePoint application are still running on .NET 2.0.

I had this same issue when running the SharePoint 2010 PSConfigUI.exe and was not too keen to go adjusting the web.config files right away.

I went into INETMGR.exe (IIS manager) and changed the .NET framework for all the SharePoint related app pools from 4.0 to 2.0. You may also want to restart IIS (IISRESET from an administration command prompt (right click cmd and select Run As Administrator)) if needed.

At this point I was able to finish installing SharePoint 2010.

You may still have the
line which can be deleted if this issue is still reported by your browser when connecting to the SharePoint site.