Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithBlazorClientApp

Method
📦 Aspire.Hosting.Blazor v17.0.0-preview.1.26565.2
func (DotnetProjectResource) WithBlazorClientApp(
wasmApp BlazorWasmAppResource,
options ...*WithBlazorClientAppOptions,
) DotnetProjectResource

Signature

methodWithBlazorClientAppbuilder
Attaches a Blazor WebAssembly app to the gateway. The app's resource name becomes its URL path prefix, and its service references are forwarded to the gateway for proxying.
WithBlazorClientApp(
wasmApp BlazorWasmAppResource,
options ...*WithBlazorClientAppOptions,
) DotnetProjectResource
wasmAppBlazorWasmAppResourceThe Blazor WebAssembly app to attach to the gateway.
options...*WithBlazorClientAppOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithBlazorClientAppOptions argument.

ApiPrefix*stringThe URL path prefix for API proxy routes. The default is "_api".
OtlpPrefix*stringThe URL path prefix for telemetry proxy routes. The default is "_otlp".
ProxyTelemetry*booltrue to expose the telemetry proxy for the client app; otherwise, false.
DotnetProjectResource

The gateway resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: