简体   繁体   中英

.NET Core Console App: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot

I have a .NET Core Console app, and I'm trying to send an HttpRequest to a locally running version of my application. I'm sending a POST request with an auth token from Microsoft to our authentication endpoint, and essentially just trying to validate it.

With each request, I run into the following exception: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot

I don't know much about certificates, so any guidance here would be greatly appreciated.

You can refer to the official link ,and try the commands in it.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM