What is Thread.CurrentPrincipal, and what does it do?
Thread.CurrentPrincipal is the way .NET applications represent the identity of the user or service account running the process. It can hold one or more identities and allows the application to check if the principal is in a role through the IsInRole method. Most authentication libraries in .NET will verify the user’s credentials and set this … Read more