Abr*_*hin 4 sqlite hangfire asp.net-core
我正在使用带有ASP.NET Core v1.0的 Hangfire.AspNetCore .
我的数据库是SqlLite.
据我所知,.NET Core的hangfire没有适当的SQLite驱动程序.
所以,我决定在没有任何仪表板的情况下工作.
所以,我配置的内容如下:
在Startup.cs中,在ConfigureServices方法中
services.AddHangfire(configuration => {});
Run Code Online (Sandbox Code Playgroud)
在Configure方法中,我正在使用它
app.UseHangfireServer();
Run Code Online (Sandbox Code Playgroud)
但我得到了下一个错误:
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.
Run Code Online (Sandbox Code Playgroud)
我不需要仪表板,所以我没有配置仪表板.
有人可以帮忙吗?
Bra*_*rad 11
该错误告诉您尚未配置作业存储提供程序.它与仪表板无关.即使没有仪表板,您也必须拥有存储提供商.
通过Nuget提供内存存储Hangfire.MemoryStorage,如果您不需要持久存储用于后台作业,则可以使用.