I am facing an issue when i am trying to implement the .net SDK example
I downloaded the version 22.214.171.124 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 :
I tried the following uri:
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
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!
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 ?
I was trying the .NET SDK as well with ThingWorx 6 trying to get this example to work:
I keep getting an error on launch There was an error initializing the Socket. (Code 1001)
Anyone have a working example?
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)?
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.
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)
I know you stated the other SDKs connected fine, but can you try connecting the .NET once again with your firewall turned off?
I get the same result with the firewall disabled. Do you have the steamsensor example working in .NET?
Here is my basic version of the SteamSensor. I've added "config.DisableCertValidation = true;" and I'm using the 4.0 framework as the default framework. You would need to go to the Properties->Debug menu to edit your connection string.
SDK Version ThingWorx-DotNet-SDK-5-5 (1 MB) OR ThingWorx-DotNet-SDK-5-0-1-103 (369 kb) downloaded from https://support.ptc.com/ not from Thingworx market working fine with only Thingworx Platform 5 and not working with Thingworx 6
The SDK from the marketplace.thingworx.com giving the 1001 Error
Note: Those SDKs will try communicate with Thingwx 6 with no errors but the platform will not sense the connection on the unbound tab
I will try to upload the the example
I was able to get the latest .Net SDK (downloaded from the Market Place) to work by using the thingworx-dotnet-common.dll that came with the .Net SDK-5 that I downloaded from the download center (ThingWorx-DotNet-SDK-5-0-1-103 (369 kb) ). I had to change a few of the method calls due to those methods are deprecated with the latest dll. I also changed the .Net Target Framework from 3.5 to 4.5.1.
Mohamed, DotNet-SDK-5-5 is the latest version of the SDK. Assuming you are testing the Steam Sensor example, do you already have SteamSensor1 and StreamSensor2 Things created? If so, when you run the SDK, it would automatically bind to those 2 Things, and you won't see them appear on the unbound tab.
Please do check the state of the 'isConnected' property under the Properties tab for either SteamSensor1 or 2 when the SDK is running.
I know what u r talking about. I wasnt created the things yet
I was sure that thingworx 6 not working with SDK 5.5
Sorry, I have read through all the comments and still cannot tell if the .NET SDK 5.5 works with the Thingworx 6.0 platform? I was trying out the SteamSensor example, but keep getting the socket initialization error (code 1001)..
The .Net SDK that I downloaded from the MarketPlace, version 5.5 I believe, from http://marketplace.thingworx.com/downloads/net-sdk/ will run the Steam Sensor example if I do not use the thingworx-dotnet-common.dll that was provided in the zip folder.
I also downloaded a .Net SDK, version 126.96.36.199 I believe, from https://support.ptc.com/appserver/auth/it/esd/sonproduct.jsp?son=2800716. If I use the thingworx-dotnet-common.dll from this download with the 5.5 .Net SDK, the Steam Sensor example works nicely. I believe the .Net SDK version from support.ptc.com is 188.8.131.52 as the file name is “ThingWorx-DotNet-SDK-5-0-1-103.zip”.
The attached dll will run the Steam Sensor example using the .Net SDK 5.5 and Thingworx 6.0 plateform.
If you were to compare the size of the two .dll’s from the two downloads, you will notice that the size of the attached dll is smaller than the dll downloaded with the 5.5 .Net SDK (approx. 357Kb verses 383 Kb).
Perhaps this problem has something to do with my version of .Net, Apache, or Java JRE? I started the virtual training today and the training direct users to install newer versions of the Java JRE and Apache compared to the versions I was instructed to download from the training information I was previously working from. Once I update all my software I will try the original thingworx-dotnet-common.dll (from the 5.5 .Net SDK) in my .Net environment and see if it will run the Steam Sensor example.
I will let you know what I find.
I hope this makes sense and thanks for looking into this.
Hypertherm Automation Team
5 Technology Drive, Suite 300
West Lebanon, NH 03784
Thank you Paul. I am also trying to use the SDK for our purposes, but having a hard time getting it to run.
Thanks for your response.