AspNetSynchronizationContext

Trying to use new C# 5 async model it was surprising to me AspNetSynchronizationContext is an internal class (as well as AspNetSynchronizationContextBase base). Thus undocumented. But it’s essential to know what it does when utilizing async/await feature within your ASP.NET code. Am I correct that
It does guarantee your continuations will get the same HttpContext.Current as original callers?
It does not guarantee the continuations will execute on the same thread as the callers?

Using ASP.NET Web API, my ExecutionContext isn’t flowing in async actions

I’m having difficulty understanding the mechanics behind ExecutionContext. From what I’ve read online, context-sensitive items such as security (Thread Principal), culture, etc, should flow across asynchronous threads within the bounds of an execution unit of work. I’m encountering very confusing and potentially dangerous bugs though. I’m noticing my thread’s CurrentPrincipal is getting lost across async … Read more

Wrapping synchronous code into asynchronous call

I have a method in ASP.NET application, that consumes quite a lot of time to complete. A call to this method might occur up to 3 times during one user request, depending on the cache state and parameters that user provides. Each call takes about 1-2 seconds to complete. The method itself is synchronous call to the service and there is no possibility to override the implementation.
So the synchronous call to the service looks something like the following:

How do I call an asynchronous process from an asp.net hosted module using C#5 async / await?

I have a long running process that is called via a Nancy Module Get method. Rather than have the browser hang while the process runs I would like this call to be asynchronous, in other words I want the Get method to return right away and leave the long running process to do its thing. I could then check the status of the process at regular intervals and act accordingly.