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

>windows authentication to log into an application

Use WMI or DirectoryServices.

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 ?

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;
        }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.