I am trying to make a request to a web api from Blazor WebASM project. The server hosting the web api is developer computer with self-signed certificate. I have configured CORS. I am trying with the follow code to bypass the certificate:
using( var httpClientHandler = new HttpClientHandler() )
{
httpClientHandler.ServerCertificateCustomValidationCallback = ( message, cert, chain, errors ) => { return true; };
using( var client = new HttpClient( httpClientHandler ) )
{
// Make your request...
}
}
Anyway I am receiving the following error:
blazor.webassembly.js:1 System.PlatformNotSupportedException: Property ServerCertificateCustomValidationCallback is not supported.
- How to make a simple http request toward a self-signed web api server from WebASM blazor project ?