In the constructor of my WCF service class, I set the current director as the main one passed in the message header:
Thread.CurrentPrincipal = OperationContext.Current.IncomingMessageHeaders.GetHeader<BBPrincipal>("bbPrincipal", "ns");
Everything seems to be working fine, however, when I came to the principal link in the method, Thread.CurrentPrincipal returned to WindowsPrincipal.
Presumably, this method runs in a different thread. How can I guarantee that a method uses the main set in the service constructor?
source
share