Photo by Georg Bommeli on Unsplash
After playing around with ASP.NET developer certificates on macOS I couldn't get it back to work. Whenever the app started, I got this exception on startup:
Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
Whatever I tried (dotnet dev-certs https
[ --clean
/ --trust
]), I couldn't get it to work.
I also removed the certs manually from macOS Keychain.
After a while I noticed, that in ~/.aspnet/dev-certs/https
even after a dotnet dev-certs https --clean
there has still been one .pfx
left, owned by root
.
After deleting this one, ASP.NET picked up a fresh generated developer certifcate correctly again.