This is the first error got:
after that, checking the console, there is a more in detail error, and even a link on where to search for the possible solution:
The first try is to follow the first suggestion, which is run this:
dotnet dev-certs https --trust
in the terminal will get this message with the subsequent popup (check the image)
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.
The HTTPS developer certificate was generated successfully.
This is a solution that in much of the cases works. But what really works for me in some cases is to clear the certificates, and reinstall them:
dotnet dev-certs https --clean
This will fire up a popup per certificate installed asking if you want to uninstall it:
and in terminal we get this:
Cleaning HTTPS development certificates from the machine. A prompt might get displayed to confirm the removal of some of the certificates.
HTTPS development certificates successfully removed from the machine.
After deleting all certificates, run the command in the first solution, click yes
in the popup, and now should be good to go.