Why does my dashboard say that there are no active servers?

I can’t figure out why my BackgroundJobServer does not get created when I call UseHangfireServer().

When I run my application and go to the Hangfire dashboard in my browser, the Servers tab says “There are no active servers. Background tasks will not be processed.” I look at my backing database and the Hangfire.Server table is completely empty, so it seems like the server somehow never gets created. There are no errors in my log.

I’ve verified that other aspects of my Hangfire implementation work fine - i.e. I can add a job to a queue and it’ll appear on my dashboard. But jobs can’t ever get processed because I don’t have a BackgroundJobServer.

Anyone know what might be going on?

I found the problem.

I had to change the datatype of the LastHeartbeat column of Hangfire.Server from datetime to datetime2. Is it a bug that servers don’t get created when LastHeartbeat is datetime? In any case, shouldn’t I have gotten an error in my log for this?

What version of Hangfire are you using ?

Records in the Hangfire.Server table should be added by the AnnounceServer method. Are you able to debug this and find out if it’s succeeding ?

Can you use SQL Profiler to see exactly what query is being executed, then try that query yourself using SQL Server Management Studio ?