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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Unable to connect with .NET SDK to Thingworx

loredan
4-Participant

Unable to connect with .NET SDK to Thingworx

Hi there,

 

I have searched similar issues and I can´t resolve my issue.

 

I have a trial account of ThingWorx and I want to test .NET sample but I can´t connect to ThingWorx.

First I created SteamSensor1, SteamSensor2 and SteamSensorAppKey in the composer.

My apiUri is: https://pp-1806041235nn.devportal.ptc.io/Thingworx

Is it okay?

 

I haven´t changed the code provided in the sample. I try the sample in debug mode with Visual Studio 2017.

These are my errors:

com.thingworx.communications.client.TwApiWrapper Error: 0 : [Error] Error intializing SSL connection
com.thingworx.communications.client.TwApiWrapper Error: 0 : [Error] twWs_Connect: Error restarting socket. Error 0
1 ACCEPTED SOLUTION

Accepted Solutions
loredan
4-Participant
(To:loredan)

Well finally I figured out that my API uri was the problem: 

Now my API uri is: https://PP-1806041235NN.Devportal.Ptc.Io:8080/Thingworx/WS

 

Then my Api Key has expired. To find this I had to display all errors in console. For that I changed 

<add name="SourceSwitch" value="error" />

to

<add name="SourceSwitch" value="all" />

In App.config

View solution in original post

3 REPLIES 3
mgoel
17-Peridot
(To:loredan)

@loredan

 

Thank you for posting this. See if below one helps.

https://community.ptc.com/t5/ThingWorx-Developers/Logging-with-the-NET-sdk/m-p/516231#M12395

 

Regards- Mohit

loredan
4-Participant
(To:mgoel)

Well finally I figured out that my API uri was the problem, maybe.

 

Now my API uri is: https://PP-1806041235NN.Devportal.Ptc.Io:8080/Thingworx/WS

 

I haven´t any errors in my console but in Thingworx Composer SteamSensor things don´t update their isConnected property.

loredan
4-Participant
(To:loredan)

Well finally I figured out that my API uri was the problem: 

Now my API uri is: https://PP-1806041235NN.Devportal.Ptc.Io:8080/Thingworx/WS

 

Then my Api Key has expired. To find this I had to display all errors in console. For that I changed 

<add name="SourceSwitch" value="error" />

to

<add name="SourceSwitch" value="all" />

In App.config

Top Tags