Hangfire.Dashboard.Authorization

Tags: #<Tag:0x00007fafe9c69a30>

Here is my code for authorization. I am using Hangfire.Dashboard.Authorization.

However it doesn’t work and when navigating to the dashboard I am met with a blank screen. If authorization is left out, then I can navigate without issue.

  Dim user = New BasicAuthAuthorizationUser() With { _
                     .Login = "HtYYGReeW12lP", _
                     .PasswordClear = "dfhjhJHJHJK7grE" _
                }
        Dim Users = New List(Of BasicAuthAuthorizationUser)
        Users.Add(user)

        Dim filter = New BasicAuthAuthorizationFilter(New BasicAuthAuthorizationFilterOptions() With { _
             .RequireSsl = False, _
             .LoginCaseSensitive = True, _
             .Users = Users _
        })
        Dim authorizationFilters = New List(Of BasicAuthAuthorizationFilter)
        authorizationFilters.Add(filter)

        app.UseHangfireDashboard("/hangfire", New DashboardOptions() With { _
              .AppPath = "http://mysite.com", _
              .AuthorizationFilters = authorizationFilters _
        })

Blank screen tells us that current user wasn’t authorized to view the page, however your authorization filter configuration looks fine. Please ensure that Microsoft.Owin.Host.SystemWeb package is installed and referenced from your main assembly.

Yes, Microsoft.Owin.Host.SystemWeb is installed and referenced.

So we need to investigate what’s going wrong, since the configuration is fine. Does the credentials prompt window appear? What Hangfire version are you using? Please also list here all the request and response headers, associated with a request to the dashboard by using Fiddler or something like that.

I am using the same code and I am getting “Authentication is Required” message. Can someone help me here ?