Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: Evaluating Power TCP
jonst

From: test, United Kingdom
Posts: 7
Member Since: 01/13/05
posted January 13, 2005 3:08 PM

Good day I am evaluating power tcp with a view to purchase should it meet my needs.

I am receiving a handshake error when using the component, I cant seem to find any logging options is it possible to log everything that is occuring so I can troubleshoot ?
jonst

From: test, United Kingdom
Posts: 7
Member Since: 01/13/05
posted January 13, 2005 3:10 PM

My code looks like this

Private Sub SecureTest()

 ' Create a new SSLStream by passing a TcpStream into the constructor.
    Dim secureStream As New SslStream(New TcpStream(Tcp1))

    ' "Disable" certificate authentication (accept any certificate the server sends)
    secureStream.UseAuthentication = False

    ' Set Tcp.Stream property
    Tcp1.Stream = New SegmentedStream(secureStream)
    Tcp1.SecureProtocol = SecureProtocol.Auto

    'Setup the cert store and select the cert to use
    ' Create a new CertificateStore to access the "MY" certificate store
    Dim store As New CertificateStore(CertificateStoreLocation.LocalMachine, CertificateStoreName.My)
    ' Get the requested certificate
    Dim cert As Certificate = store(0)
    Tcp1.Certificate = cert


    ' Connect to a secure server.
    Tcp1.Connect("65.199.34.156", 3121)


    ' Send secure data
    Tcp1.Send(Me.tbSend.Text)

    ' Keep receiving until the connection is closed
    Dim s As String = ""
    Do While (Tcp1.Connected)
      Dim seg As Segment = Tcp1.Receive()
      s += seg.ToString()
    Loop


    Me.tbrecieve.Text = s.ToString

    ' Close the connection
    Tcp1.Close()

end sub
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted January 13, 2005 3:13 PM

Please take a look at the sample TCP client and see if that works. The code you posted is from the Help and was supposed to be removed. Some time ago, we made things easier so you don't have to declare a stream. Now you just set the SecureProtocol property.

If the sample client can't connect, please supply the address of the machine so that I can try it here.

jonst

From: test, United Kingdom
Posts: 7
Member Since: 01/13/05
posted January 13, 2005 5:53 PM

Sample client gives the same response.

Handshake failure

[InvalidOperationException: HandShake Error]
  Dart.PowerTCP.SslSockets.SslStream.a(Byte[] A_0, UInt32 A_1) +1407
  Dart.PowerTCP.SslSockets.SslStream.a(Byte[] A_0, Int32 A_1) +122
  Dart.PowerTCP.SslSockets.SslStream.g() +9
  Dart.PowerTCP.SslSockets.SslStream.VerifySecured() +101

[InvalidOperationException: Connection terminated by server during SSL handshake.]
  a5.Invoke(Delegate CurrentDelegate, Object[] args) +260
  Dart.PowerTCP.SslSockets.Tcp.Connect(String server, Int32 serverPort, String client, Int32 clientPortMin, Int32 clientPortMax) +189
  Dart.PowerTCP.SslSockets.Tcp.Connect(String server, Int32 serverPort) +14
  test.connect.SecureTest() in d:\inetpub\wwwroot\test\connect.aspx.vb:52
  test.connect.Go_Click(Object sender, EventArgs e) in d:\inetpub\wwwroot\test\connect.aspx.vb:76
  System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
  System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
  System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
  System.Web.UI.Page.ProcessRequestMain() +1292


Server address is 65.199.34.156 3121

You are going to need my test cert to try this though I would guess

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted January 14, 2005 9:21 AM

I was able to get further than you using our latest internal build so I don't think I need your certificate.

Please email support@dart.com and request the latest build of the SslSockets dll. As soon as you get linked into the system and the internal build is stable, I can send you a new DLL.

Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX