Skip to content
Docs Try Aspire
Docs Try

withBlazorClientApp

Method
📦 Aspire.Hosting.Blazor v13.4.0-preview.1.26281.18
interface ProjectResource {
// ... omitted for brevity
withBlazorClientApp(
wasmApp: BlazorWasmAppResource,
apiPrefix?: string,
otlpPrefix?: string,
proxyTelemetry?: boolean): ProjectResource;
}

Signature

method withBlazorClientApp builder
Attaches a Blazor WebAssembly app to the Gateway. The resource name is used as the URL path prefix (e.g., resource "store" → /store/). Service names are derived from WithReference() annotations on the WASM resource. Service references from the WASM app are automatically forwarded to the gateway so the gateway can resolve service endpoints for YARP proxying.
withBlazorClientApp(
wasmApp: BlazorWasmAppResource,
apiPrefix?: string,
otlpPrefix?: string,
proxyTelemetry?: boolean): ProjectResource
wasmApp BlazorWasmAppResource
apiPrefix string optional = _api
otlpPrefix string optional = _otlp
proxyTelemetry boolean optional = True
ProjectResource

Applies to

This method applies to the following types: