System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.ThreadContext.AssociateWithCurrentThread(System.Boolean setImpersonationContext) at offset 20 at System.Web.HttpApplication.OnThreadEnterPrivate(System.Boolean setImpersonationContext) at offset 12 at System.Web.HttpApplication.System.Web.Util.ISyncContext.Enter() at offset 0 at System.Web.Util.SynchronizationHelper.SafeWrapCallback(System.Action action) at offset 24 at System.Threading.Tasks.Task.Execute() at offset 16
线程同步上下文
默认情况下,当未完成的 Task 时,会捕获当前线程上下文,在 Task 完成时使用该上下文恢复方法的执行。 当 async 方法内的 await 执行完成时,它会尝试获取调用者线程所在的上下文执行方法的剩余部分, 但是该上下文已含有一个线程,该线程在等待 async 方法完成。然后它们相互等待。
http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
https://blogs.msdn.microsoft.com/alazarev/2017/05/20/fun-with-configureawait-and-deadlocks-in-asp-net/
https://www.cnblogs.com/cmt/p/configure_await_false.html
https://blog.csdn.net/zhanglong_longlong/article/details/79712371
https://blog.csdn.net/WPwalter/article/details/79673214