Anderson, I've seen this problem often in a developer environment, especially with a large solution using Visual Studio. In my case, Visual Studio will often hold a lock on the file, so that it can't be overwritten. Granted your problem is in a production environment, but Humberto's solution will probably work. If you still have troubles, install Process Explorer (www.sysinternals.com) on your server, and go to Find -> Find Handle or DLL. Type in the full path or part of the path of your NHibernate.dll file, and search. It will show you every process that is holding a lock on that file. Most likely, it's an instance of w3wp (IIS worker process). There are lots of threads on this problem online, but few of them are particularly useful.
Joe On Feb 11, 8:37 am, Anderson dos Santos Pimentel <[email protected]> wrote: > Hi. I have this strange error (almost) on a daily basis, but can't > figure out what's causing it: > > Could not load file or assembly 'NHibernate, Version=1.2.0.4000, > Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its > dependencies. Access is denied > > The solution is kind of difficult because of two main factors: > 1. The error occurs only on production environment and I can't > reproduce it on my development environment, so I can't test and play > around with configuration settings without causing even more trouble > to the users; > 2. It seems to occurs randomly. Usually the first user that access > the application (ASP.NET) that day triggers the error that can be > solved only by running 'iisreset' on the server, but some days the app > is OK during all day long. > > I've found something very similar on the following link, but with no > solution > either:http://bytes.com/groups/net-asp/566517-access-denied-nhibernate > > Any help would be appreciated. > > Thanks in advance, > > Anderson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
