My program is a Delphi ISAPI DLL built with Delphi 2007. I'm migrating to Delphi 10.2 Tokyo and TWebModuleList is gone from Web.WebReq.

My program is a Delphi ISAPI DLL built with Delphi 2007. I'm migrating to Delphi 10.2 Tokyo and TWebModuleList is gone from Web.WebReq.

With D2007, when the application starts, the following code is called in order to pre instanciate a pool of 5 WebModules.

procedure TSWebApplication.CreationWebModules;
var
i: integer;
TabDataModules : array of TWebModuleList;
begin

SetLength(TabDataModules,1);
TabDataModules[0] := ActivateWebModules;
if Assigned(TabDataModules[0]) then
TabDataModules[0].AutoCreateModules;

SetLength(TabDataModules, NbInstances);

for i := 1 to NbInstances - 1 do
begin
TabDataModules[i] := ActivateWebModules;
if Assigned(TabDataModules[i]) then
TabDataModules[i].AutoCreateModules;
end;

for i := 0 to NbInstances - 1 do
DeActivateWebModules(TabDataModules[i]);
end;
This way, instead of having the (first 5) WebModules created on demand, they are created when the application starts, then deactivated and auto activated on demand.

I know WebModules are managed by IIS and we don't necessary need this behavior, but it is the way it worked (pretty well).

TWebModuleList seems gone since Delphi XE8 (no page on docwiki whereas it was still there on the XE7 site (http://docwiki.embarcadero.com/Libraries/XE7/en/Web.WebReq.TWebModuleList)). I couldn't find ANY changelog, or other information on why it is gone et how we can build the same behavior...

Does anyone have any information?

Thanks

Marco Cantù

Comments