Windows – Could not load file or assembly “homebrew.dll”. Access is denied

iisnetweb serviceswindows

We have a webservice running on IIS written in c#.

Lately we've been having this Could not load file or assembly "mycustomlibrary.dll". Access is denied.

It doesn't happen every time on the same assembly. Any pointers to where to look?

Best Answer

There are a lot of things that can throw an access denied error, sometimes it doesn't have anything to do with permissions at all.

So, we're going to need more information, such as;

  • Where is this file located?
  • Does the IIS User have access to read & execute this file?
  • What version of IIS are you running (and what version of Windows)
  • What is this library attempting to do (it may require to run with elevated privelages of some sort for certain operations if it isn't already).
Related Topic