【发布时间】:2012-04-15 23:55:33
【问题描述】:
我的客户有这样的结构。
WindowsIdentity wi = WindowsIdentity.GetCurrent();
IntPtr token = wi.Token;
下一步是通过 WCF 将身份验证令牌发送到服务器并在那里模拟用户。
api.SendToken(token);
...
...
...
但是当我在服务器端收到令牌并尝试构建 WindowsIdentity 时,它会抛出一个错误:
WindowsIdentity newId = new WindowsIdentity(token);
Invalid token for impersonation - it cannot be duplicated.
请你们帮我找出我做错了什么并分享你的想法如何将令牌从客户端传递到服务器。
谢谢!
【问题讨论】:
标签: wcf authentication impersonation