Tye exception

An unhandled exception occurred while processing the request.

AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot

System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)

HttpRequestException: The SSL connection could not be established, see inner exception.

System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(bool async, Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)

solution:

The only thing I can think of is regenerating the dotnet dev certs. Can you try running

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

Besides that, I'm not sure; I'd need to investigate this via repro'ing it. Putting this on the 0.2 milestone.

原文地址:https://www.cnblogs.com/cloudsu/p/14630901.html