Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ConsoleApp
- {
- static void Main(string[] args)
- {
- try
- {
- DistributorServiceTypeClient client = new DistributorServiceTypeClient();
- // Loading and assigning certificated stored for my user. It seems to be found and set as I am debugging.
- client.ClientCredentials.ClientCertificate.Certificate = ConsoleApp.setCertificate();
- client.Open();
- DataRequest request = new DataRequest();
- // Some code to set DataRequest.
- DataResponse response = new DataResponse();
- // Sending data.
- response = client.PutData(request);
- // ERROR is catched that no endpoint is listiening.
- client.Close();
- Console.WriteLine("Result : {0}", response.get_Result());
- Console.WriteLine("Message : {0}", response.get_Message());
- Console.ReadKey();
- }
- catch (Exception e)
- {
- ...
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement