Dashboard Authorization

I’m configuring the Hangfire dashboard for production and I’m trying to set up authorization. My app uses cookie authentication and CastleWindsor. I’m using claims and roles/permissions are in place.

I’ve confirmed that the dashboard works by placing the call to UseHangfireDashboard before my cookie authentication methods in my OWIN Startup class. The user isn’t authenticated at this point, so all users have access to it.

When I place a call to the UseHangfireDashboard method after my cookie authentication methods (as per the Hangfire instructions), my app crashes as it cannot detect a controller for the /hangfire path, because there isn’t one of course.

I can’t help thinking I’m missing something obvious here, but I just can’t see it. I’m hoping someone might have successfully configured the dashboard in an MVC app in similar circumstances?

Thanks in advance…