Hangfire and WPF?

Hey guys.

I did a presentation about Hangfire working with ASP.NET Core applications and I was asked if it is possible to hookup Hangfire with a WPF application.

If so, any hints, tips or links?

Thanks!

Hangfire’s server part doesn’t care what type of application it is running in. Some jobs may care about thread apartment state (if they’re using COM), but other than that, it is all the same.

You can also use WebBrowser control to display dashboard, but you’ll need to setup OWIN in-process hosting to do that.

Of course, there’s no handy extension methods like UseHangfireServer() or UseHangfireDashboard(), so you’ll need to implement startup/shutdown logic from scratch.

But I actually don’t see any benefits from using Hangfire here, because the processing would stop once you close your application. You may as well use .NET async Tasks to do background/delayed jobs without freezing your UI.

@pieceofsummer thanks for your reply!!

I think the idea is to use WPF to create the Jobs and then another application (Console, Windows Service) as Hangfire Server.

Thoughts?