This is a two part question:
Can someone provide a list of the ASP.NET/.NET properties that are typically thread local that flow with ExecutionContext?
HttpContext.Current?
Thread.CurrentContext?
Thread.CurrentPrincipal?
Thread.CurrentCulture?
What properties can I count on surviving/persisting async/await?
What else?
Is there any way to add application specific Context information that will flow automatically with ExecutionContext? Something like
var ec = ExecutionContext.Capture();
ec.CustomContext["MyCustomContext"] = ACustomContext;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…