tags:

views:

427

answers:

3

Hi,

I have a ISAPI application written with Delphi. The application is compiled with runtime packages. Basically, all related bpls should deploy to an ISAPI enabled directory as well in order to get the ISAPI dll works. However, I always face errors when invoke ISAPI dll.

If my ISAPI dll doesn't compile with runtime packages, then it works fine.

The runtime packages should be the cause of the problems. The only solution so far I have is add the runtime packages path to system environment variable: %path% and restart the PC.

Is there any other solution available by not altering the environment variable?

I am using Windows 7 and IIS 7 and Delphi 2010.

A: 

Have you tried placing .bpl files in directory where ISAPI dll is?

If this do not work then create installer for your ISAPI and this installer should copy all needed .bpl files to Windows system directory (you can get it using GetSystemDirectory() API function, usually this is <WindowsDir>\system32). For InnoSetup this is {sys} file destination.

Michał Niklas
Yes. The .bpl files are placed in same folder as ISAPI dlls and it doesn't work. I do not wish to place .bpls into <WindowsDir>\system32 folder although it works.
Chau Chee Yang
Try placing them in the bin directory of IIS.
M Schenkel
Generally I find it easier and more reliable to make one big exe/dll then use and deploy many .bpls. My server app build with .bpls using Delphi 4 crashed after few hours of work, while it can work for weeks if I build it standalone. With .bpls it crashed with some strange Access Violations. ISAPI is loaded once so IMHO its size doesn't matter that much.
Michał Niklas
+1  A: 

For the case where the ISAPI DLL and the runtime bpl's are in the same directory, check the file permissions on your ISAPI DLL and the runtime .bpl files, and make sure that the Internet Guest account has read+execute access to them.

Ben Ziegler
A: 

The BPL files MUST be in the system path of the machine OR in the directory of the executable (which in this case I believe is svchost.exe?). Now, the fun part. As each application is launched it grabs a snapshot of the environment at that time. If you add to the path, you will have to reboot the machine for it to become active, OR restart the application (which in this case involves restarting the OS).

skamradt
This is not a good news nor is a good deployment strategy. There should more many ISAPI deployment in the market. Just wondering how they settle this.
Chau Chee Yang
It is solved by not using runtime packages.
skamradt