Skip to content

Named endpoints (13.2 breaking changes) #739

Open

Description

Can someone please explain to me how named endpoints works?

It looks like there is some confusion in the docs...

service-discovery-environment-variable-naming

named-endpoint-doesnt-resolve

I have tried to create a aspire starter project and just added a HTTP dashboard endpoint on port 9999 in the apphost.

var builder = DistributedApplication.CreateBuilder(args);

var apiService = builder.AddProject<Projects.HelloAspire_ApiService>("apiservice")
    .WithHttpEndpoint(9999, name: "dashboard")
    .WithHttpHealthCheck("/health");

builder.AddProject<Projects.HelloAspire_Web>("webfrontend")
    .WithExternalHttpEndpoints()
    .WithHttpHealthCheck("/health")
    .WithReference(apiService)
    .WaitFor(apiService);

builder.Build().Run();

And then set the BaseAddress of an httpclient in the webfrontend project.

builder.Services.AddHttpClient<WeatherApiClient>(client =>
    {
        client.BaseAddress = new("http://_dashboard.apiservice");
    });

But I still get System.Net.Http.HttpRequestException: No such host is known. (apiservice:80) ---> System.Net.Sockets.SocketException (11001): No such host is known.


Update!

It might be working now after this commit

microsoft/aspire@efcd138#diff-19fa606291a5a92010a16a21c80f5b0e0f7f6f76b97fa755cf30930f6b594188

Activity

  1. IEvangelist commented on Jun 2, 2026

    @IEvangelist
    Member

    Triage → David Pine (@IEvangelist)

    Reporter is confused by an apparent contradiction between the 13.2 what's-new page and the service discovery reference page regarding named endpoint resolution. Two separate docs pages disagree, so we need a product call on which behavior is correct now (post-13.2), then the docs reconciliation is a small edit. Needs human routing to clarify intent before Copilot can fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions