Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HangFire dashboard not displaying in PROD

I am using HangFire to schedule jobs but when I deployed to PROD, the website/hangfire url is not working. I am getting The system cannot find the file specified error.

On localhost, I am able to open the URL.

I followed this URL: http://docs.hangfire.io/en/latest/quick-start.html

Anyone know what I am missing.

Thanks

like image 260
mpora Avatar asked Jan 04 '17 22:01

mpora


People also ask

How do you get to Hangfire dashboard?

In Visual Studio 2013 you can add it by right clicking on the project and choosing the Add / OWIN Startup Class menu item. After performing these steps, open your browser and hit the http://<your-app>/hangfire URL to see the Dashboard.

How do I know if my Hangfire job is running?

If you have a job that takes some time and is currently processing/running, in the Hangfire dashboard page, select the “Jobs” item in the top navigation bar. This shows entries for Enqueued, Scheduled, Processing, etc. Click the “Processing” entry, and you should see your currently processing job (or jobs).

How do you start a Hangfire?

To start using Hangfire, install the primary package and choose one of the available storages. After the release of Visual Studio 2017, a completely new way of installing NuGet packages appeared.

What port does Hangfire use?

When the application has started, open the following URL (assuming your app is running on the 5000 port), to access to the Hangfire Dashboard interface. As we can see, our background job was completed successfully.


1 Answers

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. So it is really important to restrict access to the Dashboard.

To make it secure by default, only local requests are allowed, however you can change this by passing your own implementations of the IAuthorizationFilter interface, whose Authorize method is used to allow or prohibit a request. The first step is to provide your own implementation.

http://docs.hangfire.io/en/latest/configuration/using-dashboard.html#configuring-authorization

like image 125
mpora Avatar answered Sep 29 '22 09:09

mpora