Easy to use and very flexible ISAPI server:

  • Fast and easy to use ISAPI servers side support
  • Very flexible, so it can use any HTTP layer
  • Comes with INDY HTTP layer implementation (Indy 9 and 10)
  • Unicode (Delphi 2009,2010,XE) ready
Cromis ISAPI server download: Version 1.0.0 (05.09.2010)

The demo bellow shows the basic usage of Cromis ISAPI server. It uses the Indy HTTP server as the HTTP layer to listen for requests. But you could easily use ICS or Synapse. For now, Indy is the only HTTP layer included with the download. If you would like to have other HTTP library support, contact me and I will see what I can do. The code shown bellow accepts the HTTP requests and passes it to the ISAPI server. On the other side the ISAPI module processed the request and sends back the response. It works with Delphi build in ISAPI module support. Also, if you have trouble using the code or have any other questions, please contact me directly using the “Contact” page or write a comment bellow the page.

ISAPI server side:

procedure TForm1.btnSendClick(Sender: TObject);
procedure TfMain.HTTPServerCommandGet({$IFDEF Indy9}
                                        AThread: TIdPeerThread;
                                      {$ELSE}
                                        AContext: TIdContext;
                                      {$ENDIF}
                                      ARequestInfo: TIdHTTPRequestInfo;
                                      AResponseInfo: TIdHTTPResponseInfo);
var
  ECB: TECBData;
  TempStr: string;
  PathStr: string;
  RootDir: string;
  DDLFileName: string;
begin
  TempStr := Copy(ARequestInfo.Document, 2, Length(ARequestInfo.Document));
  RootDir := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
  PathStr := '/' + StrAfter('/', TempStr);
  DDLFileName := StrBefore('/', TempStr);
 
  ECB := ECBDataList.AcquireNewECB;
  try
    FillECBFromRequest(ECB, HTTPServer.KeepAlive, ARequestInfo, RootDir, DDLFileName, PathStr);
    try
      FISAPIServer.Execute(DDLFileName, ECB);
    finally
      FillResponseFromECB(ECB, AResponseInfo);
    end;
  finally
    ECBDataList.DeleteECB(ECB.ECB.ConnID);
  end;
end;

ISAPI module side:

procedure TWebModule1.WebModule1WebActionItemAction(Sender: TObject; Request: TWebRequest;
  Response: TWebResponse; var Handled: Boolean);
begin
  Response.Content := 'This is a sample ISAPI module.';
end;

Change Log

  • 1.0.0
    • Initial implementation