My OS is ubuntu 18.04
With no sudo doesnt work
$ dotnet dev-certs https There was an error saving the HTTPS developer certificate to the current user personal certificate store.
if i use
$ sudo dotnet dev-certs https
Ok, but only run a mvc program without sudo i get
crit: Microsoft.AspNetCore.Server.Kestrel[0] Unable to start Kestrel. System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found. To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
I solved this problem. I delete folders .aspnet .dotnet and .nuget Re run dotnet dev-certs https