How Can I Install Certificate For "visual Studio Emulator For Android"'s Emulator?
I am working on a Xamarin Form that need to call httpclient to consume company's internal https REST api. Unfortunately, it return with this error Javax.Net.Ssl.SSLHandshakeExcep
Solution 1:
To bypass certification validation you can:
In Android Build options choose
HttpClient Implementation:AndroidClientHandlerSSL/TLS implementation:Default(NativeTLS1.2+)
In MainActivity.cs add this
ServicePointManager.ServerCertificateValidationCallback += (o, cert, chain, errors) =>true;
In the Httpclient init change this
var httpClient = new HttpClient();
To
var httpClient = new HttpClient(new System.Net.Http.HttpClientHandler());
Post a Comment for "How Can I Install Certificate For "visual Studio Emulator For Android"'s Emulator?"