1

I've been given a Url like:

https://xxxx.gr/xxx/xxx/xxx/xxx?WSDL

to create a consumer.

For testing reasons I've started a new desktop application in C# and when I tried to add the service reference I get the following error:

The request was aborted: Could not create SSL/TLS secure channel.

Then I tried to hit that Url direct from each browser (IE, FireFox, Chrome). They all report that it is insecure connection.

For example, in FireFox I get this info:

https:xxxx/xxx/xxx?WSDL

Peer's Certificate issuer is not recognized.

HTTP Strict Transport Security: false
HTTP Public Key Pinning: false

Certificate chain:

-----BEGIN CERTIFICATE-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END CERTIFICATE-----

I search the web and also SO but I couldn't figure it out.

Is there something I could do or the problem is from service side?

PS I'm completely ignorant about certificates etc.

Thanks.

1
  • I think you need to install https certificate from your service provider. Commented May 27, 2016 at 13:49

2 Answers 2

2

put the certificate into the authors trusted and retry.

Sign up to request clarification or add additional context in comments.

3 Comments

If it's not trouble to you, can you be more specific? Thanks anyway.
open internet explorer > tools>internet option> tab content click on certificate button choose tab "Trusterd Publishers" click on import button and fallow the procedures...
Thank you for your time but I don't have a certificate file to import. After searching I understood that maybe the server administrator (of the service) did not match correct the certificate or it is self-signed (like for intranet use). Either it's possible because it is a test service. For me I think the only thing I can do is to load the service at run time (not add it as service reference) and create all the proxy classes manually. I think, not sure enough.
0

You can ignore the certificate error if you just want to be able to create your client proxy classes, as per this answer: Bypass invalid SSL certificate errors when calling web services in .Net

...
ServicePointManager.ServerCertificateValidationCallback = MyCertHandler;
...

static bool MyCertHandler(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors error)
{
   // Ignore errors
   return true;
}

1 Comment

The question is for when adding a web reference in Visual Studio, not calling the actual webservice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.