DB2 .Net Connector error : AESEncryptADONet

后端 未结 1 748
傲寒
傲寒 2021-01-27 20:33

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

相关标签:
1条回答
  • 2021-01-27 21:21

    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:

    1. Our environment:
      • ASP.NET Core v3.1
      • IBM .NET Core 3.1 / EntityFrameworkCore 3.1 in v11.5.4
      • IIS 8.5
      • Windows Server 2012 R2 (64 bits)
    2. In web.config, we add the <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>
      
    3. Set folder permissions (Read & Execute, Read, and List Folder Contents) for Application Pool Identity Accounts (IIS AppPool\[App_Pool_Name])

    Please click the links below for more information.

    • Frequently asked questions about IBM Db2 .NET Core Provider

      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) or LD_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.

    • Db2 .NET Packages downloading and initial configuration
    0 讨论(0)
提交回复
热议问题