How do you get credentials (NetworkCredential) of currently logged in user?

前端 未结 6 2092
夕颜
夕颜 2021-02-05 02:01

I\'m writing some code to utilise a 3rd party component, and I need to supply an object which implements ICredentials when I start to use it.

If I write the following...

6条回答
  •  别跟我提以往
    2021-02-05 02:40

    have you tried WindowsIdentity.GetCurrent()?

    you could also look at this example... http://www.codeproject.com/KB/vb/Windows_Service.aspx

提交回复
热议问题