Hi
Can anyone explain why the following code works perfect on the iPhone 5 and 6 simulators, and on my device (iPhone 6) but fails on the iPhone 4s simulator and on another person's device (also iPhone 6)
using (var client = new HttpClient()) {
var response = await client.PostAsync(url, postData); //This is where it fails, on some devices and iPhone 4s simulator
response.EnsureSuccessStatusCode();
return response;
}
The post is done to a https:// uri and the error I'm getting is:
{System.Net.WebException: Error writing headers ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0x5
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.RemoteValidation (Mono.Security.Protocol.Tls.ClientContext context, AlertDescription description) [0x00084]