Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Terminate a ISAPI (dll)

Posted on 2002-05-20
6
531 Views
Last Modified: 2010-04-04
How do I Terminate a ISAPI (dll) when it is on the web?
0
Comment
Question by:delpro
6 Comments
 
LVL 8

Expert Comment

by:Cesario
ID: 7021572
Dear delpro,

In order to release the lock on a DLL, PWS must be manually stopped using the command prompt. By default, Pws.exe resides in the folder C:\Windows\System\Inetsrv.

To stop PWS, type the following command:

windows\system\inetsrv\pws.exe /stop

You can then restart PWS manually restarted from the Command Prompt by using the following command:

windows\system\inetsrv\pws.exe /start

Once PWS is stopped, this will release the ISAPI DLL. Recompile the DLL, if necessary. Once PWS restarts, it will again lock the DLL when it gets instantiated by your browser.

For IIS

At the run line, type: net stop iisadmin /y and then press Enter. This will stop all services while running the make on the DLL.

After recompiling your DLL, type: net start w3svc from the run line. Your services will be up again.

Best Regards

Cesario
0
 
LVL 14

Expert Comment

by:AvonWyss
ID: 7024685
Note that with IIS you can also choose to disable ISAPI caching, which will make the webserver unload the DLL after every request. This is great for development and testing.
0
 

Author Comment

by:delpro
ID: 7026308
Is there a way to do it in the program
0
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.

 
LVL 14

Expert Comment

by:AvonWyss
ID: 7026329
There is no API for this, no. Would not really make sense anyways since ISAPI works with DLLs (librarys!) and only makes calls to the DLL when necessary; besides from this, the DLL does not "run" (unlike a normal application, or a CGI application).

The only dirty trick you could try is to somehow stop or kill the web server from within one of the entry-points of your DLL, but that's not a really good idea. Therefore, use one of the other suggested methods. For you, disabling the ISAPI DLL cache might be exactly what you want.
0
 

Accepted Solution

by:
RayNorrish earned 100 total points
ID: 7178288
Do you want to kill the isapi for the purposes of replacing/updating it?

If so, check out William Egge`s ISAPI Loader, which allows replacement of dll, even while it is in use!

http://www.eggcentric.com/

If it is not what you need, a polite email may persuade him to part with the code you need to unload your DLL programatically.
0
 

Author Comment

by:delpro
ID: 7182592
Wait for a long time for this.
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 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