Article - CS286924

Error "com.thingworx.communications.client.TwApiWrapper Error: 0 : [Error] Error intializing socket connection. Err = -1" when connecting dotNet SDK to ThingWorx with SSL enabled

Modified: 29-Sep-2025   


Applies To

  • ThingWorx Edge SDK 5.7 to 7.0.1
  • dotNet SDK

Description

  • SSL errors received when connecting to ThingWorx with self signed certificate with config.DisableCertValidation = true and config.AllowSelfSignedCertificates = true already configured
    com.thingworx.communications.client.TwApiWrapper Error: 0 : [Error] Error intializing socket connection.  Err = -1

 

  • Unable to connect .NET SDK (dotNet SDK) to ThingWorx using self signed certificate
  • The ADO service connection is not working when trying to convert over to HTTPS with error:
    [L: Error] [T: 7] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] [Error] Error intializing socket connection.  Err = -1
    [L: Error] [T: 7] [U: SYSTEM] [O: com.thingworx.communications.client.TwApiWrapper] [Error] twWs_Connect: Error restarting socket.  Error 0

 

This is a printer-friendly version of Article 286924 and may be out of date. For the latest version click CS286924