Marius Steinbach
Marius Steinbach

Reputation: 626

HangFire Dashboard on Hosted Blazor App not found

I am migrating an MVC app to hosted blazor and the routing setup seems to skip the HangFire Dashboard. It always falls back to the Blazor app and renders 404 since the /hangfire route does not exist.

I have tried

app.UseHangfireDashboard();

and

app.UseEndpoints(endpoints =>
{
    endpoints.MapHangfireDashboard();
}

but it seems not to work. Same applies to HealthChecksUI. Did you get it serving on a hosted blazor app?

Upvotes: 1

Views: 976

Answers (1)

Ben Scott
Ben Scott

Reputation: 11

I haven't managed to fix Blazor's routing - but there is a workaround: Make a razor page containing a hangfire iframe:

@page "/HangfireContainer"

<iframe src="@("hangfire")"></iframe>

@code {
}

Upvotes: 1

Related Questions