Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found

This is because .NET Core pre-set to using HTTPS protocol. If the certificate is not installed, this error will be reported. To resolve this issue, execute the following dotnet command.

dotnet dev-certs https –trust

When executing the dotnet command shown above, you might encounter the following error

The current version of .Net I used in Visual Studio is 6 preview. However, there are two 6.0 preview folders in the sdk directory, which may cause an error when running the command dotnet dev-certs https –trust. To resolve this issue, delete one of the folders and then we can run the command again to install the certificate successfully.

Now you can run the dotnet project successfully