How do you get credentials (NetworkCredential) of currently logged in user?
have you tried WindowsIdentity.GetCurrent()? you could also look at this example… http://www.codeproject.com/KB/vb/Windows_Service.aspx
have you tried WindowsIdentity.GetCurrent()? you could also look at this example… http://www.codeproject.com/KB/vb/Windows_Service.aspx
They are exactly the same thing, which you can confirm for yourself using a disassembler like Reflector. The only difference is that DefaultNetworkCredentials returns a NetworkCredentials object and and DefaultCredentials casts it to ICredentials. So you have access to more information with a NetworkCredentials object, but which of those you use supply to an object … Read more