开发者

Client username/windowsIdentity from web service

开发者 https://www.devze.com 2023-02-10 09:36 出处:网络
How can I fetch client\'s WindowsIdentity from 开发者_开发技巧web service without impersonating?

How can I fetch client's WindowsIdentity from 开发者_开发技巧web service without impersonating?

What are the advantages and disadvantages of impersonation?


Add a reference to System.Web and use below code:

HttpContext.Current.User.Identity.Name


Impersonation lets a service call something else while acting as the user who called the service. To just get the identity of the user calling the service, you don't need impersonation (but you do need authentication enabled).

0

精彩评论

暂无评论...
验证码 换一张
取 消