app.Use(async (context,next) => { var sc = System.Threading.SynchronizationContext.Current; if (sc == null) { throw new Exception("SynchronizationContext is null"); }
I think it was also doing something with the current culture but I am not sure how that is handled Now.