is System.Threading.Thread.CurrentPrincipal shared between all users?

时间:2017-12-18 08:37:22

标签: c# multithreading wcf current-principal

I intend to use currentprincipal and I searched that the property is static , so it must be shared, Actually I need it to be different not shared. as I write some code I see the currentprincipal is different after 2 users logged in to application, is it right , can I be sure of being different of the property? Actually my users logged in to application and call my function through WCF! please ask me to clear if my explanation is not enough, thanks in asvance

1 个答案:

答案 0 :(得分:5)

System.Threading.Thread.CurrentPrincipal为当前线程返回IPrincipal。您的用户是否一次使用相同的线程?我想,不。