Raritan Computer CC-WSAPI-0B-v5.1.0-E Marine Radio User Manual


 
Appendix C: Web Services Development in C#
43
new
CCAuthentication.AuthenticationAndAuthorizationServic
eClient();
auth_service.ClientCredentials.ClientCertificate.SetC
ertificate(
StoreLocation.CurrentUser,
StoreName.My,
X509FindType.FindBySubjectName,
"10.0.0.150");
// service parameters
CCAuthentication.signOn sign_on = new
CCAuthentication.signOn();
sign_on.String_1 = user;
sign_on.String_2 = password;
// access the service
Console.WriteLine("Connecting to: " +
cc_address);
try
{
auth_service.Open();
CCAuthentication.signOnResponse
response = auth_service.signOn(sign_on);
session_id = response.result;
Console.WriteLine("signOn response: "
+ response.result);
}
catch (Exception exception)
{
Console.WriteLine(exception.ToString());
quit(null);
}