I am working through Adam Freeman's book "Pro ASP.Net Core 3". I have gotten to the introduction to https. He instructs us to use Powershell and run these commands in this order
dotnet dev-certs https --clean dotnet dev-certs https --trust When I run the clean command, I get a message saying
"HTTPS development certificates successfully removed from the machine."
But when I run the trust command, I get:
"A valid HTTPS certificate with a key accessible across security partitions was not found. The following command will run to fix it: 'sudo security set-key-partition-list -D localhost -S unsigned:,teamid:UBF8T346G9' This command will make the certificate key accessible across security partitions and might prompt you for your password. For more information see: https://aka.ms/aspnetcore/2.1/troubleshootcertissues
A valid HTTPS certificate with a key accessible across security partitions was not found. The following command will run to fix it: 'sudo security set-key-partition-list -D localhost -S unsigned:,teamid:UBF8T346G9' This command will make the certificate key accessible across security partitions and might prompt you for your password. For more information see: https://aka.ms/aspnetcore/3.1/troubleshootcertissues
Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate. There was an error trusting HTTPS developer certificate."
I tried
- running
dotnet dev-certs httpsresults in "A valid HTTPS certificate is already present." - running powershell as administrator. But I got the same errors. The book says I may get a couple of dialog boxes, but I did not get them.
dotnet --versiongives me 3.1.200.
What do I have to do to get the certificate to work?



A valid HTTPS certificate is already present.It seems that the developer certificate has been generated, you can try to manually trust the certificate with the ASP.NET Core HTTPS development certificate friendly name by copying from Current User > Personal > Certificates into Current User > Trusted root certification authorities > Certificates within the certificate manager UI. Then check if it works for you.Great! That worked!Hi @ROBERTRICHARDSON, glad to hear the workaround did help resolve the problem. I write a post, and you can accept it as answer, which would help other community members quickly find this case and resolve similar issue.