Fog Creek Software
Discussion Board




I have to ask.

"Only last week, I learned how to get COM objects out of memory so you can recompile them (without restarting the whole web server)." Oh go on, do tell, the suspense is too much.

John Ridout
Wednesday, December 11, 2002

In IIS there's an UNLOAD in the application section of the properties tab of each virtual directory.

Joel Spolsky
Wednesday, December 11, 2002

For a moment there you had my hopes up. It only works for an out-of-process component. I suppose I'll have to stick with renaming the component each time to avoid down time.

John Ridout
Thursday, December 12, 2002

Not sure if it is relevant in this case, but I often find that killing the dllhost.exe process owned by IWAM_<machine_name> to be a good way of clearing stuff out of memory.  Can't claim it's fool-proof, but it is worth trying before a reboot.

Jonathan Hollingsworth
Thursday, December 12, 2002

>>Can't claim it's fool-proof, but it is worth trying before a reboot<<

Reboot?  No don't do that, just restart IIS with iisreset.  This is the only real good way I have found to replace an ISAPI filter dll (since they are loaded into the inetinfo.exe process space).  Only other way is to set the registry to do a file copy on reboot...

Billy Boy
Thursday, December 12, 2002

Cool. Single button press.

My (possibly incorrect) understanding is that you cannot recompile them as there is an instance held in memory.

I had always just unloaded them from memory before recompiling, which you can do by shutting down the application in component services. Or logging off/restarting if I was having a bad day [nuke them from orbit - it's the only way to sure].

Maybe that's what this button actually does (haven't got round to reading anything yet).

If not, what happens if you have 2 web sites which use the same component eg. public site and admin site on 2 virtual directories? Will it unload all instances (as per above), or just the ones specifically associated with that site?

Hmmm. I shall investigate further....

Justin
Thursday, December 12, 2002

The only SAFE way to make IIS release a DLL is to use the unload feature within IIS. This only works if the application is configured to run out-of-process. The only safe work around which does not require stopping inetinfo.exe which I have found is to use a new name for the component.Does anyone know an alternative?

John Ridout
Thursday, December 12, 2002

.NET?  ;-)

Amanda Huginkiss
Friday, December 13, 2002

.NET does automagically make this problem disappear.  "Hey customer, you know the project with the ridiculous schedule, why don't we stop and port it to .NET?" I wish it were an option. It's almost Christmas, I deserve a new toy.

John Ridout
Saturday, December 14, 2002

*  Recent Topics

*  Fog Creek Home