Atozed Forums

Full Version: Windows Server 2022 HTTP.SYS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I don't know if anyone has encountered the same challenges as I have, but here it goes.
After upgrading my webserver to Windows Server 2022, my Intraweb applications using TIWAppCache stopped working.

More details:
I create a new Tempfile with: LFileName := TIWAppCache.NewTempFileName('.pdf')
The App does it's thing and saves it's data to this new Tempfile
Finally I process the Tempfile with: HRef := TIWAppCache.AddFileToCache(WebApplication, LFileName, FContentType, ctSession)

But in one of the 2 final steps I get the error: Can't add file <TempFile> to cache. The file does not exist.

All this is done in HTTP.SYS.
When running the same app in SA, all works fine.

I've read about security issues and patches on Windows Server 2022 regarding HTTP.SYS, could it be that this mechanism is unsecure?

I'm using Delphi 11.1 with IW 15.2.68 Ultimate.

Thanks in advance for (possible) solutions!

Cheers, Paul

PS. After moving everything to a Windows 2019 Server, all worked well!
Not sure if this would make a difference but while debugging a cache issue I changed the cache location to within the app folder space like so in the SCBaseConfig:

CacheDir = gGetAppPath()+"Cache\\";

It made it more convenient to view the process but also if there's a weird permissions thing going on with default location this might fix it.
(12-08-2022, 11:04 PM)MJS@mjs.us Wrote: [ -> ]Not sure if this would make a difference but while debugging a cache issue I changed the cache location to within the app folder space like so in the SCBaseConfig:

CacheDir = gGetAppPath()+"Cache\\";

It made it more convenient to view the process but also if there's a weird permissions thing going on with default location this might fix it.

Thank you for your suggestion.
Unfortunately, this doesn't solve the problem.
Hi Paul,

I'll need to setup a test environment to check this issue. It may take a few days.... I'll get back to you on this when ready.
Hi Paul,

I ran multiple IW applications which make extensive use of the cache mechanism under Windows 2022 server (built as HTTP.SYS, both as GUI and as a service) and couldn't find any issues.

Can you please test this demo application on your Win 2022 system

https://github.com/Atozed/IntraWeb/tree/...eTimeCache

This demo is already a Http.sys application. In case you need to install it as a Service, please change the DPR file into this:


Code:
begin
  TIWStartHSys.Execute(False);
end.


Also you need to copy files web1.jpg and sample.pdf to the same folder where the EXE will be.

Alternatively, if you have a minimal test application, can you please share it?