Starts in:
1 DAY
12 HRS
36 MIN
43 SEC
Starts in:
1 D
12 H
36 M
43 S
Open Closed

How to add HangFire dashboard in a consoleapp/service #4100


User avatar
0
andmattia created

How can I add a HangFire Dashboar to my console APP/winService?


5 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, you can not add Hangfire Dashboard into a console application. Please see the documentation for related configurations on the asp.net core application.

    Best Regards.

  • User Avatar
    0
    andmattia created

    Hi

    I found this possibile solution

    .ConfigureWebHostDefaults(builder =>
                {
                    builder.Configure(app =>
                    {
                        app.UseRouting();
    
                        app.UseHangfireDashboard();
                        app.UseEndpoints(endpoints =>
                        {
                            endpoints.MapHangfireDashboard();
                        });
                    });
                })
    
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi

    I found this possibile solution

    .ConfigureWebHostDefaults(builder => 
                { 
                    builder.Configure(app => 
                    { 
                        app.UseRouting(); 
     
                        app.UseHangfireDashboard(); 
                        app.UseEndpoints(endpoints => 
                        { 
                            endpoints.MapHangfireDashboard(); 
                        }); 
                    }); 
                }) 
    

    When you do that your application becomes a web application, you are configuring a web host you can do this if it's not causing any problems for you.

  • User Avatar
    0
    andmattia created

    Hi I know but I don't found any other solution

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi I know but I don't found any other solution

    If you want to see the hangfire dashboard which corresponds to a web page, you should do it as you mentioned above (i mean you should go with a web application instead of a console application).

    I close the question since this is not a question that is fully related to ABP Framework. Best Regards.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06