Hangfire dashboard does not respect configured job storage when executing actions from the dashboard

I’m testing a proof of concept with sql server and redis hangfire servers running in the same service, as we want to try and accelerate some of our jobs that at less important (while the important ones stay in sql server).

We have JobStorage.Current set up as sql server, because IThrottlingManager cannot be resolved without JobStorage.Current being set (another issue), however I’ve noticed today that executing any action from the sql server dashboard works, and the redis dashboard returns a 500 internal server error.

Digging into the stack traces, when you execute an action from the redis dashboard, it appears to try executing this on JobStorage.Current, even though it was passed it’s own RedisStorage object on setup.

app.UseHangfireDashboard(
“/hangfireredis”,
new DashboardOptions
{
AppPath = null,
Authorization = new[]
{
new PublicDashboardAuthorizationFilter()
},
IgnoreAntiforgeryToken = true
},
app.ApplicationServices.GetRequiredService());

Please note you can create an instance of the ThrottingManager (it implements the IThrottlingManager) and specify any JobStorage you want.

Can you tell me what version of Hangfire.Core and Hangfire.AspNetCore do you have? The problem like yours was already fixed in version 1.7.20.

Ah I was on 1.7.16, just updated and you’re correct this is now fixed, this can be closed.