CallContext on ASP.Net

time to read 1 min | 165 words

I'm very fuzzled at the moment, I just run into the CallContext class, and I'm pretty confused.

I'm a pretty heavy use of Context bound items, and I usually need to bind to the current request in asp.net or to the current thread. I even create a class to make it easier. It looks like CallContext does the same thing, but it is built into the framework.

From googling around, it looks like in 1.1, it was the way HttpContext was implemented, and from Reflecting over 2.0, it seems that there is a special HostContext property in the IllogicalCallContext that is used for this.

So, the question is if it safe to use CallContext to store items that are bound to the current operation, where an operation is bound to either a thread or a web request? It looks like it is safe in 1.1, but I don't know about 2.0...