Jump to content
Sign in to follow this  

ISAPI on Windows 2016, IIS 10: Freeze Issue Test Case

Recommended Posts

Hi all, using Delphi 10.2.3 AND Delphi 10.3, the following ISAPI (with no other code, built straight from a new project) crashes the entire ISAPI work queue.


I've attached a html test file that causes the crash. It appears like if you have simultaneous ReadTotalContent's running at the same time things lock.


Can anyone else reproduce this or suggest why?


Please test with IIS 10 or newer. Our test system is Windows Server 2016.


TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
fileOut: TFileStream;
handled := true;
Request.ReadTotalContent;//This freezes everything (ecb.ReadClient)
fileOut := TFileStream.Create('C:\temp\files\'+ request.PathInfo.Replace('_upload2/','')+'_'+ request.QueryFields.Values['chunk']+'.txt',fmCreate);
FreeAndNil( fileOut );



Share this post

Link to post

Because of the problems with Delphi's own ISAPI units, and because I'm always searching to have the thinnest possible wrapper around things, I've created my own ISAPI units for my own web-solution:


There's a lot more in the project where the entire website compiles into a single library, and the ISAPI handler (or the Apache handler, or the SCGI handler) can re-compile the library if the source has changes, or auto-update the library when a new version is available, all hot-loaded by suspending incoming requests a little while unloading the old and loading the new.

But in this specific case I wonder if you would run into the same problem if you base your project on xxm.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this