hangfire dashboard on staging machine throws a 401 Unauthorized
sam
378
Points
48
Posts
|
I'm using hangfire in .netcore api project. Everything working fine but dashboard not appearing on staging environment. In the local machine it's working fine. On staging is showing "HTTP ERROR 401". 401 means unauthorised access. You need setup authorization mechanism in your code. - beginer 15-Jun-2018 04:54
|
Smith
2890
Points
78
Posts
|
Hi, I also have read the documentation about authorization but didn’t understand how to allow access to everybody or what users and roles are mentioned in docs?
where are they being created and managered?
Posted On:
23-Jun-2018 06:11
|
Jak
908
Points
132
Posts
|
Posted On:
23-Jun-2018 06:14
|
Brian
2376
Points
13
Posts
|
Interface IDashboardAuthorizationFilter available, we can implement it something like (Basic Authentication):
Following is user credential class:
And in the startup.cs add following code:
Posted On:
16-May-2020 09:47
|
Rahul M...
4916
Points
27
Posts
|
Hangfire Dashboard exposes sensitive information about your background jobs, including method names and serialized arguments as well as gives you an opportunity to manage them by performing different actions – retry, delete, trigger, etc. We can follow instruction given on configuring-authorization Also, provides Hangfire.Dashboard.Authorization package for basic access authentication-based (simple login-password auth) as well as User, role and claims -based authorization. See in Hangfire.Dashboard.Authorization Install a NuGet Package:
So, we don’t want to reinvent the wheel. Just install this package and follow as: Basic Authorization (simple login-password auth): Add/modified following in Startup.cs in Configuration section:
Posted On:
16-May-2020 11:49
|