Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

HTTPClient - API working on one iPad and not another with same confirguration

I am consuming an "https://www.******pi.********^$" 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. 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. It is working completely fine in Android.

I am working on Xamarin Native and have tried following solutions but have not succeeded -

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 “**&^&^&%^.(&^(&^^&” 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/ at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/ at System.Net.Http.NSUrlSessionHandler+d__29.MoveNext () [0x001c3] in /Users/builder/data/lanes/5944/64fece5f/source/xamarin-macios/src/Foundation/NSUrlSessionHandler.cs:202`


  • seanydaseanyda GBMember ✭✭✭✭✭

    Try adding this to your info.plist source.


    This was a requirement for https (introduced in iOS 10 I think), if the OS version is different on the iPads that might explain why only one is working with the https url and not the other.

  • RaviKanasagraRaviKanasagra INMember ✭✭

    OS version is same on both iPads.

  • FizzgigFizzgig Member

    Was any solution found for this?
    I'm experiencing the same problem.

Sign In or Register to comment.