In my two release builds (Stage & Production), the app will hard crash to an azure 502 error whenever I try and hit the hangfire dashbaord. The same code built in debug works (dev) has no issue hitting the dashboard. Locally I have tried a few things to reproduce the issue via release builds and have been unable to reproduce.
The stack overflow log looks something like:
FaultingExceptionFrame
HelperMethodFrame
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware1+<Invoke>d__5[[System.__Canon, mscorlib]].MoveNext() System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback, System.Object, System.Threading.Tasks.Task ByRef) System.Threading.Tasks.Task.FinishContinuations() System.Threading.Tasks.Task.Finish(Boolean) System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].TrySetException(System.Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].SetException(System.Exception) Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware1+d__5[[System.__Canon, mscorlib]].MoveNext()
HelperMethodFrame
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware1+<Invoke>d__5[[System.__Canon, mscorlib]].MoveNext() System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run() System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback, System.Object, System.Threading.Tasks.Task ByRef) System.Threading.Tasks.Task.FinishContinuations() System.Threading.Tasks.Task.Finish(Boolean) System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].TrySetException(System.Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult, mscorlib]].SetException(System.Exception) Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware1+d__5[[System.__Canon, mscorlib]].MoveNext()
HelperMethodFrame