ASP.NET HttpContext in async/await patterns using the Task Parallel Library – Part 3

The SynchronizationContext (SC) is a vital component for the ASP.NET request lifecycle and it is strictly coupled to the HttpContext. In the previous posts we saw how running asynchronous operations by using specific TPL patterns might lead to losing the SynchronizationContext and, thus, reference to the HttpContext. Such a behavior can impact applications in several…


ASP.NET HttpContext in async/await patterns using the Task Parallel Library – Part 1

Hopefully brief but yet needed introduction For a long time, when ASP and ASP.NET WebForms were the latest trend, web developers had to rely mainly on synchronous programming. After all, server computing can count on multithreading and it’s free from UI thread freezes. While users don’t normally accept a client application freezing the UI for…