Getting NetworkCredential for current user (C#)

后端 未结 2 462
天命终不由人
天命终不由人 2020-11-30 03:38

I\'m trying to invoke a webservice from a console application, and I need to provide the client with a System.Net.NetworkCredential object.
Is it possible t

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 04:21

    You can get the user name using System.Security.Principal.WindowsIdentity.GetCurrent() but there is not way to get current user password!

提交回复
热议问题