Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found

后端 未结 13 2044
南旧
南旧 2021-01-30 19:46

I am working on a fabric application where I have configured HTTPS. It is throwing an exception though I have a valid installed certificate.

13条回答
  •  孤独总比滥情好
    2021-01-30 20:19

    I hope a separate answer is ok since I don't have the rep to comment. Here's the solution I found, which I didn't see mentioned anywhere else on SO or other sites. This is specific to the Windows certificate manager, not sure if other OSes run into similar issues.

    What I Tried from Other Answers

    dotnet dev-certs https arguments

    I tried various combinations of dotnet dev-certs https with --trust, --clean --verbose (which didn't seem to actually log any additional info), and --check (which never found a certificate)

    certmgr.msc

    As suggested in other answers, I deleted all localhost certificates under Trusted Root Certification Authorities\Certificates in certmgr.msc in conjunction with dotnet dev-certs https --clean

    Solution

    Eventually I realized that certmgr.msc also showed a number of localhost certificates under Personal\Certificates, in addition to those under Trusted Root Certification Authorities\Certificates. It turned out that these all needed to be deleted.

    Then running dotnet dev-certs https -t a single time created and trusted a new development certificate.

    I verified by debugging an ASP.NET Core App. Another way to verify is by running dotnet dev-certs https --check --verbose

提交回复
热议问题