admin管理员组

文章数量:1335405

I am trying out Denodo -Access Through an ADO.NET Data Provider, but when I try with example provided I am getting below Exception :

Npgsql.NpgsqlException
HResult=0x80004005
Message=Failed to establish a connection to 'denodo-host'.
Source=Npgsql
StackTrace:
  at Npgsql.NpgsqlClosedState.Open(NpgsqlConnector context, Int32 timeout)
  at Npgsql.NpgsqlConnector.Open()
  at Npgsql.NpgsqlConnectorPool.GetPooledConnector(NpgsqlConnection Connection)
  at Npgsql.NpgsqlConnectorPool.RequestPooledConnectorInternal(NpgsqlConnection Connection)
  at Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection)
  at Npgsql.NpgsqlConnection.Open()
  at Denodo.ADONetSample.Main(String[] args) in C:\Users\Hero\vdp-clients- 
  ADO.NET\Program.cs:line 67

  Inner Exception 1:
    AuthenticationException: A call to SSPI failed, see inner exception.

  Inner Exception 2:
    Win32Exception: The client and server cannot communicate, because they do not possess a 
    common algorithm

As my TargetFrameworkVersion is v4.8 I am using below code to specify SecurityProtocol

            string connectionString = "Server=" + host + ";Port=" + port +";User Id=" + user + ";Password=" + password + ";Database=" + db + ";SSL=True;Sslmode=Allow;";
            NpgsqlConnectionStringBuilder b = new NpgsqlConnectionStringBuilder(connectionString)
            {
                SSL = true,
                SslMode = SslMode.Allow
            };

            using (NpgsqlConnection connection = new NpgsqlConnection(b))
            {
                ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
                connection.UseSslStream = true;
                connection.Open();
                // NpgsqlCommand code....
            }

But still I am getting same error.

Is this issue relegated to SecurityProtocol only ? Then How can I know the Server version ?

本文标签: