C#C
C#2y ago
Ares

✅ Unable to configure HTTPS endpoint.

The container builds successfully but then at the end it says:
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
Unhandled exception. 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.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.**


I tried running
dotnet dev-certs https --clean
sudo dotnet dev-certs https --clean
dotnet dev-certs https
dotnet dev-certs https --trust
dotnet dev-certs https --check --trust
it says that my certificate is valid but it still keeps giving me Unable to configure HTTPS endpoint.

I also tried completely removing docker and then adding it back. but that didn twork either. I tried removing app.UseHttpsRedirection(); from
Program.cs
too. nothing seems to work at all.
Was this page helpful?