04-01-2024 9:08 PM
Reproduction steps
1)Created new Web API project in Visual studio 2022 and using Target Framework .NET 8.0, Platform target is Any CPU
2)Added package through NuGet is SAPHanaForNetCore 3.1.0 package
3)deploying the project on Azure app service and OS is Linux and getting below error 2024-04-01T14:35:07.4105784Z ---> System.DllNotFoundException: Unable to load shared library '/home/site/wwwroot/libadonetHDB.dll' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: /home/site/wwwroot/libadonetHDB.dll: invalid ELF header at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath)
Description
Unable to load shared library '/home/site/wwwroot/libadonetHDB.dll' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: I am using Visual Studio 2022 and Architecture is "Any CPU" I have downloaded the SAPHanaForNetCore 3.1.0 package through nuget
04-01-2024 9:27 PM
See if this helps you:
https://developers.sap.com/tutorials/hana-clients-dot-net-core.html
04-02-2024 10:24 PM
Hi Team,
I have gone through link but I didn't found the file libadonetHDB.so , could you please provide me the file?
04-06-2024 9:08 PM
The direct download link is https://tools.hana.ondemand.com/additional/hanaclient-dotnetcore-2.19.21-linux-x64.tar.gz. You can reach this link from https://tools.hana.ondemand.com/#hanatools.
Hope that helps,
Dan
04-08-2024 6:04 AM
Thank You @dan
I will try to add this libadonetHDB.so file on Linux App Service and will check if the code is working or not for .NET core application.
a week ago
a week ago
You can download the HANA Client from https://tools.hana.ondemand.com/#hanatools
Specifically the .NET driver for Linux can be found at
https://tools.hana.ondemand.com/additional/hanaclient-dotnetcore-latest-linux-x64.tar.gz
a week ago
I downloaded the Linux.tar.gz, but I can't find the file inside.
a week ago
This is what I see after downloading from https://tools.hana.ondemand.com/additional/hanaclient-dotnetcore-latest-linux-x64.tar.gz
a week ago
Thank you for the link, I haven't found it on the site tools.hana.ondemand.com.
I have copied the file to my output directory, but the Entity Frameworks stucks, when i open the connection. Last message ist "Creating DbConnection".
a week ago
Thursday
Have you tried using the .NET SDK and the steps described at https://developers.sap.com/tutorials/hana-clients-dot-net-core.html ? Note that the steps are slightly different depending on the platform you are on Windows vs Linux as is the download link from https://tools.hana.ondemand.com/#hanatools as you will need the appropriate client for Windows, macOS, or Linux.
Friday
Yes I tried the steps. But after hdbclient installation there is no libadonetHDB.so file in the installation dir. And I'am not sure if I need the file. I use .Net 7 with Entity Framework. So in my project i reference Sap.EntityFrameworkCore.Hana.v7.0.dll and Sap.Data.Hana.Net.v6.0.dll. The Sap.Data.Hana.Net.v6.0.dll reference lidadonetHDB.dll and not libadonetHDB.so. Under windows this constellation works, but under linux i get the error "/app/libadonetHDB.dll: invalid ELF header".
Friday
If you are using an installation of the SAP HANA Client on Linux, make sure you are using the very latest version which is 2.20.22 released May 15th.
There was a known issue as described at
https://me.sap.com/notes/3427733
Client Installer changes
Friday - last edited Friday
I can't find the version 2.20.22 on https://tools.hana.ondemand.com/#hanatools
Friday
You can find 2.20.22 at the SAP Software Downloads site. This is further described in step 3 of https://developers.sap.com/tutorials/hana-clients-install.html#712a293b-6097-481d-b073-2425513695c0
Friday