After upgrade to most recent Hangfire one of our tenant is unable to access dashboard overview with error:
InvalidOperationException: Sequence contains more than one element
System.Linq.ThrowHelper.ThrowMoreThanOneElementException()
System.Linq.Enumerable.TryGetSingle<TSource>(IEnumerable<TSource> source, out bool found)
System.Linq.Enumerable.Single<TSource>(IEnumerable<TSource> source)
Hangfire.SqlServer.SqlServerStorage+<>c.<.cctor>b__56_10(DbConnection connection)
Hangfire.SqlServer.SqlServerStorage.UseConnection<T>(DbConnection dedicatedConnection, Func<DbConnection, T> func)
Hangfire.SqlServer.SqlServerStorage+<>c.<.cctor>b__56_3(RazorPage page)
Hangfire.Dashboard.Pages.BlockMetric.Execute() in _BlockMetric.cshtml
+
var metric = DashboardMetric.Func(this);
Hangfire.Dashboard.RazorPage.TransformText(string body) in RazorPage.cs
+
Execute();
Hangfire.Dashboard.RazorPage.ToString() in RazorPage.cs
+
return TransformText(null);
Hangfire.Dashboard.HtmlHelper.RenderPartial(RazorPage partialPage) in HtmlHelper.cs
+
return new NonEscapedString(partialPage.ToString());
Hangfire.Dashboard.HtmlHelper.BlockMetric(DashboardMetric metric) in HtmlHelper.cs
+
return RenderPartial(new BlockMetric(metric));
Hangfire.Dashboard.Pages.HomePage.Execute() in HomePage.cshtml
+
@Html.BlockMetric(metric)
Hangfire.Dashboard.RazorPage.TransformText(string body) in RazorPage.cs
+
Execute();
Hangfire.Dashboard.RazorPage.ToString() in RazorPage.cs
+
return TransformText(null);
Hangfire.Dashboard.RazorPageDispatcher.Dispatch(DashboardContext context) in RazorPageDispatcher.cs
+
return context.Response.WriteAsync(page.ToString());
Hangfire.Dashboard.AspNetCoreDashboardMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Configurations of all tenants is the same, only that one is failing. Other views are accessible.