I recently got this error with an upgraded project to VS 2010 (web forms). I searched the internet for the error, which I thought wasn't really an error due to a corruption since I could get an MVC app to run and another smaller web forms application. But this one wouldn't run with the local web server. No matter what I did, I got the error. There were some other unrelated changes I needed to make, but that didn't fix the error.
The application was configured to use the local web server, so I tried adding the directory as a virtual in IIS. And once I did this, the issue was resolved. For me, while there are other possible causes for the problem, using IIS was the resolution. Hope this helps someone.