【发布时间】:2019-05-25 01:19:07
【问题描述】:
这不起作用private static WindowsImpersonationContext impersonationContext;
我需要能够做到这一点
tempWindowsIdentity = new WindowsIdentity(tokenDuplicate);
impersonationContext = tempWindowsIdentity.Impersonate();
然后这个
if (impersonationContext != null)
{
impersonationContext.Undo();
impersonationContext = null;
}
我在看这个问题/答案:WindowsImpersonationContext & Impersonate() not found in ASP.Core
但是,这似乎不是一个很好的匹配,是吗?
【问题讨论】:
标签: asp.net-core .net-core asp.net-core-mvc impersonation asp.net-core-2.1