IIS locks DLLs after deploying web service (sometimes) UGH!!!

From: Jim (Jim_at_discussions.microsoft.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 13:45:04 -0800

This does not happen ALL the time, but it does happen on a fairly regular
basis, and when it does, it causes real problems, especially when it happens
(like it right now) in the PRODUCTION environment.... 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!! :)

Problem: This occurs on IIS under Windows 2000 Advanced Server and 2003 as
well. Sometimes, when I update the web.config file of my web services (to
change a remoting entry value, or some other key, for example) IIS locks a
DLL somewhere, preventing the web service from running again until you bounce
IIS. Note that this does not "always" happen, and I cannot seem to determine
the steps necessary to duplicate it. Only that once IIS decides to lock on
to a DLL, it never lets go of it. When you try to do a WSDL on the web
service, you get an error ".....cannot access the file xxxxx because it is
being used by another process." The specific file depends on the web service
that I'm having hte issue with, but it always blows up in the same place-- a
line in the "machine.config" file for IIS where it says assembly="*".

The file that is stuck is generally not one of the DLL's specific to my web
service, but is oftne one of our other middle-tier DLL's, but sometimes it
appears to be a .NET DLL (part of the .NET framework or something, perhaps?)
The point of course being, that it "should not do that"... but nonetheless,
it does.

How can I get Windows to let go of the DLL when it does this without having
to bounce IIS in our production environment? How can I prevent this from
happening in the first place? Any thoughts? Thanks. :)



Relevant Pages

  • Assembly.LoadFile() causes file locking
    ... I have a web service running in IIS that uses Assembly.LoadFileto ... load a specific DLL, depending on who is making the web service ... This works fine except that IIS places a lock on the DLL, ...
    (microsoft.public.dotnet.framework)
  • Re: Assembly.LoadFile() causes file locking
    ... load a specific DLL, depending on who is making the web service ...  This works fine except that IIS places a lock on the DLL, ... climb with every call to the web service. ...
    (microsoft.public.dotnet.framework)
  • Reflection in a Web Service?
    ... // Dynamically load the DLL ... However, from a web service project, I can't seem to get this to work. ... Is there a special way that IIS needs set up to allow this? ...
    (microsoft.public.dotnet.general)
  • Einbindung einer unmanaged legacy DLL in ASP.NET Web Service
    ... Ich binde eine unmanaged DLL (kein COM, Quelltext liegt nicht vor, per ... einem ASP.NET Web Service, dann stürzt der IIS ab, Exceptions ...
    (microsoft.public.de.german.entwickler.dotnet.framework)
  • Re: Help connecting to Access DB from web service
    ... The Access database is located on a different server than ... While developing / debugging the web service is hosted on my development ... When deployed it is being host with IIS. ... What are the differences between the 'ASP.NET Development Server' and IIS ...
    (microsoft.public.dotnet.framework.adonet)