|
-
December 24th, 2005, 03:30 AM
#1
Using the Windows Username and Password
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?
-
December 25th, 2005, 06:37 PM
#2
Re: Using the Windows Username and Password
Yes. I can't remember exactly where/what to look for but think it is under the System.Authentication namespace.
Mike
-
December 26th, 2005, 07:43 AM
#3
Re: Using the Windows Username and Password
 Originally Posted by kasracer
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?
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.
What exactly are you trying to do?
-
December 26th, 2005, 10:54 AM
#4
Re: Using the Windows Username and Password
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.
-
March 6th, 2006, 03:02 AM
#5
Re: Using the Windows Username and Password
If I need username and password to connect to proxy. How can i do?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|