【问题标题】:.Net Core 3.1 - Stuck on connection.open() in the Linux while connecting Sql Server.Net Core 3.1 - 在连接 Sql Server 时卡在 Linux 中的 connection.open()
【发布时间】:2020-06-17 08:05:32
【问题描述】:

.Net Core 3.1 卡在 Linux 机器和 Docker 上的 connection.open() 方法调用上,它有时工作有时卡住。不知道真正的问题在哪里。

我正在使用 Microsoft.Data.SqlClient 库进行连接,我尝试过 System.Data.SqlClient 也遇到了同样的问题。

甚至试图将 .Net 核心版本从 3.1 降级到 2.2 和 2.1

已尝试使用 SQL Server 2008 R2 SP320122017

在 Windows 机器上运行良好。

提前致谢。

【问题讨论】:

  • 哪个 SQL Server 版本?
  • Sql Server 2008 R2 SP3
  • 我不想这么说,但是:对 2008 R2 的扩展支持在 6 个多月前就结束了(名称“2008”中有一个线索)。如果由于协议问题而无法正常工作:我看不到有人跳起来修复它。这只是一个防火墙问题吗?
  • 它也不能在 Sql Server 2012 上运行

标签: c# sql-server linux asp.net-core .net-core


【解决方案1】:

通过将连接超时从 0 更改为 30 解决了我的问题。

Connection Timeout 0 让它卡住了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-07
    • 1970-01-01
    • 1970-01-01
    • 2021-07-15
    • 2020-10-01
    • 1970-01-01
    • 1970-01-01
    • 2022-02-19
    相关资源
    最近更新 更多