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
My resolution was kind of stupid.
I installed a copy of .net 3.5
Created another app pool and selected .net 3.5 (it says 2.0.5077 in the drop down)
Added my website to that app pool
Recycled the old and new pools and the site started working.
It came down to me not having 3.5 installed even though the turn on windows features said I did and creating another app pool to use. I hope this helps others.