Skip to content

Support hosted services in WebAssemblyHost #63637

@oroztocil

Description

@oroztocil

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Applications using WebAssemblyHost (e.g. Blazor WebAssembly clients) do not support hosted services out of the box. Services registered with AddHostedService are ignored when using WebAssemblyHostBuilder, unlike in applications built with WebApplicationBuilder or HostApplicationBuilder.

Describe the solution you'd like

WebAssemblyHost should support automatically running hosted services registered with AddHostedService.

Additional context

This feature request has already been rejected in #33537. However, we might want to reconsider the decision. For example, support for hosted services might be beneficial for Open Telemetry integration in Blazor Wasm apps.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions