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 or is out of date

Question: 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 or is out of date

 

Answer: Follow the instruction below:

1. Open up Windows Terminal or your favorite Terminal App
2. Navigate to the directory where your project is stored
3. Type the following in the terminal order to generate a certificate for Development:
     dotnet dev-certs https
4. Type the following in the Terminal in order to trust the certificate
    dotnet dev-certs https --trust

For more information about generating Development Certificates see Microsoft Website
https://go.microsoft.com/fwlink/?linkid=848054