© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
30 replies
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.**
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
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
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();
app.UseHttpsRedirection();
from
Program.cs
Program.cs
too. nothing seems to work at all.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,828Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Unable to configure values in DI using the extension method
C#CC# / help
3y ago
Unable to find endpoints. Invalid URI
C#CC# / help
3y ago
Configure .csproj
C#CC# / help
11mo ago
Need help to configure grafana dashboard
C#CC# / help
2y ago