AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot
回答1
Please check below points:
- Installing the .NET Core SDK installs the ASP.NET Core HTTPS development certificate to the local user certificate store as part of the first-run experience, but it is not trusted. To trust the certificate, perform the one-time step to run the dotnet dev-certs tool.
- Check the certificates in the certificate store.Find localhost certificate with the ASP.NET Core HTTPS development certificate both under Current User > Personal > Certificates and Current User > Trusted root certification authorities > Certificates
- Try to remove all found certificates by checking carefully from both Personal and Trusted root certification authorities.
Note: Do not remove the IIS Express localhost certificate.
Try to run the following commands in .NET CLI and try again
dotnet dev-certs https --clean
dotnet dev-certs https --trust
Note: Untrusted certificates should only be used during app development. Production apps should always use valid certificates.
References:
Windows - certificate not trusted
- Check the certificates in the certificate store. There should be a
localhost
certificate with theASP.NET Core HTTPS development certificate
friendly name both underCurrent User > Personal > Certificates
andCurrent User > Trusted root certification authorities > Certificates
- Remove all the found certificates from both Personal and Trusted root certification authorities. Do not remove the IIS Express localhost certificate.
- Run the following commands:
dotnet dev-certs https --clean
dotnet dev-certs https --trust
Close any browser instances open. Open a new browser window to app.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2021-12-07 cookie groups
2021-12-07 Client-Side Cookie Management optanon-category-C0004
2021-12-07 OneTrust Cookie Auto-Blocking™
2021-12-07 The Auto Block, blocks my pictures on my website OneTrust
2021-12-07 System.Xml.XmlException: There is no Unicode byte order mark. Cannot switch to Unicode.
2017-12-07 kentico中自定义错误页面
2017-12-07 Troubleshooting Failed Requests Using Tracing in IIS 8.5