tags:

views:

1219

answers:

4

I'm trying to reinstall a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one.

The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.config is not a good solution.

Restarting the IIS server or the worker process isn't an option as there are already 50 sites running that must continue to do so.

does anyone know what i'm doing wrong or what i can do to remedy this situation?

+1  A: 

AFAIK, you need to restart IIS for it to get a fresh reference to the updated DLL. Your best bet is to perform the reset at a low traffic time. If you are running multiple servers with load balancing, you can prevent new connections from hitting one server until all connections have been closed. Afterwards, update the DLL, restart IIS, and bring the server back into the connection pool. Repeat for each server with no visible downtime to the end users.

Jason Z
A: 

Since you don't make a reference to application pools, I'm going to assume you are on the old version of IIS. In that case, what you'll need to do is to "touch" all the DLLs in each site that references the DLL.

The problem is that the code is already loaded and you need to find a non-intrusive way to re-load the application. Recycling app-pools is an effective way to do this. If you are on the old IIS that doesn't have app-pools, then updating the last-modified in the /bin/ folders or web.config files will reload the application without affecting the other sites.

So a script of some kind to do the above is in order. All it needs to do is update the lastmodified on the DLLs in every /bin application directory.

hova
A: 

I am using IIS 6.0 and each of the sites does not belong to it's own app pool. i tried to touch the files to get it to reload the dll from the gac but it's still using the old one.

i thought i'd just uninstall the dll from the gac but the site still works with it uninstalled - so it's got to be doing some other caching.

unfortunately we are not yet running multiple servers with load balancing.

if i just leave it for a day or so maybe the worker process will reload and the new dll will make it's way in.

John Boker
A: 

After a day it seems that the worker process has recycled and it now has a fresh instance of the dll.

John Boker