Jump to content
MichaelPrice

Rest Server

Recommended Posts

I am programming a rest sever in Delphi 11 It has the standard Indy 10.6.2.0 installed.  Ssleay32.dll and libeay32.dll are in the same directory as the exe. When run on development machine all starts ok.

Copy exe and the dll’s to a directory on my windows 2022 server and it gives  ‘could not load ssl library’ I have set in code IdOpenSSLSetLibPath('c:\TestDLL') which I believe should not be necessary if the dlls are in the same directory still the same error. I have installed Indy directly on the server same error.

The rest server used to run ok on Microsoft server 2012 is there settings I am missing on new server?

Share this post


Link to post

You can try WhichFailedToLoad from IdSSLOpenSSLHeaders to see which dll failed. Maybe a dependency on the dll. From where did you downloaded the open SSL dlls?

  • Like 1

Share this post


Link to post

Hi Lajos

Thanks for coming back so fast. not sure how to use WhichFailedToLoad  but will look it up and come back. I used the dll's that came with Delphi, I also downloaded others from the internet. The strange thing is that it works perfectly on my development machine windows 11 and I have tried the exact same Dll's on the server. By the way the SSL is definitely working correctly on the server. Other sites on the same secured and working so the certificates are valid.

Share this post


Link to post
1 hour ago, MichaelPrice said:

ot sure how to use WhichFailedToLoad 

The easiest way to use it:

ShowMessage(WhichFailedToLoad()); 

 

I am not sure that those dlls are shipped with Delphi. There are some old threads about this error like 

 

 

  • Like 1

Share this post


Link to post

Thanks everyone for coming back I was driving home it is !7:00 in the UK!

 

Will try both suggestions and get back. Wife is said she will keep doing the ironing so I have 1 hour!  

Share this post


Link to post

Thought the admin access may be it unfortunately not. Logged in as administrator can copy and paste to directory no query from system ran the exe as normal then "run as administrator" but no luck

Share this post


Link to post

I have run through all the replies unfortunately still not working. So made a very simple app, runs on test machine (windows 11), move to Microsoft server 2022 cannot find ssl, move to one of my old servers Microsoft 2012 R2 runs. So it has to be the server that indy does not like. Obvious answer run on the 2012 server but it is be decommissioned so unfortunately not an option.

So is there a compatibility problem with Indy and Windows server 2022?  

Share this post


Link to post

Pre-compiled DLLs for Indy are available on https://github.com/IndySockets/OpenSSL-Binaries

They are not shipped with Delphi.

Make sure you download and install the correct version - there are 32 and 64 bit versions of the DLLs. Which one to choose depends on your application.

Installing the Indy source files on the server is not required.

 

"Just put the DLLs in your app's installation folder."

Share this post


Link to post

If what you describe happened to me, I would start by running Process Explorer on the system where it works, highlight the EXE and press control-D.  One or more of the DLLs listed in the lower pane will be missing from the system where it fails.  Tedious to check them all, but you may spot something obvious.

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

×