To understand this, you need to understand what the Synchronization Context and Threading Model are .
. (Win Forms WPF). .
UI .
ConfigureAwait async/await. ,
await DoAsync();
//UI updating code goes here. Will run on UI thread
, ConfigureAwait (false)
await DoAsync().ConfigureAwait(false);
//CPU intensive operation. Will run on thread pool
, ASP.NET. . SynchronizationContext ASP.NET .