Solved

How to replace my ISAPI DLL on a remote Web server ?

Posted on 2000-03-23
5
199 Views
Last Modified: 2010-04-04
Hello,

We try some CGI stuff on a web server.
Our web hosting is a US hosting compagny. We are working here in Europe. It's easy to replace a CGI EXE app on the remote server.

Now, we are working with DLL (ISAPI). When we try to replace the DLL with a new DLL, we are not allowed to delete the file !

How kill the DLL process to remove the DLL from memory and replace the old DLL with the new one.

Is it possible to put in the DLL a procedure to remove the DLL from the memory ?

We don't want to ask each time the people on the US hosting to kill the process ...

Could you give us a working solution ?

Best regards,

Jean-Pol
0
Comment
Question by:jpdupont
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 2652333
You have to stop and restart the webserver. Then the DLL will be released.
0
 

Author Comment

by:jpdupont
ID: 2652394
Yes ... I'm in Europe and the Server is in the USA ...
Impossible to ask this to the guy at the hosting compagny !

Is it possible to create a EXE app, in the directory of the DLL, to excecute from here in europe, and kill the DLL ?

Thanks,

JP
0
 
LVL 9

Expert Comment

by:ITugay
ID: 2652571
I'm not sure, but you may try to load DLL library dynamically, instead statically:

Handle := LoadLibrary('LIBRARY.DLL');
.....
FreeLibrary(Handle);
.....
/// update your library
.....
Handle := LoadLibrary('LIBRARY.DLL');


Cheers,
Igor.
0
 
LVL 2

Expert Comment

by:ray_leach
ID: 2652607
It seems like a web server configuration issue. In IIS you can specify that the DLL be kept in memory between executions (i.e. shared) or be released with each extention.

You are going to have to get the Web admin to changed the config as above and the restart the server.

After this has been done you should be able to replace the DLL in the future, provided that the application isn't running on another web server thread.
0
 
LVL 15

Accepted Solution

by:
simonet earned 50 total points
ID: 2652858
Use CGI instead.

In your specific scenario, CGI is more appropriate, since you have no control over the server. With CGI, you are allowed to replace the EXE file, since it doesn't stay loaded at all times.

ISAPI DLLs works in the server's memory space (just like a regular DLL does), thus you cannot replace unless the webmaster brings the server down or explicitely unloads the DLL.

Another option is: if you don't want to work with CGI and need to debug the DLL, use IntraBob (www.drbob42.com), which works integrated to the Delphi IDE.

If you want to turn your ISAPI project into a CGI project without loosing any code and without much effort, look here:

http://community.borland.com/delphi/webtech/0,1418,10005,00.html 

Yours,

Alex
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Internet Explorer View Settings Question 15 117
Magic Software info 18 139
Twebbrowser in Fire monkey android scrolling to bottom 1 45
Delphi: sending SMS on android platform 1 39
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 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