'How to resolve "trust anchor for certification path not found." in Xamarin Project?

i am new to Xamarin Forms/mobileDev and im trying to create a simple application that consumes data from an API.

I'm using the following tutorial to do that Consuming an Web API ASP.NET Core but as i try to connect to my API i get the following error message:

Javax.Net.Ssl.SSLHandshakeException Message=java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

My webAPI is working fine so i assume the problem is on my mobile app.

I read some posts here in StackOverflow but i couldnt find one that solve my problem as i found all the answers to be a little complex for my level of mobile developing.

Is there an easy way to solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source