When I'm trying to open database connection i get following exception.
当我尝试打开数据库连接时,我得到以下异常。
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 31 - Encryption(ssl/tls) handshake failed)
已成功与服务器建立连接,但在登录前握手期间发生错误。 (提供商:SSL提供商,错误:31 - 加密(ssl / tls)握手失败)
i was written the code in visual studio 2017 in mac.
我在mac的visual studio 2017中编写了代码。
my code:
我的代码:
SqlConnection con = new SqlConnection(@"Data Source=192.168.1.114;Initial Catalog=DivaLearn;Integrated Security=False;User ID=sa;Password=sqlserver;Connect Timeout=15;");
con.Open();
how can i get the data from table? Thanks in advance.
我如何从表中获取数据?提前致谢。
1 个解决方案
#1
0
This is because of a bug in .NET Core. Upgrade to 2.0.7 and it will all work again on Mac OSX Sierra. See https://github.com/dotnet/corefx/issues/22453
这是因为.NET Core中存在错误。升级到2.0.7,它将在Mac OSX Sierra上再次运行。请参阅https://github.com/dotnet/corefx/issues/22453
#1
0
This is because of a bug in .NET Core. Upgrade to 2.0.7 and it will all work again on Mac OSX Sierra. See https://github.com/dotnet/corefx/issues/22453
这是因为.NET Core中存在错误。升级到2.0.7,它将在Mac OSX Sierra上再次运行。请参阅https://github.com/dotnet/corefx/issues/22453