javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
I tried to connect with middleware to integrating Web API and MAUI and I got Reference issue and Runtime package missing issue.
I'm expecting that the Web API to connect with MAUI android emulator
Place the below file (network_security_config.xml) within the Resources/xml directory of your Android project.
Cleartext Traffic Permitted : By setting cleartextTrafficPermitted="true", your app can make unencrypted HTTP requests. While useful for development, it's recommended to switch to HTTPS for production to ensure data security.
Trust Anchors : The section with means your app trusts the system's pre-installed CA certificates. This doesn't directly address trusting self-signed certificates but ensures that certificates from recognized CAs are trusted.
To use this configuration in a .NET MAUI Android application, you need to reference it in your Android manifest file (AndroidManifest.xml) like so:
Implementing IHttpHelper Interface in C#
The IHttpHelper interface and its implementation HttpHelper allow you to customize how your application handles SSL certificate validation.
Usage
Also note that :
The correct address to use when trying to access your local development server from an Android emulator is 10.0.2.2.