问题描述
我有一个非常简单的 .Net Core 应用程序,试图创建并打开与 DB2 数据库(在 AS/400 上)的连接.当我尝试创建 DBConnection 对象时出现此错误,并显示以下消息:
ERROR 58005 SQL0902 没有上下文策略.功能:AESEncryptADONet
.
不幸的是,没有更多细节.
我们遇到了同样的错误,通过在 Windows/Linux 上设置环境变量的Path
解决了它(LD_LIBRARY_PATH
)/MacOS (DYLD_LIBRARY_PATH
).例如:
- 我们的环境:
- ASP.NET Core v3.1
- v11.5.4 中的 IBM .NET Core 3.1/EntityFrameworkCore 3.1
- IIS 8.5
- Windows Server 2012 R2(64 位)
- 在 web.config 中,我们添加
.
<配置><位置... ><system.webServer>...<aspNetCore ... ><环境变量>
- 为应用程序池标识帐户(
IIS AppPool[App_Pool_Name]
)设置文件夹权限(读取和执行、读取和列出文件夹内容)
请点击以下链接了解更多信息.
- 有关 IBM Db2 .NET Core Provider 的常见问题
问:我收到以下错误:
进程中发生意外异常:244 函数:AESEncryptADONET(加密信息)
.NET 驱动程序无法找到兼容的 GSKit.将
Path
(在 Windows 上)或LD_LIBRARY_PATH
(在 Linux 上)设置为///build环境的/clidriver/lib
目录.请记住,这可能会影响其他应用程序. - Db2 .NET 包下载和初始配置
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 message:
There are no more details, unfortunately.
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:
- 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)
- In web.config, we add the
<environmentVariable name="Path" value="C:UsersAdministrator.nugetpackagesibm.data.db2.core3.1.0.200uildTransitiveclidriverin" />
.<?
- 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
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. - Db2 .NET Packages downloading and initial configuration
这篇关于DB2 .Net 连接器错误:AESEncryptADONet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!