Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Rasberry Pi上使用Mono运行.NET应用程序。无法连接到Azure SQL、SSL加密_C#_Sql_Azure_Ssl_Mono - Fatal编程技术网

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

C# 在Rasberry Pi上使用Mono运行.NET应用程序。无法连接到Azure SQL、SSL加密,c#,sql,azure,ssl,mono,C#,Sql,Azure,Ssl,Mono,当我尝试使用Mono的Raspberry Pi上的.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("

当我尝试使用Mono的Raspberry Pi上的.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();
    }
}
在窗户上一切正常


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

因为Mono上还没有实现加密。搜索
加密
-它仍在“MonoTODO”列表中


但是,我想知道为什么您没有得到引发的NotImplementedException…

,因为异常消息声明为SQL连接的SSL加密。除非Mono团队在即将发布的版本中实现它,否则您根本无法使用该功能,需要找到解决方法。在这方面可能有所帮助

“在Windows上一切正常。”

通过简单地调用可执行文件来启动.NET应用程序,可以使用Microsoft.NET CLR而不是Mono来运行它。给定您应该能够在windows上通过以下命令行启动应用程序来重现您的问题:

mono yourapp.exe