Link to home
Start Free TrialLog in
Avatar of johnmemor
johnmemor

asked on

PWS and VB's Object for ASP

I have created an object for ASP and I use PWS as
web server.

Each time, in order to overwrite the object(dll file), I
have to shutdown the PWS and restart my PC.

Otherwise, I got "permission denied" error.
How do I safely replace the dll ?
Can I have a correct instruction for
how to overwrite dll ?
Avatar of rkot2000
rkot2000

you can create a mts package and add your dll to it.
to replace your dll you need to shutdown an mts package.
Stop the service, replace the component and restart the service.  Then you shouldn't have to restart PWS
Avatar of johnmemor

ASKER

Dave_Greene,

I have stop the service. To be exact, I have disabled the
service. Then I unregistered the dll, and replace it.
Then, I got that error.

rkot2000,

Can you give setp by step for creating and shutdown the MTS
package ?
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

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

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.
This is a known problem documented in MS KB.  Apparently it is a feature not a bug.  :)  

IIS
http://support.microsoft.com/support/kb/articles/Q166/2/79.asp
PWS
http://support.microsoft.com/support/kb/articles/Q200/2/60.ASP
rkot2000 has the correct answer.
>rkot2000 has the correct answer.

Huh?  How do you figure that dredge?

The commands I gave will allow a recompile without rebooting, and without going to MTS, so how is that a better answer than mine?
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?