This is not working private static WindowsImpersonationContext impersonationContext;
I am needing to be able to do this
tempWindowsIdentity = new WindowsIdentity(tokenDuplicate);
impersonationContext = tempWindowsIdentity.Impersonate();
And then this
if (impersonationContext != null)
{
impersonationContext.Undo();
impersonationContext = null;
}
I was looking at this question/answer: WindowsImpersonationContext & Impersonate() not found in ASP.Core
However that doesn't seem to be a good match, does it?