firebird - 使用 FirebirdSql.Data.FirebirdClient (7.5.0) 和 Dapper 连接 ASP.NET Core 3.1 与 Interbase XE7

标签 firebird dapper asp.net-core-3.1 interbase

我正在尝试将 ASP.NET Core 3.1 与 Interbase XE7 数据库连接。对于与 Interbase 数据库的连接,我使用 FirebirdSql.Data.FirebirdClient (v7.5.0) Nuget 包和 Dapper。

数据库连接字符串是:

"DefaultConnectionString": "Server=localhost;Database=127.0.0.1:\\<db_name>;Uid=SYSDBA;Pwd=masterkey"

简洁的连接代码:

using (var connection = new FbConnection(_config.GetConnectionString("DefaultConnectionString")))
{
    if (connection.State == ConnectionState.Closed)
    {
        connection.Open();
    }
}

运行此代码会导致异常:

exception

在互联网上查找可能的解决方案建议更改 firebird.conf 文件

WireCrypt  
AuthServer 
AuthClient

属性,但我没有在我的系统上安装 Firebird。

我的方向正确还是遗漏了什么?

最佳答案

连接被远程接口(interface)拒绝意味着客户端和服务器在尝试连接时无法就协议(protocol)版本达成一致。尽管 Firebird 和 Interbase 有着共同的历史,但它们在过去 20 年中却存在很大分歧。 FirebirdSql.Data.FirebirdClient ADO.net 提供程序不支持 Interbase1。它仅支持 Firebird 。所以你不能用它来连接Interbase XE7。

您将需要使用支持 Interbase 的驱动程序,或切换到 Firebird。


1: DNET-245 中的评论和 DNET-314表示不支持Interbase

关于firebird - 使用 FirebirdSql.Data.FirebirdClient (7.5.0) 和 Dapper 连接 ASP.NET Core 3.1 与 Interbase XE7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61137662/

相关文章:

delphi - 带有欧元符号的 UTF8、IBX 和 Firebird

unicode - 在数据库表中存储货币符号

dapper - 扩展 MultiMap 支持的类型数量

c# - 使用 ILoggerProvider 进行单元测试

ubuntu - 无法连接到 Firebird

doctrine-orm - 有没有办法在 Zend Framework 2 中将 Firebird/Ibase 与 Doctrine 一起使用?

c# - 使用 Dapper 将字符串映射到 guid

c# - 使用 Moq 时在 Dapper 方法上获取 NotSupportedException

c# - 在 EF Core 3.1 中加入群组

reactjs - 如何在 ASP.NET Core 3 React 应用程序的 index.html 中从服务器注入(inject)数据