Is SynchronizationContext null in 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");
}
It is gone in ASP.NET 5 as you don't need its functionality. Its whole purpose was to flow HttpContext.Current which is gone.
I think it was also doing something with the current culture but I am not sure how that is handled now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With