954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Windows authentication

Hi, i'm tryin to use windows authentication to log into an application i have made. I have already worked out how to get the username but i can't figure out how to get the password too.

Is this possible ? if so can anyone suggest any ways to do this or any tutorials please ?

Any suggestions would be great.

Thanks

Chris

ChrisHunter
Posting Whiz in Training
276 posts since Feb 2011
Reputation Points: 36
Solved Threads: 28
 

>windows authentication to log into an application

Use WMI or DirectoryServices.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Can you get the username as well as the password of the user currently logged in by using WMI or DirectorySetvices ?

My app is just a windows form app and not ASP or a web app is that would make any difference to you suggestion ?

ChrisHunter
Posting Whiz in Training
276 posts since Feb 2011
Reputation Points: 36
Solved Threads: 28
 

This is what i used to get the Windows identity of the user currently logged in.

System.Security.Principal;

    public partial class CLogin : Form
    {
        public void getName()
        {
            string name = WindowsIdentity.GetCurrent().Name.ToString();
            textBox1.Text = name;
        }
}
ChrisHunter
Posting Whiz in Training
276 posts since Feb 2011
Reputation Points: 36
Solved Threads: 28
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: