gpt4 book ai didi

c# - 在 Raspberry Pi 上使用 Mono 运行 .NET 应用程序。无法连接到 Azure SQL、SSL 加密

转载 作者:行者123 更新时间:2023-11-30 22:06:31 25 4
gpt4 key购买 nike

当我尝试使用 Raspberry Pi 上的 Mono 上的 .NET 应用程序连接到 Windows Azure SQL 数据库时,出现以下错误:

Unhandled Exception:
System.NotImplementedException: SSL encryption for data sent between client
and server is not implemented.

代码:

using (SqlConnection conn = new SqlConnection("Server=tcp:ip,1433;Database=db;User ID=user@IP;Password=PASSWORD;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"))
{
using (SqlCommand command = conn.CreateCommand())
{
conn.Open();
command.CommandText = "INSERT INTO db (temp) values (10)";
command.ExecuteNonQuery();
conn.Close();
}
}

在 Windows 上一切正常。

为什么我在 Raspberry Pi 上收到未处理的异常?

最佳答案

因为 Mono 上尚未实现加密 SqlConnection class 。搜索加密 - 它仍在“MonoTODO”列表中。

但是我想知道为什么你没有收到引发的 NotImplementedException...

关于c# - 在 Raspberry Pi 上使用 Mono 运行 .NET 应用程序。无法连接到 Azure SQL、SSL 加密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23597503/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com