Problem
When attempting to run a .NET 8 application with HTTPS on a macOS 15+, the following error may occur:
There was an error creating the HTTPS developer certificate.
This error indicates that the default HTTPS developer certificate is either missing or expired. Additionally, attempts to regenerate and trust the certificate using dotnet will fail
Cause
This issue is caused by a known bug in the .NET 8: CertificateRequest.CreateSelfSigned fails on macOS Sequoia.
Resolution
To resolve this issue, follow the steps below:
-
Update the .NET SDK to a version higher than .NET 8.0.10 (SDK version 8.0.403) and verify the installed SDK version by running
dotnet --version -
Clean Up Existing Developer Certificates via
dotnet dev-certs https --clean -
Run
dotnet dev-certs https --trustto generate and trust a new developer certificate -
Test the application by running it with HTTPS enabled.
Comments
0 comments
Please sign in to leave a comment.