User-507696518 posted
public async Task<ActionResult> TestModelBinder(CancellationToken cancellationToken)
{
await Task.Delay(1);
var x = System.Web.HttpContext.Current;
return Content("test");
}
this
is one of action
in
my controller,and
when the
SynchronizationContext.Current
type is
LegacyAspNetSynchronizationContext,the
variable x will be null!but
when
the
SynchronizationContext.Current
type is
AspNetSynchronizationContext,the
variable x will
not be
null.
I want to know what is the cause of it.thanks.