Last post Jun 30, 2008 12:29 PM by anand.kesavan
Jul 22, 2007 02:05 AM|SecretSquirrel123|LINK
I have an asp.net application that uses an assembly NHibernate.dll, plus a bunch of other assemblies that this first one is dependent on. The application is getting an error periodically "Could not load file assembly... Access is denied". Once the error
occurs it will not go away. It doesn't always occur for the same file - sometimes it occurs for files that NHibernate.dll is depedent on. Does anyone have ideas how to fix this?
This app runs fine on my local. At first, it runs fine on a staging server too. But then, on the staging server, at some point I get an exception:
Based on where the error occurs in the call stack, this seems to be occuring when a new app domain is created.
Looking at the assembly load trace I see:
LOG: User = MyDomain\MyUser
One thing that puzzles me a lot is why the worker process is not trying to access the copy of the assembly in the "/Temporary ASP.NET Files" folder. Shouldn't it be using this "Shadow Copy" of the file? Or is it attempting this access, failing,
and then continuing with the other locations?
When I run the app locally, I see that the file in the bin directory is accessed (I see this using the ProcessMon tool), and not the copy in the /Temporary ASP.NET Files folder. Is this a problem? Could this be some issue with multiple worker processes
trying to access the same file?
When I tried running ProcessMon on the stagging server where the error occurs, once the error is occuring, using ProcessMon I don't see any attempt to access NHibernate.dll anywhere. This is puzzling too - I get this error above but ProcessMon doesn't see
the failed access (unless I have my filter setup wrong, which is quite possible...)
Jul 22, 2007 05:09 AM|vcsjones|LINK
This blog article might prove to be resourceful on figuring out what is wrong, or fixing the issue:
Jul 22, 2007 05:17 PM|SecretSquirrel123|LINK
Yes I found that link previously. It states:
For an "Access is denied" message (for hresult E_ACCESSDENIED, 0x80070005):
Run tlist -m on the file to see if another process has the file locked and without share-read access. If not, check the ACLs for the file and its dependencies (especially if you're using impersonation).
I ran tlist -m previously and it shows that the worker process is accessing the file, as I mention in my post.
So my question is, is it normal that the web application is hitting the file in the \bin directory and not the file in the temporary internet folder (shadow copy folder)?
Jun 27, 2008 02:02 PM|anand.kesavan|LINK
I am facing the same issue in production environment. My production environment is clustered (4 servers) and I am getting the same error message in all servers. Could you please help me on this?
Error Description :
Jun 27, 2008 08:10 PM|PSP_152890|LINK
Jun 30, 2008 12:29 PM|anand.kesavan|LINK
I am getting error message only for one particular assembly. All other assemblys in this application is working fine. Do you suggest delete file from temp folder would resolve this issue??