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

后端 未结 13 2040
南旧
南旧 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:29

    In windows, dotnet dev-certs https --clean doesn't work for me, I have to delete these localhost certs manually.

    1. Open certmgr.msc
    2. Delete all localhost certs under 'Trusted Root Certification Authorities/Certificates'
    3. Run dotnet dev-certs https -t
    0 讨论(0)
  • 2021-01-30 20:34
    1. dotnet tool uninstall --global dotnet-dev-certs --version (required version)
    2. dotnet tool install --global dotnet-dev-certs
    3. dotnet dev-certs https --trust

    For more details visit the GitHub issue page here also the official documentation Here

    0 讨论(0)
  • 2021-01-30 20:35

    Not sure if this will help anybody else but I had exactly this issue on my Mac. I have the project in Dropbox and so it is shared across machines, on the '2nd' machine I had to go in and manually delete the 'obj' and 'bin' folders, then re-run the application and it all worked

    0 讨论(0)
  • 2021-01-30 20:42

    I am on OSX and dotnet dev-certs https --clean and sudo dotnet dev-certs https --clean were not working for me. Finally I was able to fix it with the following steps.

    1. Go into Keychain Access
    2. Unlock System Keychain
    3. Delete the localhost certificate
    4. Run dotnet dev-certs https -t

    You should now be able to run without the error.

    Edit:

    If, after following the above answer, you do run into an error that reads There was an error saving the HTTPS developer certificate... check out this answer https://stackoverflow.com/a/56709117/621827

    0 讨论(0)
  • 2021-01-30 20:43

    I had this issue on my Windows 10 system using visual studio. The problem seemed to be that the command used in the GUI to clear the local certs for HTTPS was failing with an error message that I can no longer reproduce.

    The solution for me was to open the certmgr for the current windows account and to delete all of the personal localhost certs. There was ~20 certs there for me because I've tried re-creating them many times. After deleting all of those certs I ran my .Net core HTTPS API once more and everything worked!

    In summary, open your certmgr for your current user and clear all personal/localhost certs.

    0 讨论(0)
  • 2021-01-30 20:44

    I had the same issues and cleaning -> then installing certs helped me (another answer here). You also may issue a certificate as like for production server. Quite helpful to know.

    0 讨论(0)
提交回复
热议问题