Saturday, 15 January 2011

.net - What "Current" properties flow with ExecutionContext -


This is a two-part question:

  1. Can a list provide Is ASP.NET / .NET properties that are usually local threads that flow with ExecutionContext?

    HttpContext.Current? Thread.CurrentContext? Thread.CurrentPrincipal?

  2. Is there present? Will the application flow automatically with the execution consoles in any way to add specific reference information? Something like this

      var ec = ExecutionContext.Capture (); E.CustomContext ["MyCustomContext"] = ACustomContext;      

    The best resource for this is Stephen Toub . There is no list of such properties that are looking for you.

    ASP.NET actually uses the SynchronizationContext flow of HttpContext.Current , and.

    You can add your own reference using LogicalSetData / LogicalGetData . However, you should only store temporary data. I document this.

No comments:

Post a Comment