Unable to configure HTTPS endpoint
See original GitHub issueIs 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.
- the steps in https://go.microsoft.com/fwlink/?linkid=848054 by removing and reinstalling dev certificate.
- create a fresh dotnet 7 project MVC from visual studio for mac.
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:
- Created 10 months ago
- Comments:8 (5 by maintainers)
Top Related StackOverflow Question
@adityamandaleeka I have tried removing all the localhost keys in the keychain and $HOME/.aspnet Then, I run
Everything works fine now. Thanks.
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.