Skip to content

blazor.web.js is 404 when Blazor project runs as part of Aspire #64985

@petrroll

Description

@petrroll

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When trying to contribute to Wiremock.net I've noticed when the web-project that's part of their Aspire examples is run within the context of Aspire, blazor fails due to requests for blazor.web.js failing with 404 (from kestrel). When the project is run standalone it all works fine.

Expected Behavior

Blazor should work.

Steps To Reproduce

  1. Clone https://github.com/petrroll/WireMock.Net/tree/petrhouska/update-aspire
  2. Run (using aspire cli) aspire run ./examples-Aspire/AspireApp1.AppHost/AspireApp1.AppHost.csproj
  3. Open the webfrontend portal
  4. Observe 404 error for blazor.web.js (and generally broken blazor experience on /weather

Weirdly enough, if you run the webfrontend project separately, it all works fine.

Exceptions (if any)

GET https://localhost:7263/_framework/blazor.web.js net::ERR_ABORTED 404 (Not Found)
Responder is Kestrel, so there's no caching shenanigans

.NET Version

10.0.101

Anything else?

aspire --version
13.1.0+8a4db1775c3fbae1c602022b636299cb04971fde

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions