For doing asynchronous programming in C#, one needs to understand the concept of SynchronizationContext.
I came across this nice set of posts by Stephen Cleary, where he explains some of the fundamental design choices and best practices.
The primary reason for this line of exploration for me was because of a deadlock I hit when working on a web app using the async pattern. This problem is described here.
- This explains the precisely problem I was hitting
- This is sort of a must-read blog! Fundamentals explained very well.