Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

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 ?
0
johnmemor
Asked:
johnmemor
  • 4
  • 3
  • 2
  • +3
1 Solution
 
rkot2000Commented:
you can create a mts package and add your dll to it.
to replace your dll you need to shutdown an mts package.
0
 
Dave_GreeneCommented:
Stop the service, replace the component and restart the service.  Then you shouldn't have to restart PWS
0
 
johnmemorAuthor Commented:
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 ?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
PaulHewsCommented:
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.
0
 
rkot2000Commented:

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.
0
 
PaulHewsCommented:
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
0
 
dredgeCommented:
rkot2000 has the correct answer.
0
 
PaulHewsCommented:
>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?
0
 
anthony_glenwrightCommented:
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...
0
 
dredgeCommented:
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.
0
 
PaulHewsCommented:
>>>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.
0
 
anthony_glenwrightCommented:
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?
0
 
rkot2000Commented:
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.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

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.

  • 4
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now