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

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-10 17:18:28

问题


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


回答1:


These instructions from this blog worked for me

  1. dotnet dev-certs https --clean
  2. dotnet dev-certs https -t



回答2:


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




回答3:


For me the problem was resolved by running:

  1. dotnet dev-certs https --clean
  2. dotnet dev-certs https --verbose




回答4:


I had a similar (but not exactly the same) problem.
With 2.1 you have to configure your certificate.
I do this now completely in appsettings.json.
You can find my posting here:
Configure self hosting Kestrel App with certificate for https (internet web server)

Only have a look to the solution...




回答5:


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.




回答6:


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.




回答7:


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



来源:https://stackoverflow.com/questions/53300480/unable-to-configure-https-endpoint-no-server-certificate-was-specified-and-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!