在ASP.NET Core 1.0网站中,SynchronizationContext是否为空? 在我的系统上,此代码会抛出异常:
app.Use(async (context, next) =>
{
var sc = System.Threading.SynchronizationContext.Current;
if (sc == null)
{
throw new Exception("SynchronizationContext is null");
}