SSL Socket in .Net CF 3.5 C# RRS feed

  • Question

  • Hello,

    Referring to below link I am trying to establish SSL Socket but on connect I am getting error as

    Error :

    An existing connection was forcibly closed by the remote host

                    var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
                    IPAddress ipAddress = Dns.Resolve("").AddressList[0];
                    IPEndPoint ipLocalEndPoint = new IPEndPoint(ipAddress, 8883);
                    SocketAddress socketAddress = ipLocalEndPoint.Serialize();
                    IPEndPoint endpoint = new IPEndPoint(ipAddress, 8883);
                    EndPoint ep = (EndPoint)endpoint.Create(socketAddress);
                    using (var sslHelper = new SslHelper(socket, ""))
                        System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
                catch (Exception ex) { string errormsg = ex.ToString(); }

    Wednesday, August 1, 2018 6:13 AM

All replies

  • Which version of CE? (WEC7 I assume because you refer to CF 3.5)

    What update level in your kernel?

    You need the latest updates to support TLS 1.2. Does the remote server accept TLS 1.1 connections?

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog:

    Microsoft Embedded Partner
    NXP Proven Partner
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here:

    Wednesday, August 1, 2018 10:49 AM