B
brianedow
I do not know why this happen, and it does not happen ALL the time, but
it does happen on a fairly regular basis, and when it does, it causes
real problems. If anyone can tell me
how to prevent this, and moreover, how to FIX it, without having to
bounce
IIS, I would REALLY appreciate it! This problem is occurring on IIS
Advanced Server 2003. Have not tested this on Server 2000. I am
guessing the same.
The Problem:
We deploy a work version of a .NET 2.0 web application. It works and
everything is okay. But then sudden, IIS / worker process fails to
load an assembly.
This is the error:
Could not load file or assembly '{My Assembly Name},
Version=1.0.0.20906, Culture=neutral, PublicKeyToken=null' or one of
its dependencies. Access is denied.
The file is stuck by IIS. I have tried to recycle the application pool
and that does not work. The only solution I have found so far is to
restart IIS and update the Assembly in the bin folder in order to force
a recompile. Please keep in mind I can update any of the other
Assemblies in the bin folder without any problem, it is only this one
file I can not update, thought restarting IIS. When I try, I get this
error ".....cannot access the file {My Assembly Name} because it is
being used by another process."
There is one thing that I have noticed: there is code where this
problematic assembly is being used / accessed using reflection. Now,
there are other assemblies also being accessed by reflection, but this
one so far has been the problem child. I tried FileMon to see who
might have the file locked and so far it has been the workerprocess
(w3wp.exe). I also seen others having this problem, but not real
solutions. I am at a loss.
Here is some of my research:
1.
http://groups.google.com/group/micr...eb3f4?lnk=st&q=&rnum=4&hl=en#7d8c7e0fcb2eb3f4
2.
http://www.velocityreviews.com/forums/t116973-releasing-a-loaded-assembly-in-aspnet-20.html
3. http://www.codecomments.com/archive289-2005-12-715366.html
4. http://www.eggheadcafe.com/forums/ForumPost.asp?ID=60661&INTID=7
How can I prevent this from happening in the first place? Any
thoughts? Thanks for your time.
it does happen on a fairly regular basis, and when it does, it causes
real problems. If anyone can tell me
how to prevent this, and moreover, how to FIX it, without having to
bounce
IIS, I would REALLY appreciate it! This problem is occurring on IIS
Advanced Server 2003. Have not tested this on Server 2000. I am
guessing the same.
The Problem:
We deploy a work version of a .NET 2.0 web application. It works and
everything is okay. But then sudden, IIS / worker process fails to
load an assembly.
This is the error:
Could not load file or assembly '{My Assembly Name},
Version=1.0.0.20906, Culture=neutral, PublicKeyToken=null' or one of
its dependencies. Access is denied.
The file is stuck by IIS. I have tried to recycle the application pool
and that does not work. The only solution I have found so far is to
restart IIS and update the Assembly in the bin folder in order to force
a recompile. Please keep in mind I can update any of the other
Assemblies in the bin folder without any problem, it is only this one
file I can not update, thought restarting IIS. When I try, I get this
error ".....cannot access the file {My Assembly Name} because it is
being used by another process."
There is one thing that I have noticed: there is code where this
problematic assembly is being used / accessed using reflection. Now,
there are other assemblies also being accessed by reflection, but this
one so far has been the problem child. I tried FileMon to see who
might have the file locked and so far it has been the workerprocess
(w3wp.exe). I also seen others having this problem, but not real
solutions. I am at a loss.
Here is some of my research:
1.
http://groups.google.com/group/micr...eb3f4?lnk=st&q=&rnum=4&hl=en#7d8c7e0fcb2eb3f4
2.
http://www.velocityreviews.com/forums/t116973-releasing-a-loaded-assembly-in-aspnet-20.html
3. http://www.codecomments.com/archive289-2005-12-715366.html
4. http://www.eggheadcafe.com/forums/ForumPost.asp?ID=60661&INTID=7
How can I prevent this from happening in the first place? Any
thoughts? Thanks for your time.