I am trying to use the service published by another company. There are specifications about AUTH and communication:
- SOAP
- HTTPS (2-way SSL) with reciprocal SSL authentication
- a public certificate Use the private certificate that we created (I am using as a client certificate).
- WS - Security with Username
Even the code that I have come up to now:
WSHttp binding bindings C = new WSHttpBinding (SecurityMode.Transport); Binding. Security. Transportation Client Credential Type = HTTP Client Credential Type certificate; Binding.Sendetimeout = binding Close timeout = binding Receive Time Timing. Opentimeout = new timespan (0, 15, 0); // 15 minutes Uri Uri = new URI (input service address); EndpointAndrance Endpoint = New Endpoint Address (Yuri); // Client Construction (Client Client = New Client (Binding, Endpoint Address)) {client.ClientCredentials.ClientCertificate.Certificate = input.PrivateCertificate; Client.ClientCredentials.ServiceCertificate.DefaultCertificate = input.PublicCertificate; Client.Open (); // service call response feedback feedback = client.ServiceCall (params); }
I am getting this error when the service is being called:
There was an error requesting the HTTP service . This may be due to the fact that the server is not properly configured with STSS in case of HTTPS.
Things I've already tried:
- Adding this line code: "System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType .Ssl3; "
- found on the solution and
- Register the public certificate in the port Netsus
- using this command: "netsh http add sslcert Ipport = 0.0.0.0: 443 certhash = certificate thumb mark APIID = { application GUID } "
- Based on the second issue we have Another project
I do not know how to solve this problem and I do not know anything about it! Have already searched for a lot and do not do anything I try!
Some network problems As soon as we lock the security level from our machine, the service expires .
I think the certificate (possibly the keys) was not going through the network and I got that error ('because it was not certified).
Comments
Post a Comment