I've dropped a TIdHTTP and a TIdSSLIOHandlerSocketOpenSSL, set the IOHandler of the IdHTTP to the SSL handler, set the mode of the TIdSSLIOHandlerSocketOpenSSL to sllmClient. And then added the button click event below. The first time I get this error from WhichFailedToLoad.
Displayed, the second time I press the button it works. The ssl dll's are in the .exe diretory.
The service works fine from the browser and is in production. Why doesn't it work the first time?
procedure TForm32.Button1Click(Sender: TObject);
var
output : TMemoryStream;
begin
output:=TMemoryStream.Create;
// IdOpenSSLSetLibPath(
try
IdHTTP1.get('https://localhost:444/Folder/service.svc',output);
output.position := 0;
memo1.lines.LoadFromStream(output);
except
on exception do
ShowMessage(WhichFailedToLoad());
end;
end;
tia