"Could not load file or assembly 'xxxxxx' or one of its dependencies. Access is denied."
If you get this exception when running an ASP.Net site through the Visual Studio web server, make sure that McAfee isn't causing the problem. Here's what I had to do to turn it off:
- Open the "VirusScan Console"
- Go to properties on "Access Protection"
- Click on "Common Maximum Protection"
- Make sure "Prevent creation of new executable files in Windows folder" is set to NOT block.
- Click "OK"
- Now restart the Visual Studio web server and it should work!
I’ve also had this problem when the Windows Search Service is trying to index the DLL’s in my “bin” folder every time I compiled. You could try using the “Process Monitor” tool to see if there’s another program accessing your DLL causing the locking problem.