On attempting to deploy a .net 3.5 website on the default app pool in IIS7 having the framework section set to 4.0, I get the following error.
There i
This is maybe the wrong answer for you. But this was the first hit on Google when I tried to solve my problem. With that said...
The same error message occurred for me as well, but when I tried to run IIS Express through Visual Studio.
My problem was that I mistakenly commited my applicationhost.config to TFS. Later when I tried to run the project on my laptop after getting the latest commits. that's when the error occurred.
I found that the virtual directory path was wrong.
Hope that this help somebody!
This is my first post, so be gentle :)