ASP.NET Core 1.0 SynchronizationContext

Is SynchronizationContext null on an ASP.NET Core 1.0 website? This code throws an exception on my system:

app.Use(async (context, next) => { var sc = System.Threading.SynchronizationContext.Current; if (sc == null) { throw new Exception("SynchronizationContext is null"); } 
+6
source share
1 answer

It disappeared in ASP.NET 5 since you do not need its functions. His goal was the HttpContext.Current thread that left.

I think this also did something with the current culture, but I'm not sure how it is handled now.

+12
source

All Articles