Solved

PWS and VB's Object for ASP

Posted on 2001-07-27
13
258 Views
Last Modified: 2010-05-02
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
Comment
Question by:johnmemor
  • 4
  • 3
  • 2
  • +3
13 Comments
 
LVL 5

Expert Comment

by:rkot2000
ID: 6327864
you can create a mts package and add your dll to it.
to replace your dll you need to shutdown an mts package.
0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6327871
Stop the service, replace the component and restart the service.  Then you shouldn't have to restart PWS
0
 

Author Comment

by:johnmemor
ID: 6327890
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
 
LVL 38

Accepted Solution

by:
PaulHews earned 30 total points
ID: 6327891
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
 
LVL 5

Expert Comment

by:rkot2000
ID: 6327936

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
 
LVL 38

Expert Comment

by:PaulHews
ID: 6327963
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 5

Expert Comment

by:dredge
ID: 6328501
rkot2000 has the correct answer.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6328897
>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
 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6328908
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
 
LVL 5

Expert Comment

by:dredge
ID: 6329059
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
 
LVL 38

Expert Comment

by:PaulHews
ID: 6329090
>>>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
 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6329126
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
 
LVL 5

Expert Comment

by:rkot2000
ID: 6334225
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now