c# - 从 Raspberry Pi 连接到 SQL Server 导致错误 35(在登录前握手期间)
问题描述
我想问一下我能够很好地连接到SQL Server
from的原因可能是什么Windows
,但是当我尝试使用相同的连接字符串和server being pingable
from连接到同一台服务器时,Raspbian @ Raspberry Pi
会发生此错误:
与服务器成功建立连接,但在登录前握手期间发生错误。(提供者:TCP 提供者,错误:35 - 捕获到内部异常)
ex.InnerException {System.Security.Authentication.AuthenticationException:身份验证失败,请参阅内部异常。---> Interop+OpenSsl+SslException:SSL 握手失败,出现 OpenSSL 错误 - SSL_ERROR_SSL。---> Interop+Crypto+OpenSslCryptographicException: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol --- 内部异常堆栈跟踪结束 --- 在 Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, Byte[] recvBuf, Int32 recvOffset , Int32 recvCount, Byte[]& sendBuf, Int32& sendCount) at System.Net.Security.SslStreamPal.HandshakeInternal(SafeFreeCredentials credential, SafeDeleteContext& context, ArraySegment`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)
我在用着System.Data.SqlClient
try
{
using (var connection = new SqlConnection(connStr))
{
connection.Open();
}
}
catch (Exception ex)
{
...
}
.NET 核心 3.1
我该如何解决?提前致谢
解决方案
您可能需要更新 OpenSSL 版本。
sudo apt-get update
sudo apt-get install openssl
推荐阅读
- azure - 在 Azure Web APP 中安装 Net Core 2.1 站点时 HTTPS 导致缺少视图
- python - 使用 Pandas 处理 Excel,无需更改格式和执行操作
- c++ - 对专用模板成员的未定义引用
- docker - 如何在微服务架构中设置 logstash.conf?
- r - 在rstudio中编织pdf时如何保留数字的科学格式?
- c++ - 如何找到在本地范围内声明的变量的地址?
- docker - 官方 Docker 镜像说 docker 没有运行?
- leaflet - 如何填充瓷砖传单的颜色?
- reactjs - 酶测试代码内存清理
- javascript - 在这个 ES6 示例中,“静态”是什么意思?