I have installed Hangfire in my .NET Core 2.1 application but when I attempt to display the dashboard on my development PC all I get is a blank screen. My application is configured as follows;
public void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(x => x.UseSqlServerStorage("Server=localhost;Database=PWTT-DEV;Integrated Security=True;MultipleActiveResultSets=True"));
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseHangfireServer();
app.UseHangfireDashboard();
}
I have also tried;
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authoization = new [] { new MyAuithorizationFilter() }
});
}
public class MyAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize(DashboardContext context)
{
return true;
}
}
Can anyone suggest what is wrong with the configuration?