Skip to content

Troubleshooting bits #900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/fundamentals/setup-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,7 @@ Once you've created a new .NET Aspire project, you run and debug the app, steppi
:::image type="content" source="media/setup-tooling/vscode-debugging.png" lightbox="media/setup-tooling/vscode-debugging.png" alt-text="A screenshot showing how to debug a .NET Aspire project in Visual Studio Code.":::

:::zone-end

## See also

- [Unable to install .NET Aspire workload](../troubleshooting/unable-to-install-workload.md)
1 change: 1 addition & 0 deletions docs/get-started/build-your-first-aspire-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,4 @@ For more information, see [Make HTTP requests with the `HttpClient`](/dotnet/fun
- [.NET Aspire service defaults](../fundamentals/service-defaults.md)
- [Health checks in .NET Aspire](../fundamentals/health-checks.md)
- [.NET Aspire telemetry](../fundamentals/telemetry.md)
- [Troubleshoot untrusted localhost certificate in .NET Aspire](../troubleshooting/untrusted-localhost-certificate.md)
4 changes: 4 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ items:
- name: Allow unsecure transport
displayName: unsecure transport,http,non-tls
href: troubleshooting/allow-unsecure-transport.md
- name: Untrusted localhost certificate
href: troubleshooting/untrusted-localhost-certificate.md
- name: Unable to install .NET Aspire workload
href: troubleshooting/unable-to-install-workload.md
- name: .NET Aspire GitHub repository
href: https://github.com/dotnet/aspire
- name: Discord
Expand Down
24 changes: 24 additions & 0 deletions docs/troubleshooting/unable-to-install-workload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Troubleshoot installing the .NET Aspire workload
description: Explore strategies for troubleshooting issues when installing the .NET Aspire workload.
ms.date: 05/15/2024
---

# Troubleshoot installing the .NET Aspire workload

This article provides guidance on how to troubleshoot issues that you might encounter when installing the .NET Aspire workload.

## Symptoms

When you install the .NET Aspire workload, you might encounter an installation error. The error message might indicate that the installation failed, or that the workload couldn't be installed. The error message might also indicate that a package source is unavailable, or that a package source isn't found.

## Possible solution

Ensure that any recursive _Nuget.config_ files are configured to specify the correct package sources and NuGet feeds. For example, if you have a _Nuget.config_ file in your user profile directory, ensure that it doesn't specify a package source that is no longer available.

<!-- TODO: Ask Jose to help fill in more details, and perhaps even more symptoms. -->

## See also

- [NuGet: nuget.config reference](/nuget/reference/nuget-config-file)
- [.NET CLI: dotnet workload install](/dotnet/core/tools/dotnet-workload-install)
44 changes: 44 additions & 0 deletions docs/troubleshooting/untrusted-localhost-certificate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Troubleshoot untrusted localhost certificate in .NET Aspire
description: Explore strategies for troubleshooting issues when working with untrusted localhost certificates in .NET Aspire.
ms.date: 05/15/2024
---

# Troubleshoot untrusted localhost certificate in .NET Aspire

This article provides guidance on how to troubleshoot issues that you might encounter when working with untrusted localhost certificates in .NET Aspire.

## Symptoms

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.

## Possible solutions

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.

```dotnetcli
dotnet dev-certs https --clean
```

To trust the certificate:

```dotnetcli
dotnet dev-certs https --trust
```

For more troubleshooting, see [Troubleshoot certificate problems such as certificate not trusted](/aspnet/core/security/enforcing-ssl#troubleshoot-certificate-problems-such-as-certificate-not-trusted).

## See also

- [Trust the ASP.NET Core HTTPS development certificate on Windows and macOS](/aspnet/core/security/enforcing-ssl#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos)
- [Trust HTTPS certificate on Linux](/aspnet/core/security/enforcing-ssl##trust-https-certificate-on-linux)
- [.NET CLI: dotnet dev-certs](/dotnet/core/tools/dotnet-dev-certs)
Loading