1

I am reading the Asp.net security documentation on msdn.I come across these tow terms and get really confused.

# WindowsIdentity = WindowsIdentity.GetCurrent()

which returns the identity of the security context of the currently executing Win32 thread.

# Thread = Thread.CurrentPrincipal 

which returns the principal of the currently executing .NET thread which rides on top of the Win32 thread.

1 Answer 1

2

There isn't guaranteed to be a one-to-one mapping between operating system threads and .NET threads. Usually you only need to care about the .NET thread. Which OS thread your .NET Thread happens to be running on right now is an implementation detail which you shouldn't rely on.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.