Question Regarding SSLstream and Certificate Error

Discussion in 'Visual Basic .NET' started by mixing, Mar 16, 2016.

  1. mixing

    mixing Regular Member

    Jan 18, 2014
    Likes Received:
    Hopefully someone can explain this to me a little further..

    I'm trying to establish a TCP connection using SSLstream, but constantly receive a certificate error:
    Authentication failed because the remote party has closed the transport stream

    I know the server uses SSL, but I've never really done anything with certificates before. Here is the code I'm using
    Dim DRShost As String = ""
    Dim client As TcpClient
    Dim sslStream As Security.SslStream
    Private Sub Thread1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles Thread1.DoWork
    Dim client As New TcpClient(DRShost, 700)
    Dim sslStream As New Security.SslStream(client.GetStream(), True)
    Dim greeting As String = GetResponse(sslStream, System.Text.Encoding.UTF8)
    Catch ex As Exception
    End Try
    End Sub
    I've spoken with support at the company whom I'm trying to connect with, and they've told me the following..
    I'm a little confused by their response. I'm not sure how to run the command they are asking for, and I don't have any of the files they are talking about.. Are they saying that I need to be passing these certificates in order to connect with a simple Greeting message like I'm doing above? I'm not that experienced, but I've never heard of that being done before (or seen any examples of it).. Is there any way to ignore or bypass that? Otherwise, could it be that my code is trying to connect using TLS instead of SSL?

    Any help or input would be appreciated!