1

I have the code in application like

var principal = new GenericPrincipal(currentIdentity, roles);
        Thread.CurrentPrincipal = principal;

but problem is when my application runs some threads are created automatically but there principle is not same as above one. How to set that?

D J
  • 6,908
  • 13
  • 43
  • 75
  • Setting Thread.CurrentPrincipal propagates the principal to all child threads during the time of creation. Are these other threads not created by the thread which sets the principal? – coder_bro Dec 27 '12 at 07:17
  • actually I am using MEF and Prism. I dont have control over threads creation. – D J Dec 27 '12 at 08:22

0 Answers0