public Task OnUnhandledExceptionAsync(ExceptionDispatchInfo exceptionInfo)
{
LogErrorAndFlush("An unhandled exception has occurred. Host is shutting down.", exceptionInfo.SourceException);
HostingEnvironment.InitiateShutdown();
return Task.CompletedTask;
}