I have a very simple .Net Core app trying to create and open a connection to a DB2 database (on AS/400). I have this error when I try to create the DBConnection object, with the
We meet the same error and solved it by setting Path
of environment variables on Windows / Linux (LD_LIBRARY_PATH
) / MacOS (DYLD_LIBRARY_PATH
).
For example:
<environmentVariable name="Path" value="C:\Users\Administrator\.nuget\packages\ibm.data.db2.core\3.1.0.200\buildTransitive\clidriver\bin" />
.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location ... >
<system.webServer>
...
<aspNetCore ... >
<environmentVariables>
<environmentVariable name="Path" value="C:\Users\Administrator\.nuget\packages\ibm.data.db2.core\3.1.0.200\buildTransitive\clidriver\bin" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
IIS AppPool\[App_Pool_Name]
)Please click the links below for more information.
Q: I am getting the following error:
An unexpected exception has occurred in Process: 244 Function: AESEncryptADONET (Encryption Info)
The .NET driver is unable to find the compatible GSKit. Set the
Path
(on Windows) orLD_LIBRARY_PATH
(on Linux) to the<Package_Install_location>/<package-name>/<version>/build/clidriver/lib
directory of your environment. Remember, this may affect other applications.