I am consuming an "https://www.******pi.********^$%.org.uk" which is working one iPAD and is not working another. I have the same configuration device (Software and Hardware). I am connected to same network.
API call has been done using HttpClient class. It is working completely fine in Android.
This API call works with some iPad and not working with some iPad having same OS and configuration.It is a random behavior on iOS Devices to come on any conclusion.
I am working on Xamarin Native and have tried following solutions but have not succeeded -
Connect to a Server with Invalid Certificate using NSURLSession (swift2,xcode7,ios9)
Trust a self signed certificate using Httpclient
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
Below is issue which I am getting -
{System.Net.WebException: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “**&^&^&%^.(&^(&^^&.org.uk” which could put your confidential information at risk. ---> Foundation.NSErrorException: Exception of type 'Foundation.NSErrorException' was thrown. --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 at System.Net.Http.NSUrlSessionHandler+d__29.MoveNext () [0x001c3] in /Users/builder/data/lanes/5944/64fece5f/source/xamarin-macios/src/Foundation/NSUrlSessionHandler.cs:202
Any help is appreciated.