0

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?

GoDaddy
  • 111
  • 1
  • 4

2 Answers2

1

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).
IceMage
  • 1,336
  • 7
  • 12
  • the file .. is a dll. I believe it's in the bin Where do I see the IIS User account? IIS 6.0 It's happening in different libraries, some library will just try to build an object from the external libraries. Some tries to communicate with a wcf service. It's seem so random. Is there tools I can use to check the permission or to see on what credential the web request is being made? – GoDaddy Apr 26 '10 at 20:40
  • @GiDaddy - You "believe it's in the bin..."? How can you expect to get this right if you don't even KNOW where the file is? – John Gardeniers Apr 26 '10 at 21:50
  • Sorry, it's my bad habit to talk like that. We found the problem related to impersonation. Some call on the webservice where impersonnated and they did not had some priviledges to some temporary asp .net folder. – GoDaddy Apr 27 '10 at 13:29
1

Found the issue was related to impersonation. Some calls where impersonated and the impersonated user did not have rights to %SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files

here are more details on ACL

http://msdn.microsoft.com/en-us/library/kwzs111e.aspx

GoDaddy
  • 111
  • 1
  • 4