View previous topic :: View next topic |
Author |
Message |
bobokonijn -
Joined: 18 Nov 2014 Posts: 4
|
Posted: Tue Dec 02, 2014 9:51 am Post subject: How to make Delphi ISAPI DLL's work (fix error 500) |
|
|
If you develop ISAPI Dll's with Delphi, you'll find out that Abyss may throw an internal server error 500.
The reason is that Abyss doesn't support asynchronous I/O, and Delphi's unit "Isapithreadpool.pas" enables that feature for all web servers except Netscape Server.
To avoid this problem, you have two options:
1) This unit is optional. Remove all references to Isapithreadpool from your Delphi project. This will involve a speed penalty in Microsoft IIS and reduce scalability.
2) Make a small modification in the unit, so that thread pools are enabled ONLY in Microsoft IIS and disabled in all others.
In order to make the modification, search the source of unit Isapithreadpool.pas and copy it to your project directory. Then modify the procedure "CheckForNetscapeServer" as follows:
function CheckForNetscapeServer: Boolean;
var
LoadingModule: string;
Windir:String;
begin
SetLength(LoadingModule, 4096);
SetLength(LoadingModule, GetModuleFileName(GetModuleHandle(nil),
PChar(LoadingModule), Length(LoadingModule)));
setlength(windir,4096);
SetLength(windir, Getwindowsdirectory(pchar(windir),4096));
Result := AnsiCompareText(windir, copy (loadingmodule, 1, length(windir))) <>0;
{$ifdef debug}
if result
then outputdebugstring('Isapi Asynchronous I/O Disabled')
else outputdebugstring('Isapi Asynchronous I/O Enabled');
{$endif}
end;
This modification enables asynchronous I/O only if the worker process is located somewhere beneath the directory C:\Windows (in other words, if it is a Microsoft product). All third-party products are normally installed elsewhere on the hard drive.
Happy programming,
Arthur Hoornweg _________________ Kind regards,
Arthur |
|
Back to top |
|
 |
Jerry -
Joined: 07 Sep 2016 Posts: 6
|
Posted: Fri Mar 03, 2017 7:04 pm Post subject: |
|
|
Arthur, I just saw this, for which I apologize. Frankly, because of this server error I had given up on Absys/
Thank you very much for your detailed reply. I will give your advice a shot as soon as I find some free time. I particularly appreciated knowing the reason it doesn't work with Delphi DLLs. |
|
Back to top |
|
 |
Jerry -
Joined: 07 Sep 2016 Posts: 6
|
Posted: Mon May 01, 2017 12:36 am Post subject: |
|
|
I spent another day on this without success. /all our Delphi XE2 (and D5, for that matter) are built without the thread pool, so this isn't the problem. I built a simple "Hello, World" ISAPI app (XE2 with IntraWeb) and I get an immediate 500 error.
Is anyone aware of ANY Delphi ISAPI app successfully run on Abyss?
I like the server and would like to use it if possible but I can't waste much more time on this. |
|
Back to top |
|
 |
Jerry -
Joined: 07 Sep 2016 Posts: 6
|
Posted: Wed Jun 07, 2017 5:18 pm Post subject: Abyss Error 500 issue SOLVED |
|
|
This has been resolved. I finally realized that I had installed the 64-bit version of the Server with my 32-bit version of Delphi XE2.
All works well. This is the first option you must set properly when starting to install Abyss. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|