Signon function in .NET API fails, returns "An Invalid Argument was supplied"

I'm unable to sign on to my moveit server using the .NET API. I believe the issue is arising from the hostname I'm passing in, but I'm not sure how to get a corrected hostname if I'm right.

 

My signon code looks like the below. To be clear, "hostname", "username" and "password" are variables representing the values I'm passing into those areas.

 

  1. bool startConnection = true;
  2. static MOVEit.DMZ.API.Client objAPI = new MOVEit.DMZ.API.Client();
  3. objAPI.Host = hostname;
  4.  
  5. if (startConnection = objAPI.Signon(username, password))
  6. {
  7. // log success
  8. }
  9. else
  10. {
  11. // log failure with StatusDescription message
  12. }

I have hostname , username and password values to pass in. Also, I believe my username and password are correct as I am able to login to the web portal on my web portal with them. Yet for some reason this function always returns false.

 

All I have for a hostname for my server is the IP address, as opposed to something like "home.server.com". Is this acceptable?

 

I have tried prefixing my IP address with a protocol, "https://" for example, with no change. I'm new working with the API, so I hope someone can point me in the right direction.

 

EDIT: Added explanation of the code sample for clarity.

 

I've just been informed by MOVEit support that, since I'm working on a custom application, they won't be able to give me any support for this issue. If anyone has any suggestions as to what might be going on here, please share.