cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Edge Server SDK Returning Error (1001) Initializing web socket

Highlighted
Visitor

.Net Edge Server SDK Returning Error (1001) Initializing web socket

I am facing an issue when i am trying to implement the .net SDK example

I downloaded the version 5.0.1.103 of the SDK ThingWorx IoT Marketplace    » .NET SDK

Using VS2010 and ,net framwork 4.0 and using Tomcat 7.053 and Thingworx 6.03

I used the following documents :

.NET SDK quick start guide using the Steam Sensor example for ThingWorx

How to setup SSL on Tomcat with a Self-Signed Certificate for ThingWorx

Installing Thingworx Configuring Tomcat

I tried the following uri:

ws://127.0.0.1:8080/Thingworx/WS

wss://127.0.0.1:8443/Thingworx/WS

ws://Localhost:8080/Thingworx/WS

wss://Localhost:8443/Thingworx/WS

I made sure the user has developing rights "Administrator"

All my tries lead to the same error

"Error opening connecting to Platform. There was an error initializing the Socket. (Code 1001) " TwApiException was caught

20 REPLIES 20

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

Hi Mohamed,

Let's take this step by step:

1. make sure you know the address where TW is listening: in my case is https://localhost:8443/Thingworx/Composer/index.html

   In this case the corresponding ems connection string is: wss://127.0.0.1:8443/Thingworx/WS

   This comes without saying, but make sure the TW is indeed running in TLS mode.

2. in your ConnectedThingClient class, after the the line config.Claims=claims add config.AllowSelfSignedCertificates=true;

Try this and let me know!

BR,

Vladi

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

Hi Vladimir

Thanks for your reply

I already did those steps but not working ..!
But the good news are I created new application with SDK from Thingworx downloads not from the market place and V5.5 and V5.1 ware working fine

The SDK is only working with Thingworx 5

I wonder if there is a way to share the connection of Thingworx with Echeleon Smart Server and make it as case study for Street Lighting monitor and control system ?

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

I was trying the .NET SDK as well with ThingWorx 6 trying to get this example to work:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS000208249

I keep getting an error on launch There was an error initializing the Socket. (Code 1001)

Anyone have a working example?

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

Quick question - as Vladimir had initially posted, can you access the platform at https://localhost:8443/Thingworx/Composer/index.html (or at https://localhost:443 based on which port it is on)?

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

Hi aanjan

We've tried both the localhost and a sandbox hosted by ThingWorx.  We were able to connect to our server using the C and Java SDK, but not with the .NET SDK example.

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

Richard, what was the connection string you used?

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

I connected with wss://xxxx.cloud.thingworx.com/Thingworx:443/WS api-key-xxxx 1000 (with our server address and api key instead of xxxes)

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

I know you stated the other SDKs connected fine, but can you try connecting the .NET once again with your firewall turned off?

Re: .Net Edge Server SDK Returning Error (1001) Initializing web socket

I get the same result with the firewall disabled.  Do you have the steamsensor example working in .NET?

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________