Unable to configure HTTPS endpoint

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am using Apple silicon MacOS. I have an existing dotnet 6 project which is working fine. I install dotnet 7 using visual studio for mac. After upgrading to dotnet 7, the project just cannot run.

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.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action1 configureOptions) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Trusty.WebUI.Program.Main(String[] args) in /Users/utarn/projects/trusty_loose/src/WebUI/Program.cs:line 55 `

What I have tried and it’s still not working.

What is still working

  • create a fresh dotnet6 project MVC from visual studio for mac.

Expected Behavior

Project created in dotnet7 should be running fine with installed dev certificate.

Steps To Reproduce

https://github.com/utarn/dotnet7_fresh

Exceptions (if any)

No response

.NET Version

7.0.100

Anything else?

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
utarncommented, Nov 15, 2022

@adityamandaleeka I have tried removing all the localhost keys in the keychain and $HOME/.aspnet Then, I run

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

Everything works fine now. Thanks.

0reactions
msftbot[bot]commented, Nov 15, 2022

Hi @utarn. We have added the “Needs: Author Feedback” label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to configure HTTPS endpoint. No server certificate ...
These instructions from this blog worked for me. dotnet dev-certs https --clean; dotnet dev-certs https --trust; Restart VS.
Read more >
Docker in Visual Studio: Unable to configure HTTPS endpoint
System.InvalidOperationException: 'Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be ...
Read more >
Unable to configure HTTPS endpoint. No server certificate ...
The issue I'm about to describe happens debugging in Rider, VS, dotnet run, etc. The full error message is: Unable to configure HTTPS...
Read more >
How to Fix Unable to Configure HTTPS Endpoint ASP.NET ...
In this article tutorial, we will discuss about how to fix “Unable to configure HTTPS endpoint. No server certificate was specified”.
Read more >
Installed ASP.NET Core Dev Certificates but still "Unable to ...
Installed ASP.NET Core Dev Certificates but still “Unable to configure HTTPS endpoint. No server certificate was specified”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found