views:

97

answers:

1

Is it possible to pass a customer SecurityPrincipal reference on a main thread to other child threads? Is there any way to pass value-type information to the various threads via a context of some kind? This is running in a WCF environment where I want to run parallel code but find myself constantly resetting security information on each thread. I don't want it to be something I have to explicitly pass around as you run parallel tasks.

Thanks, JEB

+1  A: 

Is the child thread already running when the custom principal is assigned? I just did a simple test which seemed to confirm what I already thought I knew, which is that the Thread.CurrentPrincipal is propagated to the child thread when the child thread is started.

Daniel Pratt