开发者

Client username/windowsIdentity from web service

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜