Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am stuck with one asp.net error. My application work fine on development and test environemnt. But on production it give me following error:

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

like image 453
Syed Tayyab Ali Avatar asked Apr 30 '09 21:04

Syed Tayyab Ali


People also ask

Could not load file or assembly common or one of its dependencies?

In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.

Could not load file or assembly culture neutral Publickeytoken null or one of its dependencies?

This error usually means that the assembly was not found. Try verifying that the file exists in the directory where your application is running.

Could not load file or assembly VS 2019?

Restart Visual Studio, clean and build a solution. Remove the class library references and add it again. Tools > Import and Export Settings Wizard > Reset all settings (maybe some setting was not well configured).


2 Answers

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.

like image 144
Mark S. Rasmussen Avatar answered Sep 27 '22 17:09

Mark S. Rasmussen


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

like image 24
Syed Tayyab Ali Avatar answered Sep 27 '22 17:09

Syed Tayyab Ali