Activities of "berkansasmaz"

You're welcome. Have a nice day

Closing the issue. Feel free to re-open or create a new issue if you have further questions 😄

The problem is that you have installed Hangfire in ConfigurateurClient.Admin.HttpApi.Host. If you want to use Hangfire in this project, you should edit ConfigureAuthentication similar to ConfigurateurClient.Admin.Blazor, but I don't recommend it. You don't need to open ConfigurateurClient.Admin.HttpApi.Host outside, it can stay internal. Users with ConfigurateurClient.Admin.Blazor admin privileges can access as the UI allows, but they don't need to access ConfigurateurClient.Admin.HttpApi.Host so you don't need to open its URL outside.

As a result, if you want to solve the problem with the least effort and with a more accurate method, you can solve the problem by moving similar codes to ConfigurateurClient.Admin.Blazor. I tried it works, you can see the screenshot below.

The problem should be solved, can you try again?

Got it, you can grant access to this GitHub account.

I am very happy with the information you have given because I understand the problem. But we need to verify, so can you visit the /account/login page and try again after login?

I understand, but you're logged in, right? You can see your account information, or if you are logged in as an admin user, you can visit the page where you can see the list of all users and so on, right? If so, I might need to take a closer look at your project. It's hard to say anything directly.

Yes, because the CurrentUser service is resolved from RequestServices in IsLoggedIn method.

See: https://github.com/abpframework/abp/blob/ba6ded35524cd4f743f263f33ac37cbc8f238fcd/framework/src/Volo.Abp.HangFire/Volo/Abp/Hangfire/AbpHangfireAuthorizationFilter.cs#L38-L45

First of all, UseHangfireDashboard must be before UseConfiguredEndpoints. However, this is not the problem, I tried to reproduce the problem with the information you provided, but I was unsuccessful, here is my code:

ConfigureServices:

    ...
    ...
    ...
    ...
    ConfigureHangfire(context, configuration);

ConfigureHangfire:

    private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddHangfire(config => { config.UseInMemoryStorage(); });
    }

OnApplicationInitialization:

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        var env = context.GetEnvironment();

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.UseAbpRequestLocalization();
        app.UseStaticFiles();
        app.UseAbpSecurityHeaders();
        app.UseRouting();
        app.UseCors();
        app.UseAuthentication();

        if (MultiTenancyConsts.IsEnabled)
        {
            app.UseMultiTenancy();
        }

        app.UseAuthorization();
        app.UseSwagger();
        app.UseAbpSwaggerUI(options =>
        {
            options.SwaggerEndpoint("/swagger/v1/swagger.json", "Admin API");

            var configuration = context.GetConfiguration();
            options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
        });


        app.UseAuditing();
        app.UseAbpSerilogEnrichers();
        app.UseUnitOfWork();
        app.UseHangfireDashboard("/hangfire", new DashboardOptions
        {
            AsyncAuthorization = new[]
                {new AbpHangfireAuthorizationFilter(enableTenant: true, requiredPermissionName: "Admin.HangFire")}
        });
        app.UseConfiguredEndpoints();
    }

When we look at the status code, it returns 401. So, it doesn't see you as authorized, but I think you are logged in. It felt like CurrentUser.IsAuthenticated was returning false somehow. Can you confirm this information by debugging AbpHangfireAuthorizationFilter

Any chance to send the content of your OnApplicationInitialization method? Maybe you have a missing or misordered request-response pipeline.

Showing 371 to 380 of 646 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 16, 2025, 12:13