Skip to content

[Update article]: Update "Define custom resource URLs" to cover .NET 10 support for *.dev.localhost #5321

@DamianEdwards

Description

@DamianEdwards

Proposed topic or title

Customize resource URLs

Location in table of contents.

AppHost / Customize resources / Custom resource URLs

Reason for the article

.NET 10 introduces support for running ASP.NET Core apps (including the Aspire dashboard that's launched by AppHost projects) on *.dev.localhost URLs. The Aspire templates have been updated in Aspire 13.0 so that when targeting net10.0 they default to using the *.dev.localhost host name for the dashboard and the web resource in the starter template when running locally.

Article abstract

  • URLs are still pulled from ASP.NET Core project resources' launchSettings.json file (launch profiles) and that now includes *.dev.localhost URLs from .NET 10 projects
  • If a *.localhost URL is added to a resource, it is given precedence in the dashboard over the regular localhost version of that URL. The *.localhost URL will be displayed on the resources summary table, while both the *.localhost and localhost URLs will be shown in the details pane.
  • Any resource reachable via a *.localhost URL is also reachable via localhost on the same port
  • *.localhost will auto-resolve to the local loopback addresses (127.0.0.1, ::1) on modern browsers, but outside the browser the machine's DNS configuration is used. If the DNS server's being used are not configured to return the local loopback addresses for name lookup requests to *.localhost addresses, name resolution might fail. For this reason, *.dev.localhost addresses are only configured for ASP.NET Core projects intended to be viewed from a browser, e.g. Blazor Web projects.
  • The ASP.NET Core HTTPS developer certificate has been updated in .NET 10 to support the *.dev.localhost host name (wildcard domain). Note that the *.localhost host name is not supported by the certificate as it's considered a top-level domain (TLD) and it's invalid to issue wildcard certificates to TLDs.

Relevant searches

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri1High priority, do before Pri2 and Pri3area-docsdoc-ideaIndicates issues that are suggestions for new topics [org][type][category]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions