Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Henrik Sunesen 70 posts 243 karma points
    Oct 10, 2021 @ 15:30
    Henrik Sunesen

    Hangire + Umbraco 9 + Cloud, connectionstring issues


    I'm trying to get Hangfire working with U9 on the cloud.

    I followed the guide:

    But i'm facing a issue (InvalidOperationException: The ConnectionString property has not been initialized.)


       public void ConfigureServices(IServiceCollection services)
            services.AddUmbraco(_env, _config)
            services.AddHangfire(c => c.UseSqlServerStorage(_config.GetConnectionString("umbracoDbDSN")));
     public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IBackgroundJobClient backgroundJobClient, IRecurringJobManager recurringJobManager, IHangfireTasks hangfireTasks)
          Standard stuff.......
            //No Authentication
            app.UseHangfireDashboard("/hangfire", new DashboardOptions()
                AppPath = null,
                DashboardTitle = "Hangfire Dashboard"
            // Recurring Job for every 1 min 
            recurringJobManager.AddOrUpdate("TestScheduledTask : Runs Every 1 Min", () => hangfireTasks.TestScheduledTask(), Cron.Minutely);


    The tables has been created in the DB.

  • Bjarne Fyrstenborg 1236 posts 3664 karma points MVP 5x c-trib
    Oct 10, 2021 @ 17:10
    Bjarne Fyrstenborg

    Hi Henrik

    Did you had a look at the package from Sebastiaan here?

    Specifically regarding this line to set JobStorage.Current. I haven't looked at Hangfire in Umbraco 9 yet, but hopefully it will help :)


  • Henrik Sunesen 70 posts 243 karma points
    Oct 14, 2021 @ 17:16
    Henrik Sunesen

    Thanks, I will try to look at that :)

Please Sign in or register to post replies

Write your reply to: