1

My webApi is using a third party web api Service inside it. The thing is it's perfectly working in my local machine and Azure web Service. but when I transfer this solution in to Azure Vm instance it's getting this error. I have installed correct certificates related to that 3rd party web api and registered with HttpClient and tried with

ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11; 

But it's giving the same error. I don't know what is the exact error. Could any one help on this please?

1
  • What third-party Web API are you using? Could you provide some key code about calling the third-party Web API for us to reproduce this issue. Commented Jan 19, 2017 at 7:34

1 Answer 1

5

Per my understanding, you could refer to the following approach to check this issue:

1.Leverage https://www.ssllabs.com/ssltest/ to check the supported Protocols both on your side and third-party Web API as follows:

2.Configure SecurityProtocol and ServerCertificateValidationCallback as follows:

ServicePointManager.Expect100Continue = true; ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3; 

Also, you could refer to this similar issue1 and issue2 for more details.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.