jonhcw

.NET SDK registering probe / session.

Discussion created by jonhcw on Apr 27, 2012
Latest reply on Apr 27, 2012 by jonhcw

Hi,

 

I'm developing a probe using the .NET SDK (C#). I've my code otherwise ready and I'm now trying to turn it into a probe. I seem to be having trouble registering the probe and creating sessions. I'm not very familiar with .NET or C# for that matter. I keep running into the same problem whatever I do. I even tried running the "getting started" program from the API documentation that should print out the uptime for the CDM probe and it came up with the same error message.

 

This is the error I get:

 

Unhandled Exception: Nimsoft.NimBUS.NimException: Failed to log in. Check user name and password. ---> Nimsoft.NimBUS.NimException: Failed to connect. ---> System.ArgumentNullExcep
tion: Value cannot be null.
Parameter name: host
   at System.Net.Sockets.Socket.Connect(String host, Int32 port)
   at Nimsoft.NimBUS.Messaging.NimbusSession.Connect(Int32 timeout)
   --- End of inner exception stack trace ---
   at Nimsoft.NimBUS.Messaging.NimbusSession.Connect(Int32 timeout)
   at Nimsoft.NimBUS.Messaging.NimbusSession.SendMessage(NimbusMessage message, String custom1, String custom2, String custom3, String custom4, String custom5)
   at Nimsoft.NimBUS.Security.Login.LoginRequest(NimbusSession session, String request, PDS data)
   at Nimsoft.NimBUS.Security.Login._userLogin(String user, String password, String controllerIp, NimbusSession session, Logger logger)
   --- End of inner exception stack trace ---
   at Nimsoft.NimBUS.Security.Login._userLogin(String user, String password, String controllerIp, NimbusSession session, Logger logger)

 

This error seems to happen when logging in, both when opening a session or registering the probe.

The username/password is correct. It seems to me like the login function is trying to use System.Net.Sockets.Socket.Connect to connect to the controller and fails here due to a missing host parameter.

 

Any suggestions as to how to fix this?

Outcomes