NServiceBus/NServiceBus — pull request #139 by jonathanptew (2011-10-17 03:24:19+00:00)
Title: Duplicate Identity Exception

Passing a user token for a new WindowsIdentity results in a duplicate identity exception in some use cases primarily if the token represents the Current Windows Identity. There may be others.

Using WindowsIdentity.GetCurrent() instead of passing the token avoids this issue with the current identity. You can't compare tokens as they change intermittently so this could still happen with the Current Identity but at least the explicit WindowsIdentity.GetCurrent().Token is avoided now.