Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I'm trying to get Hangfire working with U9 on the cloud.
I followed the guide: https://www.umbrajobs.com/blog/posts/2021/june/umbraco-9-configuring-hangfire-scheduled-tasks/
But i'm facing a issue (InvalidOperationException: The ConnectionString property has not been initialized.)
Startup.cs
public void ConfigureServices(IServiceCollection services) { services.AddUmbraco(_env, _config) .AddBackOffice() .AddWebsite() .AddComposers() .Build(); services.AddHangfire(c => c.UseSqlServerStorage(_config.GetConnectionString("umbracoDbDSN"))); GlobalConfiguration.Configuration.UseSqlServerStorage(_config.GetConnectionString("umbracoDbDSN")).WithJobExpirationTimeout(TimeSpan.FromDays(7)); } public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IBackgroundJobClient backgroundJobClient, IRecurringJobManager recurringJobManager, IHangfireTasks hangfireTasks) { Standard stuff....... app.UseHangfireServer(); //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.
Hi Henrik
Did you had a look at the package from Sebastiaan here? https://our.umbraco.com/packages/developer-tools/cultivhangfire/
Specifically regarding this line to set JobStorage.Current. I haven't looked at Hangfire in Umbraco 9 yet, but hopefully it will help :) https://github.com/nul800sebastiaan/Cultiv.Hangfire/blob/main/Cultiv.Hangfire/HangfireComposer.cs#L45-L47
JobStorage.Current
/Bjarne
Thanks, I will try to look at that :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Hangire + Umbraco 9 + Cloud, connectionstring issues
Hi,
I'm trying to get Hangfire working with U9 on the cloud.
I followed the guide: https://www.umbrajobs.com/blog/posts/2021/june/umbraco-9-configuring-hangfire-scheduled-tasks/
But i'm facing a issue (InvalidOperationException: The ConnectionString property has not been initialized.)
Startup.cs
}
The tables has been created in the DB.
Hi Henrik
Did you had a look at the package from Sebastiaan here? https://our.umbraco.com/packages/developer-tools/cultivhangfire/
Specifically regarding this line to set
JobStorage.Current
. I haven't looked at Hangfire in Umbraco 9 yet, but hopefully it will help :) https://github.com/nul800sebastiaan/Cultiv.Hangfire/blob/main/Cultiv.Hangfire/HangfireComposer.cs#L45-L47/Bjarne
Thanks, I will try to look at that :)
is working on a reply...