[英].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.我有一个 .NET Core 控制台应用程序,我正在尝试将 HttpRequest 发送到我的应用程序的本地运行版本。 I'm sending a POST request with an auth token from Microsoft to our authentication endpoint, and essentially just trying to validate it.我从 Microsoft 向我们的身份验证端点发送带有身份验证令牌的 POST 请求,本质上只是尝试对其进行验证。
With each request, I run into the following exception: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
对于每个请求,我都会遇到以下异常: 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.