I've noticed in other Applications like iTunes 6, they use the Windows password to authenticate for different functions. How could I do this in C#? Is there .Net functionality for this in 1.0, 1.1, or 2.0? Or would I need to use some APIs?
Printable View
I've noticed in other Applications like iTunes 6, they use the Windows password to authenticate for different functions. How could I do this in C#? Is there .Net functionality for this in 1.0, 1.1, or 2.0? Or would I need to use some APIs?
Yes. I can't remember exactly where/what to look for but think it is under the System.Authentication namespace.
Well to be more specific you can use the Authentication but you will never be able to get the password as a string. You could use Environment.Username to get the username and similarly Environment.UserDomainName to get the domain name. You could even use System.Security.Principal.WindowsIdentity.GetCurrent() Method to get other things also.Quote:
Originally Posted by kasracer
What exactly are you trying to do?
another way is to determine in which Windows Group the current user is belonging to.
WindowsPrincipal.IsInRole method accepts WindowsBuiltInRole Enum as an argument for representing the local Windows groups.
If I need username and password to connect to proxy. How can i do?