The problem is the web server (IIS or PWS) keeps a reference to the DLL even after it has finished using it. Restarting the web server from the console does nothing so you will have to restart it from the command line.
Create a batch file in the system directory with these commands:
(mtxstop may not be necessary in PWS)
net stop iisadmin /y
mtxstop
net start w3svc
net start msftpsvc
This will stop and restart the processes that are holding a reference to your Dll and allow you to recompile.
In the left pane of MTS Explorer, select My Computer.
Open the Packages Installed folder.
On the Action menu, click New ? Package.
Click the Create an empty package button.
Type Package Name for the new package, and click Next.
Select Interactive User option and enter the following information:
Click the Finish button.
Right-click on the new package and choose Properties.
Select the Security tab.
Unselect the Enable authorization checking checkbox.
Press the Apply button.
Select the Advanced tab.
Shut down after being idle for should be set for 1 minute.
Press the Apply button.
Select the Activation tab.
Server Package - must be selected.
Press the Apply button.
Press the OK button.
Open the Components folder.
On the Action menu, click New ? Components
Make sure that in your Windows NT Explorer, the Hidden files option is set to Show all files. If this option is set to hide files with the .dll file name extension, you will not see the DLLs that contain your component in the Select files to install dialog box. You will have to restart the MTS Explorer if you change this setting.
Click the Install new component(s) button.
In the dialog box that appears, click Add Files,
browse to the folder to select the following files:
ActiveX.dll
Click the Open button.
After you add the files, the Install Components dialog box displays the files you have added and their associated components.
You should select the Details check box, you will see more information about file contents and the components that were found.
Click the Finish button to install the components.
Actually (my ten cents worth) PaulHews has the answer. I use a batch file that is exactly the same as what he posted about 10 times a day, and it works fine...
why would you even want to restart IIS if you don't have to? that's a horrible way to do things. it's slow, it causes drops in your service. it's prone to creating problems (like not being able to start back up).
rkot2000's solution is by far the best. plus, this solution allows you to run your dll's in a transaction, giving far greater control over information movement and processing, and allowing for true scalability across any number of servers (n-tier).
there's no doubt in my mind that MTS is by far the best way to register dll's on a web server.
the ONLY time it would be benefitial to use any other method, is if you were using Win9x or ME. and in that situation, you wouldn't even have the option of using MTS (as it won't install properly), and you shouldn't be runnings PWS anyways because of security risks.
>>>rkot2000's solution is by far the best. plus, this solution allows you to run your dll's in a transaction,
giving far greater control over information movement and processing, and allowing for true scalability
across any number of servers (n-tier).<<<
Yes, it's great for those things. That doesn't necessarily mean it's right for what he's doing ... but I'll let him decide. Remember though that a lot of us use PWS on our development machines (in my case Win 98.) MTS is not possible or appropriate in this development scenario.
I was also assuming that john was talking about a development machine, where scalability, transaction control, and all the stuff MTS does well are not required...
And if it is not a development machine, then why is he compiling code on it?
to anthony_glenwright :
>>>And if it is not a development machine, then why is he compiling code on it?
I am using my development dual boot machine (NT Workstation 4.0 Sp 6a/win2000),
for writing code and testing/debugging, before I submit all code to the staging server.
and I think it?s important to test your component(s) in real environment, because win98 not the same as winnt or win2000.
plus try to run sql server 2000, oracle 8.1.6 iis and mts on win98
John asked for the easiest way to unload a dll without stopping services.
Do you know another way?
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
to replace your dll you need to shutdown an mts package.