Bad Request - Invalid Hostname using dashboard


#1

Hllo,
I am running Dashboard in console application using Owin,
When I use http://localhost:9095/hangfire , everything works
but when I try http://machine_name:9095/hangfire

I get error

Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.

Here is my code

Thanks ,
Zil

public class HangFireAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize([NotNull] DashboardContext context)
{
var owinContext = new OwinContext(context.GetOwinEnvironment());

        // Allow all authenticated users to see the Dashboard (potentially dangerous).
        return true;
    }
}
public class ApNgDashboardStartup
{
    public void Configuration(IAppBuilder app)
    {
        GlobalConfiguration.Configuration.UseSqlServerStorage("..");


        //app.UseHangfireServer();
        app.UseHangfireDashboard("/hangfire",
            new DashboardOptions()
            {
                Authorization = new[] { new HangFireAuthorizationFilter() }
            });
           
        //GlobalConfiguration.Configuration.UseDarkDashboard();
        
    }

   
}