Issue related to SSL DLL - delphi

Using:
Delphi Berlin update 2
Indy version 10.6.2.5341
Websocket (sgcWebSocketClient, 4.1.7.0 )
We have an application that works in some machines and doesn't in others. The environment is the same, windows 10 recently installed without any other program. Hardware is the same because we have a lot of equal hardwares here.
Well, when we try to connect in a security way, using SSL we get "could not load SSL library". We don´t have OpenSSL installed in any machines (even the machines that works fine)
We have tried the support with the ESEGECE... but didn´t solve until now.
We tried to register the DLLs using regsvr32 but we get some errors and couldn´t register. These are the messages that we get:
The module "libeay32.dll" was loaded but the entry-point DllRegisterServer was not found. Make sure that "libeay32.dll" is a valid DLL or OCX file and then try again.
Or we get:
The module "C:\Central\libeay32.dll" failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files. The specified module could not be found
The DLL files are the right one because we copy from ESEGECE examples.
We used WhichFailedToLoad() to figure out what is happening, but we get "Failed to load libeay32.dll" message.
We also tried to use SafeLoadLibrary() pointing to the place where DLL is located.
We did a test with IdOpenSSLSetLibPath() also but not successful.
GetLastError() returns 0.
We found similar questions about this here, tried the solutions as you can see above, but without success.
Do you have any other suggestion?

You cannot use regsvr32 to register the OpenSSL DLLs because they are not ActiveX/COM servers.
Assuming you have both ssleay32.dll and libeay32.dll together, the most likely reason for libeay32.dll to fail to load is because either:
you are using a 3rd party distribution of libeay32.dll or ssleay32.dll that have external dependancies on other DLLs, such as the Visual C++ runtime, which you do not have installed. Use a tool like Dependency Walker to verify.
Try using the OpenSSL DLLs that are available on Indy's Fulgan mirror, as they do not have any external dependencies (except to each other):
https://indy.fulgan.com/SSL/
your app is 64bit but you are using 32bit versions of libeay32.dll or ssleay32.dll, or vice versa.

Related

PortSip SDK C#: DllNotFoundException in Docker container while locally\EC2 works well

I have a .NET core application that uses the library of PortSip. So far everything worked fine both locally in my Windows 10 laptop and in an EC2 AWS instance with Windows Server 2019 installed, and now I would like to make this work in a Docker container.
So I used a Dockerfile similar to what's mentioned it this link https://schwabencode.com/blog/2018/08/30/ASP-NET-Core-with-NET-Framework-on-Docker to have a Windows Server Core image with both .NET framework (what PortSip needs) and .NET core (what my app needs) as well as added commands to install C++ Redistributable.
The result is that I'm getting the following error when trying to run my app:
Unhandled exception. System.DllNotFoundException: Unable to load DLL 'portsip_sdk.dll' or one of its dependencies: The specified module could not be
found. (0x8007007E)
The DLLs are there! In addition, when I change them to PortSip's 32-bit DLLs, the error changes to "An attempt was made to load a program with an incorrect format". That means the existence of the DLL is felt, but still, for some reason, cannot be loaded.
Also worth mentioning that with the exact same installations (the .NETs and the C++ redistributable) in a blank EC2 as mentioned above the app works.
What am I missing?
Thanks in adavance
Solved by copying two DLLs, C:\Windows\System32\edputil.dll and C:\Windows\System32\msdmo.dll from my local machine to that docker image.

Can't access to .accdb database when deployed. VB.net / MVC app

this is my first post I am having some trouble with an app, in Visual Studio I can run it on Debug without any issue and everything works correctly, but when I deploy it using IIS I can access any page except of the ones where there is an interaction with an access database. If I search through virtual directory I can download the file without an issue.
Do you have any recommendation?
Are you running x32 or x64 iis? (Usually it x64).
Of course on your desktop, then Visual Studio defaults to x32, and that would explain why the Access database engine (ACE) works. You likely should force your project to x32 or x64 (and then ensure that you have a x64 bit version of the ACE (Access) istalled on your developer machie. You then want to ensure that you launching the x64 bit version of IIS.
You don’t need Access installed on your server, but you will need the ACE database engine – and the most easy way to ensure that data engine is installed is simply installing the Access runtime on that server.
Give that the standard ACE database engine download is x32, then I would look into this issue. You could (should) be able to resolve the issue by installing a x64 bit Access runtime on that server – this would also suggest a possible update to your connection strings. And I would check/test the connection string you are using once you resolve the x64 bit version of Access. The path name in your connection string will ALWAYS be a absolute path (not a relative one).

Reinstalling Windows without re-registering Delphi

I'll be reinstalling Windows and I wondered if there's a way to backup/restore Delphi license info so I don't "lose" one of my installations for that.
In other words - is there a way to uninstall Delphi, reinstall Windows, reinstall Delphi without that being treated as a "new" installation?
[I want to completely wipe out my computer and start out from scratch. I'll be reinstalling XE5, XE7, and 10 Seattle.]
The .slip files used for registration info are in C:\ProgramData, in either the CodeGear or Embarcadero folders depending on which version of the IDE you're using.
I've successfully copied the files from these folders to a thumb drive and moved them to a new computer. Note that part of the registration information is the local computer name, so in order to work on a different machine (or a clean Windows install on the same machine) the computer name needs to stay the same. Just name the computer the same, copy the .slip files to the same location on the new machine, and then install Delphi/RAD Studio.
To be on the safe side, I always copy the entire folder (including all subfolders and their contents) to make sure I've gotten everything the IDE needs.
I had a similar problem when renaming my Windows 10 computer. Apparently the license is bound to the computer name. I had to re-register Delphi after renaming my computer but failed because of the limit of my license key.
Solution was renaming back my computer and renaming C:\ProgramData\Embarcadero\.cgb_license.corrupted and C:\ProgramData\Embarcadero\.licenses\.cg_license.corrupted to files without the .corrupted as suffix. My licence slip file was C:\ProgramData\Embarcadero\.2016_2.#############.slip.

Wireshark Disscetor Error on Windows Platform

I am trying to build a dissector for Wireshark on Windows platform. But, I am getting an error.
I followed this link to install Wireshark from the source on windows, and I was able to build and run the software successfully.
Then using the README.plugins, I added a plugin, and did all the changes, mentioned in the file.
With the plugin, it built successfully, but whenever I tried running it, a dialog box appears stating The plugin 'ABC.dll' has neither a register routine, a register_tap_listener or a register_wtap_module or a register_codec_module routine.. Though wireshark is running fine, but my plugin is not included in it.
Linux Environment: I tried compiling and running on linux platform, and it worked fine, with the plugin included.Can anybody tell me, where I might be going wrong on the windows platform. Thanks.
There's a bit of magic which happens when building plugins on Windows so that certain symbols in the DLL are declared as exported so they can be found in the DLL at run-time. (I haven't recently dug into all the details, but the mechanism is different on *nix and so the results on each platform might be different).
What version of Wireshark are you building ? (How are you getting the Wireshark sources ?).
The specific error message you re getting suggests you might be building a version of WWireshark 1.10. (The message has changed in the Wireshark development version (1.11)).
In any case, something is not quite right (obviously) as to how the DLL is being built on Windows.
My suggestion as a starting point:
You might be able get an idea as to what's wrong by
comparing the plugin.c file (which is generated at build time) in your plugin directory on Windows with a plugin.c from one of the other Wireshark Windows plugin directories.
The magic occurs in that file.
Things like:
WS_DLL_PUBLIC_NOEXTERN void
plugin_reg_handoff(void)
{
{extern void proto_reg_handoff_unistim (void); proto_reg_handoff_unistim ();}
}

error on run execute file : dbrtl70.bpl missing

I made an application with ADO Component and connect to Oracle with it, I don't have any problem when I run it in another machine.
But, when I use ODAC component and TOraSession and connect with it via Direct Connect and run it in another machine I faced to this error:
The Program Can't Start Because dbrtl70.bpl is missing from your Computer. Try to re installing the Program to fix it
As I investigate, dbrtl70.bpl is Delphi package file in System32 folder.
I want to know how can I solve this problem.
I'm going to take a wild guess and suggest that you have a 64 bit machine. You've copied the .bpl files into the 64 bit system folder (System32) where your 32 bit Delphi 7 program cannot see them. Put them in the 32 bit system folder (SysWOW64) instead and all should be well.
To learn more about the issue, read up on the File System Redirector.
If you don't want runtime packages, and all your dependencies support being built without using runtime packages, then simply uncheck the use runtime packages option.
My app was asking for a .bpl package when run on other machines.
Cancelling 'link with runtime packages' didn't solve it until I deleted the runtime packages listed in 'runtime packages'. Then it was OK.

Resources