0
votes

I'm doing a project where I need to communicate with a Web API from a UWP-application.

I use HttpClient to do the job, and it works fine as long as the Web API is not using SSL. When I turn the SSL on, it just won't work. It works if I use some other client though, like browser/Wpf-application/console-application.

1

1 Answers

0
votes

Probably you need to allow unsigned / self signed certificates. If so, you can do it the following way

var filter = new HttpBaseProtocolFilter();
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Untrusted);

var httpClient = new Windows.Web.Http.HttpClient(filter);

I hope it helps