This is driving the whole team crazy. There must be some simple mis-configured part of IIS or our Web Server, but every time we try to run out ASP.NET Web Application on IIS
This may or not be related....I started off with the same error mentioned above, started googling, making changes, getting new errors, endless loop.
The change that got me by that error was messing with the Feature Delegation in IIS Manager under the Management section of the server. I'm sorry I can't remember which one I changed, but googling might help.
That got me past the 1st error into a whole new stream of others, some totally nonsensical. (I would get one error when running under a virtual directory, converting it to an application yielded another error, etec etc). What finally solved this series of errors was: IIS manager, Application Pools, DefaultAppPool, Enable 32-Bit applications=True
I had started this app on a 32 bit windows xp box, and I am now running it on a 64Bit Windows 7 box.
So hopefully this helps someone else.