AnsweredAssumed Answered

Making the ArcGISHttpClientHandler accept "invalid" certificates

Question asked by alehmann on Aug 21, 2018
Latest reply on Aug 26, 2018 by alehmann

I'm trying to debug a problem with a customer's map service where we see intermittend errors in displaying the map. To get an idea as to why the map is sometimes not loading, I wanted to sniff the traffic using Fiddler. As the service is an SSL-secured service, I am using Fiddler's own certificate to intercept the connection and act as my own man-in-the-middle.


This works fine in my own code (using HttpClient) but crashes as soon as I try to show the map (both on Android and on iOS) with the following exception: 

System.Net.WebException: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “<customer's site>” which could put your confidential information at risk. ---> Foundation.NSErrorException: Exception of type 'Foundation.NSErrorException' was thrown.
--- End of inner exception stack trace ---


Is there any way to let the internal ArcGIS handler accept "invalid" certificates? If not, how am I able to capture the traffic between my app (on either Android or iOS) and the server?