Could not load file or assembly 'someProject' or one of its dependencies. Access is denied

Go to Sysinternals and download Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Then start it up, filter thread and registry actions away. Clear contents. Run your app and get the error, and then stop the collection in process monitor. Now search for an ACCESS DENIED status, and you'll be able to see the exact file that's causing troubles, as well as the user account trying to get access.


Just delete the bin folder and then agian copy it. Now, it is working...


Give full permissions to the running user or group (like MACHINE\users group or DOMAIN\domain users) in

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

Use your target .net version number instead of v4.0.30319 if it's other than .net 4.0.