I am using Hangfire.AspNetCore with ASP.NET Core v1.0.
My Database is SqlLite.
As far as I found, there is no proper SQLite driver for hangfire for .NET Core.
So, I decided to work without any dashboard.
So, what I have configured is like the following:
In Startup.cs, in ConfigureServices
method
services.AddHangfire(configuration => {});
And in Configure
method, I am using this
app.UseHangfireServer();
But I am getting the next error:
An exception of type 'System.InvalidOperationException' occurred in Hangfire.Core.dll but was not handled in user code
Additional information: JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API.
I don't need dashboard, so I did not configured dashboard.
Can anyone please help?
The error is telling you that you have not configured a job storage provider. It's got nothing to do with the dashboard. Even without the dashboard you must have a storage provider.
There is in-memory storage available via Nuget called Hangfire.MemoryStorage
that you can use if you don't require persistent storage for your background jobs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With