var app = webHost.Build();
app.UseRouting();
app.UseAuthorization();
app.UseHangfireDashboard("", new DashboardOptions
{
IsReadOnlyFunc = _ => true,
Authorization = new[] { new DashboardAuthorizationFilter() },
IgnoreAntiforgeryToken = true,
});
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
Running net 6 console app with webapplication inbuilt. It runs just fine on http://localhost:5000 but not when accessing remotely.
DashboardAuthorizationFilter.cs
public class DashboardAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize(DashboardContext context)
{
return true;
}
}
A netstat shows the following:
C:\windows\system32>netstat -aon | find "5000"
TCP 127.0.0.1:5000 0.0.0.0:0 LISTENING 9392
TCP [::1]:5000 [::]:0 LISTENING 9392
Can anyone indicate what is going wrong?