Skip to content
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

βœ… Merge main into live #1415

Merged
merged 3 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/03-customer-support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "CSS"
description: Intended for internal Microsoft use only (CSS requests).
assignees: ["IEvangelist", "CamSoper"]
title: "[CSS]: "
labels: ["customer-support"]
body:
- type: markdown
attributes:
value: |
"We prioritize CSS requests for Microsoft employees.
If you're not a Microsoft employee, this is the wrong issue template to submit.
Instead, please submit a [General feedback](https://github.com/dotnet/docs-aspire/issues/new/choose) issue.
- type: input
id: title
attributes:
label: Article title
description: Please provide the title of the article in question.
placeholder: For example, .NET Aspire Overview
validations:
required: true
- type: input
id: url
attributes:
label: Article URL
description: Please provide the URL of the article in question.
placeholder: "For example, 'https://learn.microsoft.com/dotnet/aspire'"
validations:
required: true
- type: textarea
id: details
attributes:
label: Description
description: Please descibe the issue with the content in as much detail as required to correctly communicate.
placeholder: Describe the issue...
validations:
required: true
19 changes: 17 additions & 2 deletions docs/fundamentals/networking-overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: .NET Aspire inner loop networking overview
description: Learn how .NET Aspire handles networking and service bindings, and how you can use them in your app code.
ms.date: 04/24/2024
ms.date: 07/25/2024
ms.topic: overview
---

Expand Down Expand Up @@ -143,7 +143,7 @@ Consider the following diagram:

## Endpoint extension methods

Any resource that implements the `IResourceWithEndpoints` interface can use the `WithEndpoint` extension methods. There are several overloads of this extension, allowing you to specify the scheme, container port, host port, environment variable name, and whether the endpoint is proxied.
Any resource that implements the <xref:Aspire.Hosting.ApplicationModel.IResourceWithEndpoints> interface can use the `WithEndpoint` extension methods. There are several overloads of this extension, allowing you to specify the scheme, container port, host port, environment variable name, and whether the endpoint is proxied.

There's also an overload that allows you to specify a delegate to configure the endpoint. This is useful when you need to configure the endpoint based on the environment or other factors. Consider the following code:

Expand All @@ -157,3 +157,18 @@ builder.Services.AddHttpClient<WeatherApiClient>(
```

The `Uri` is constructed using the `admin` endpoint name prefixed with the `_` sentinel. This is a convention to indicate that the `admin` segment is the endpoint name belonging to the `apiservice` service. For more information, see [.NET Aspire service discovery](../service-discovery/overview.md).

### Additional considerations

When calling the `WithEndpoint` extension method, the `callback` overload exposes the raw <xref:Aspire.Hosting.ApplicationModel.EndpointAnnotation>, which allows the consumer to customize many aspects of the endpoint.

The `AllocatedEndpoint` property allows you to get or set the endpoint for a service. The `IsExternal` and `IsProxied` properties determine how the endpoint is managed and exposed: `IsExternal` decides if it should be publicly accessible, while `IsProxied` ensures DCP manages it, allowing for internal port differences and replication.

> [!TIP]
> If you're hosting an external executable that runs its own proxy and encounters port binding issues due to DCP already binding the port, try setting the `IsProxied` property to `false`. This prevents DCP from managing the proxy, allowing your executable to bind the port successfully.

The `Name` property identifies the service, whereas the `Port` and `TargetPort` properties specify the desired and listening ports, respectively.

For network communication, the `Protocol` property supports **TCP** and **UDP**, with potential for more in the future, and the `Transport` property indicates the transport protocol (**HTTP**, **HTTP2**, **HTTP3**). Lastly, if the service is URI-addressable, the `UriScheme` property provides the URI scheme for constructing the service URI.

For more information, see the available properties of the [EndpointAnnotation properties](/dotnet/api/aspire.hosting.applicationmodel.endpointannotation#properties).
Loading