08-02-2022, 04:46 AM
(This post was last modified: 08-02-2022, 04:51 AM by Alexandre Machado.)
The exception above shows that the PathInfo is only '/', meaning that the health check request probably hits the root of your application (using the root url only).
I believe you should create a Custom health probe with a specific URL (e.g http://yoursite.com/healthcheck).
See more about it here: https://docs.microsoft.com/en-us/azure/a...e-overview
This health check could be responded by a content handler created such as in this example:
https://github.com/Atozed/IntraWeb/tree/...ntHandlers
In this example, we create a XML in a session-less content handler.
In your case, you just need something like this:
You can also create a health check that explores one of the built-in content handlers that IW server has, e.g. this one:
http://yourserver.com/$/blank
IW server responds to this with a blank page, with http status code 200 which is sufficient to validate the health check. This won't require any special code from you.
Please let me know how it goes
I believe you should create a Custom health probe with a specific URL (e.g http://yoursite.com/healthcheck).
See more about it here: https://docs.microsoft.com/en-us/azure/a...e-overview
This health check could be responded by a content handler created such as in this example:
https://github.com/Atozed/IntraWeb/tree/...ntHandlers
In this example, we create a XML in a session-less content handler.
In your case, you just need something like this:
Code:
function TContentHealthCheck.Execute(aRequest: THttpRequest; aReply: THttpReply; const aPathname: string; aSession: TIWApplication;
aParams: TStrings): boolean;
begin
Result := True;
if Assigned(aReply) then begin
aReply.WriteString('OK'); // You just need to respond anything with a 200 http status code
end;
end;You can also create a health check that explores one of the built-in content handlers that IW server has, e.g. this one:
http://yourserver.com/$/blank
IW server responds to this with a blank page, with http status code 200 which is sufficient to validate the health check. This won't require any special code from you.
Please let me know how it goes

