简体   繁体   English

.NET Core 控制台应用程序:由于证书链中的错误,远程证书无效:UntrustedRoot

[英].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.

相关问题 由于证书链中的错误,远程证书无效: UntrustedRoot with SendGrid in Docker - The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot with SendGrid in Docker AuthenticationException:由于证书链中的错误,远程证书无效:UntrustedRoot、NotValidTime - AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot, NotValidTime .Net Core + Kubernetes > AuthenticationException:远程证书根据验证程序无效 - .Net Core + Kubernettes > AuthenticationException: The remote certificate is invalid according to the validation procedure ASP.Net Core 3 远程证书在 MacOs 上无效 - ASP.Net Core 3 The remote certificate is invalid on MacOs .NET 核心添加 Package - 无效证书 - .NET Core Add Package - Invalid Certificate 绕过 .net 核心中的无效 SSL 证书 - bypass invalid SSL certificate in .net core Asp.Net Core MailKit:根据验证过程,远程证书无效 - Asp.Net Core MailKit: The remote certificate is invalid according to the validation proceedure 带有不完整链的 SSL 证书,在 .NET Core 2.2 中通过验证 - SSL Certificate with Incomplete-Chain, passes validation in .NET Core 2.2 ASP.NET Core 6:当使用不同的用户打开 Visual Studio 时,httpclient 调用 API 时出错。 AuthenticationException:远程证书无效 - ASP.NET Core 6 : httpclient error calling API when open Visual Studio with different User. AuthenticationException: The remote certificate is invalid 忽略 ASP.NET Core 3.1 中的 WCF 证书错误 - Ignore WCF certificate errors in ASP.NET Core 3.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM