I also have the same problem.
I am using VS 2008. Works locally, but when publishing to our development server I get the error.
I have tried creating an empty default Web Application through VS 2008. Even when I publish that with no code, I get the error. Now, when I elimnate any references to anything in the Bin directory, it will run. Also, I took a working application from a different virtual directory on the same server, and it works fine.
So, I don't think it is a permissions issue on the virtual directory itself. It appears that something in the Bin directory is causing this error. I have been doing alot of research and have tried a few of the suggestions I have seen, but nothing is working so far. I am wondering if there maybe is a policy file that is missing.
The only other thing I noticed is that our dev server is running a different version of the .net framework than what comes with VS 2008. I have put in a request to get the version upgraded.
Anyway, If I happen accross a solution, I will make sure to post it here. I'll keep checking to see if anybody else figures it out as well.
Thanks,
Chris