我在使用Hangfire时,进入Hangfire看板页面的时候出现错误提示,虽然不影响使用。有没有人知道问题怎么解决
错误提示
Hangfire.MySql.MySqlStorage: Error: An item with the same key has already been added. Key: sslMode
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddHangfire(configuration => configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseStorage(new MySqlStorage(Configuration.GetConnectionString("Default"), new MySqlStorageOptions
{
DashboardJobListLimit = 1000
}
)));
services.AddHangfireServer();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHangfireDashboard(); //使用hangfire面板
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}