问题
Now I decided to ask for some help. After having investigate for 2 days on my issue, I cannot figure out any solution. Maybe I will be luckier here!
So here is my issue:
On our production server (Windows Server 2008) we have a windows services running which is responsible to run some Jobs automatically. These jobs are configurable through a web application and allow the user following action: - Create the job with one or more tasks (sequential tasks) - Define the job schedule (daily, monthly, …) - Run a task manually
When the service find a job to run, it retrieves the information from the DB and execute each tasks sequentially. To execute a task the service instantiate an object corresponding task and execute it (Different type of task are available and located in different assemblies)
In my failing case:
- Task1 located in ComponentsA.Tasks.dll is executed. => succeed
- In Task1, MethodA() located in ModuleA.Logic.dll is called => succeed
- In MethodA(), GetData() located in ModuleA.Data.dll is calles => FAILED
At this point I retrieve the following error message:
Could not load file or assembly ‘ModuleA.Data.dll’ or one of its dependencies. Access is denied.
The end of fusion log show this:
*ERR: Setup failed with hr = 0x80070005.
ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.*
All DLLs are located at the root of the service installation folder. Permission seems to be OK (even if I run the service with an Administrator account and set the full control access to everyone I have the issue) Note: We are facing this critical issue only since Friday. Everything was working properly before. According to infrastructure team, they changed nothing on the server…
If anyone of you guy has an idea, it would save my week. Thanks
Cheers Benoît
回答1:
Wanted to post another case others might hit:
I was updating a production server by zipping the production bins on OSX, and unzipping on the production box.
After unzipping the files, the files were drawn green in the explorer window, which I ignored initially, but denotes that the files are encrypted.
Copying these files into the production website causes E_ACCESSDENIED. The solution is to unencrypt before moving - see https://superuser.com/questions/29424/what-do-green-folders-mean-in-windows-7-explorer.
Some background: http://blogs.msdn.com/b/asklar/archive/2012/05/03/why-do-zip-files-from-mac-os-show-up-as-green-encrypted.aspx
回答2:
I had success deleting the folder that the offending DLL (ModuleA.Data.dll) is in and re-adding it, and making the file inherit permissions from it's parent. Not sure what the problem was, but that worked.
来源:https://stackoverflow.com/questions/10210672/could-not-load-file-or-assembly-or-one-of-its-dependencies-access-is-denied