更新时间:2023-11-07 21:58:22
设置您的服务以使用模拟。
Setup your service(s) to use Impersonation. This way they will take on the identity of the service client.
设置完成后,您可以像下面这样获得调用者的Windows身份:
Once this is setup, you can get the caller's Windows Identity like this:
WindowsIdentity callerWindowsIdentity = ServiceSecurityContext.Current.WindowsIdentity;
查看这篇博客文章,看看它是否能帮助你。
Check out this blog post and see if it helps you out.