Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article provides guidance on how to troubleshoot issues that you might encounter when working with untrusted localhost certificates in .NET Aspire.
Several .NET Aspire templates include ASP.NET Core projects that are configured to use HTTPS by default. If this is the first time you're running the project, and you're using Visual Studio, you're prompted to install a localhost certificate.
There are situations in which you trust/install the development certificate, but you don't close all your browser windows. In these cases, your browser might indicate that the certificate isn't trusted.
There are also situations where you don't trust the certificate at all. In these cases, your browser might indicate that the certificate isn't trusted.
Additionally, there are warning messages from Kestrel written to the console that indicate that the certificate is not trusted.
Close all browser windows and try again.
If you're still experiencing the issue, then attempt to resolve this by trusting the self-signed development certificate with the .NET CLI. To trust the certificate, run the following commands. First, remove the existing certificates.
Note
This will remove all existing development certificates on the local machine.
dotnet dev-certs https --clean
To trust the certificate:
dotnet dev-certs https --trust
For more troubleshooting, see Troubleshoot certificate problems such as certificate not trusted.
.NET Aspire feedback
.NET Aspire is an open source project. Select a link to provide feedback:
Events
17 Mar, 23 - 21 Mar, 23
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Create a .NET Aspire project - Training
Learn how to create cloud-native applications from scratch or add orchestration to an existing app by using the .NET Aspire stack in .NET 8.
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
Documentation
Allow unsecure transport in .NET Aspire - .NET Aspire
Learn how to allow unsecure transport in .NET Aspire projects.
dotnet dev-certs command - .NET CLI
The dotnet dev-certs command generates a self-signed certificate to enable HTTPS use in development.
.NET Aspire and launch profiles - .NET Aspire
Learn how .NET Aspire integrates with .NET launch profiles.