# Hangfire Dashboard broken after deployment

**URL:** <https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271>\
**Category:** bug?\
**Tags:** dashboard\
**Created:** [April 24, 2020, 2:46pm UTC](https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271 "2020-04-24T14:46:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raj\_yadav](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/raj_yadav/32/2056_2.png) [@raj\_yadav](https://discuss.hangfire.io/u/raj_yadav)\
**Post date:** [April 24, 2020, 2:46pm UTC](https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271/1 "2020-04-24T14:46:32Z")

</div>

i am using hangFire with .Net Core 3.1. Dashboard was working fine on local but when we deployed on Production Linux server container it got broken, I guess CSS was missing.

I am not able to resolve this problem. Please help.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/hangfire/original/2X/d/dcfdb83312cb791009881c3f1ece70e2792a3919.png)

Thanks

!

---

<div class="post-metadata">

**Author:** ![raj\_yadav](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/raj_yadav/32/2056_2.png) [@raj\_yadav](https://discuss.hangfire.io/u/raj_yadav)\
**Post date:** [May 8, 2020, 4:50am UTC](https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271/2 "2020-05-08T04:50:54Z")

</div>

I finally found the solution by my self, issue was with url of css and js, after deploying it to containers our nginx was adding prefix url to navigate to job.

ex- url on local was - [http://localhost:3200/Hangfire](http://localhost:3200/Hangfire)  
url for css - [http://localhost:3200/Hangfire/10700cs](http://localhost:3200/Hangfire/10700cs)

after deployment job url -[http://server.com/jobs/Hangfire](http://server.com/jobs/Hangfire)

here “jobs” is the prefix url.

url for css - [http://server.com/Hangfire/10700CS](http://server.com/Hangfire/10700CS) -\>“this was the problem” hangfire was not adding the correct route prefix for css

correct url was - [http://server.com/jobs/Hangfire/10700CS](http://server.com/jobs/Hangfire/10700CS)

to fix this from container you have to manage it to point to correct url (which i don’t know how to do it)

but from code we can do it as-

```
    app.Use((context, next) =>
    {
        // note : comment this to debug locally 
        context.Request.PathBase = Configuration["HangfireConnection:perfix"];
        return next();
    });
    app.UseHangfireDashboard("/Hangfire", new DashboardOptions
    {
        Authorization = new[] { new AuthorizationFilter() }
    })
    .UseHangfireServer();

```

first add prefix in config and read it from code or you can directly pass it as well 😄  
`context.Request.PathBase = "jobs";`

hope it helps

Thanks,

Raj

---

<div class="post-metadata">

**Author:** ![programadriano](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/programadriano/32/2635_2.png) [@programadriano](https://discuss.hangfire.io/u/programadriano)\
**Post date:** [July 30, 2021, 7:38pm UTC](https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271/3 "2021-07-30T19:38:32Z")

</div>

thanks @raj_yadav it works very well

---

<div class="post-metadata">

**Author:** ![Samir\_Matkar](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/samir_matkar/32/2947_2.png) [@Samir\_Matkar](https://discuss.hangfire.io/u/Samir_Matkar)\
**Post date:** [June 22, 2022, 8:56am UTC](https://discuss.hangfire.io/t/hangfire-dashboard-broken-after-deployment/7271/4 "2022-06-22T08:56:54Z")

</div>

Thanks raj yadav, this works for me
