Open Closed

Problem with /ui access on webfarms? #8387


0
AidanCostcoAU created

We have been running our applications (core with angular) on IIS webfarms (with Redis cache), with round robin request routing. From an angular app this has been fine, however we started using Hangfire, and regularly need to access the /ui portal into that. We have found that this does not play well with the webfarm as we want to use it. With the current request routing, it is near impossible to authenticate and reach the underlying /ui sites. Right now, we have converted to client affinity which allows the /ui to work, but defeats the intention of our load balancing. I suspect the /ui authentication path is using data which is not kept in the shared cache (redis), so underlying links are not authenicated when requests cross servers. Any guidance to fix (or an actual fix) would be helpfull. thanks


3 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @aidancostcoau

    Sorry for my late reply. Could you share how did you enable Hangfire dashboard on your app ?

    Thanks,

  • 0
    AidanCostcoAU created

    In WebConsts changed: HangfireDashboardEnabled = true;

    We have also added some additional job queues in startup.cs, but otherwise using existing code

    if (WebConsts.HangfireDashboardEnabled)
            {
                //Hangfire dashboard &server(Enable to use Hangfire instead of default job manager)
                app.UseHangfireDashboard(WebConsts.HangfireDashboardEndPoint, new DashboardOptions
                {
                    Authorization = new[] { new AbpHangfireAuthorizationFilter(AppPermissions.Pages_Administration_HangfireDashboard) }
                });
                //axg add our own job queues by setting custom options
                var options = new BackgroundJobServerOptions
                {
                    Queues = new [] {"acereporting","fuelreporting", "fuel", "default"}
                };
                app.UseHangfireServer(options);
            }
            
    

    In prod we are on 6.8, but I get the same results testing with 7.3.1

  • 0
    ismcagdas created
    Support Team

    Hi,

    *.Host project uses cookies for authentication, so it shouldn't be related to Redis. Do you still have this problem ?

    Thanks,