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 --trustBut nothing has worked. Anyone knows how I could solve it?