Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How can I solve invalid remote certificate in Blazor App?

$
0
0

I have a Blazor Server App that makes calls to a REST API from a server. I have the problem that when I make a call to that server, I get the following error:

System.Net.Http.HttpRequestException: The SSL connection could not beestablished, see inner exception.---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificatechain: NotTimeValid

I have tried to disable SSL validation like this:

    handler.ClientCertificateOptions = ClientCertificateOption.Manual;    handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>    {        return true;    };    http = new HttpClient(handler);

And executing these commands that some people suggest:

   dotnet dev-certs https --clean   dotnet dev-certs https --trust

But nothing has worked. Anyone knows how I could solve it?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>