Activities of "themisoft"

The program runs now!

Thank you so much. Does this mean that the ABP CLI installs the package in the wrong project?

Hello,

Removing context.Services.AddHangfireServer(); did not work sadly. I will send you the entire project.

  • ABP Framework version: v8.1.3
  • UI Type: Blazor Server
  • Database System: PostgreSQL
  • Tiered (Auth/Blazor/ApiHost): Yes
  • Exception message and full stack trace:
 `Started background worker: Volo.Abp.OpenIddict.Tokens.TokenCleanupBackgroundWorker
2024-06-20 17:06:41.303 +02:00 [FTL] HangfireTest.AuthServer terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.Hangfire.AbpHangfireModule, Volo.Abp.HangFire, Version=8.1.3.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating λ:Volo.Abp.Hangfire.AbpHangfireBackgroundJobServer -> λ:Hangfire.JobStorage.. See the inner exception for details.
 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Volo.Abp.Hangfire.AbpHangfireBackgroundJobServer -> λ:Hangfire.JobStorage.
 ---> System.InvalidOperationException: Current JobStorage instance has not been initialized yet. You must set it before using Hangfire Client or Server API. For .NET Core applications please call the IServiceCollection.AddHangfire extension method from Hangfire.NetCore or Hangfire.AspNetCore package depending on your application type when configuring the services and ensure service-based APIs are used instead of static ones, like `IBackgroundJobClient` instead of `BackgroundJob` and IRecurringJobManager instead of RecurringJob.
  • Steps to reproduce the issue:

I'm fairly new to background jobs, so I might be missing something. I managed to get the default ABP background jobs running, so I decided to install Hangfire for future scalability as our system grows more complex. However, after many attempts, I couldn't get it to work in our project. To troubleshoot, I decided to try it in a fresh project. Despite following the ABP documentation and searching online for similar issues, I couldn't find a solution to start my project with Hangfire.

These are the packages I installed in the HttpApi.Host project:

  • Hangfire.PostgreSql
  • Hangfire.Core

This is all the code I added to the HttpApi.Host project:

[DependsOn(
    typeof(AbpBackgroundJobsHangfireModule),
    typeof(AbpHangfireModule)
    )]
    
public override void ConfigureServices(ServiceConfigurationContext context)
{
    var configuration = context.Services.GetConfiguration();
    var hostingEnvironment = context.Services.GetHostingEnvironment();
    ...
    ConfigureHangfire(context, configuration);
    ...
}

    private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddHangfire(config =>
        {
            config.UsePostgreSqlStorage(options =>
            {
                options.UseNpgsqlConnection(configuration.GetConnectionString("Default"));
            });
        });

        context.Services.AddHangfireServer();
    }
    
    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        ...
        app.UseAbpHangfireDashboard();
        app.UseConfiguredEndpoints();
    }

I tried many workarounds, such as adding more Hangfire packages or attempting to initialize JobStorage before the Auth server tries to use it. However, I still don't fully understand the issue.

Hello, I'm trying to inject the "ISettingManager" into a .razor page: When i do it this way, i get the error, that the Service is not registered:

It worked in a non-tiered Solution, that i was testing a few months ago.

What i tried:

  • Adding the Service manually (via. AddScoped, AddSingelton etc.) in the Blazor Module "ConfigureServices" Method. This led to more complex Errors
  • Adding [DependsOn(typeof(AbpSettingManagementDomainModule))]. This also led to more complex Errors.
  • Removing the ISettingManager removes the Error, the ISettingProvider works fine.

What this code is supposed to to do:

  • Saves a Filepath.

  • ABP Framework version: v8.0.2
  • UI Type: Blazor Server
  • Database System:PostgreSQL
  • Tiered Blazor Server (Auth,Blazor,ApiHost Server): yes
Showing 1 to 4 of 4 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11