Error system.net.webexception: 0 using the Ibmwiotp library

Asked

Viewed 40 times

1

I’m working with the library Ibmwiotp to make a POST equipment on the IBM Watson Iot Platform.

I have the following code:

public void AddDevice(){

    try{

        ApiClient client = new ApiClient("a-i7wplp-paqfsd43pem", "bcO9?&jg9Kb4GOTo)&");

        var device = new RegisterSingleDevicesInfo();
        device.deviceId = "device6";
        device.authToken = "defaultToken";

        Boolean status = client.RegisterDevice("r3000", device);

    }catch(Exception e){
        @Info.Trace("AddDevice -> " + e);
    }

}

Error appears when the following line is executed:

Boolean status = client.Registerdevice("R3000", device);

The error that returns me is the following:

system.net.webexception: 0: em IBMWIoTP.ApiClient.RestHandler(Method methord, String urlSuffix,
    Object param, Boolean parseDynamic, ResRequest customRequest) em IBMWIoTP.ApiClient.RegisterDevice(
    String type, RegisterSingleDevicesInfo info) em DeviceManagementSample.SampleDeviceManagement.Main
    (String[] args) na C:\Users\caiohr\source\repos\teste2\Program.cs: linha 29

I don’t usually call for help, but I’ve searched and searched everywhere on the Internet and I can’t find anything like it. I look for the solution or any information about, articles or books that can help me.

From now on, thank you very much!

1 answer

0


The problem was solved by changing the network. The proxy company where I work POST, I used another network provided by the same and I was able to do the POST normally.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.