Link to home
Start Free TrialLog in
Avatar of mnprsd
mnprsd

asked on

Register a DLL on the IIS

I would like to know if there is any way to register a DLL-file without having to stop the IIS. I use InterDev 6.0 and IIS 4 with FrontPage Server Extension, and I have enabled the possibility to register a DLL from my client - that works fine. But still, I have to stop and restart the webserver in order to update a DLL to a newer version just because it is being used by the server.
Avatar of MasseyM
MasseyM

To update a DLL, you will always have to stop and start the server... To register the initial instance of the DLL (first installation) you don't have to stop and start... This is due to the fact that the DLL is loaded and is ready to run... Think of it as a train, you attach the car to the existing train and it is running... YOu will have to stop the train disconnect the cars in front and behind to remove the car then you can add back a newer car... if you are just adding a car, you can attach it to the end... (ok, bad example, but it gets an idea across..)
Avatar of mnprsd

ASKER

I think of it like this. The webserver is using my DLL, that's why I can't register it. If I stop the IIS it releases the DLL, and when I start it again, the FrontPage Server Extension takes care of the registration. I hope there is a way to release the DLL without stopping the IIS. Is there?

(Sorry MasseyM, but I just can't accept your answer, not yet anyway.)
No.  There is no way to release the DLL while the server is running...
You can register any DLL while the server is up and running.  However, for you application to make reference to that particular DLL, you must restart your "application" server process.  

If you're running IIS4.0, simply make sure to isolate the application in a separate server process.  If this is unsatisfactory for you, then perhaps it would be a wise idea to partition your application into several server processes.  Granted, you will lose session information for your users when passing them from one application to another, but then you should be able to overcome this by writing a custom script/application.  
No, this is false... YOu can register as many NEW components as you desire... You MUST stop the server to upgrade or remove a component.  I have found NO other way.
Avatar of mnprsd

ASKER

I tried it, and I'm sorry to say that MasseyM is right. The only option left now is to install a local webserver on each developer-machine.
The problem that you are seeing is to do with the architecture of Windows (NT, 95 and 3.x).

A Dynamic Link Library will remain loaded whilst any application that is using it is still running. The only way to utilise a new one is to stop all processes accessing it or to have them each release the library using the FreeLibrary routine within the API. But as you don't have access to the IIS code you are stuck.

Steve
Hey mouatts, that is what i have been saying all along...

INstalling a Personal Server on the development machine is THE best answer... This give the developers the option to test their programs and not wory about crashing the server... This is the way to go.
You're correct.  Clearly if the component is already registered and a running application is making reference to it, you will not be able to update/remove the DLL.  But if you're talking about a new DLL that has never been referenced, I believe my answer was incorrect.  You shouldn't need to restart the server for new DLLs.  And as for running a test server, I think that mnprsd's problem is that s/he wants to update an application while users are using it.  Is this right?  
Would you like me to repost as an answer...
Avatar of mnprsd

ASKER

narula is almost correct, at least it makes no difference. The webserver I am using is used as a "developer webserver" on my company, by at the moment three developers which are working on three different projects. There are no plain users, but if I just stop the server I will most certainly hang the next morning:)

I guess MasseyM was first with a not-so-satisfying though a probably correct answer, so I must give him some points. And for your information, I'm about to install a webserver on my own machine right now!!
ASKER CERTIFIED SOLUTION
Avatar of MasseyM
MasseyM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial