Query on User Authentication aganist ADS

A

apondu

Hi

I have a query, i have put the code here.

I am using VS 2005, C#.Net.

This is working fine when i am install the Win OS 2003 with ADS, but

after few days it starts entering the exception and gives the message
"

Logon Failure : unknown user name or bad password"

I am a bit confused and want to know the reason for this.

Can someone help me and let me know the reason and solution for this

because i cann't reinstall the OS all the time.


// Start of Code


using (DirectoryEntry deDirEntry = new

DirectoryEntry("LDAP://" + UserDomainTextBox.Text,


UserNameTextBox.Text,


UserPassTextBox.Text,


AuthenticationTypes.Secure))

try
{
string name = deDirEntry.Name.ToString();

MessageBox.Show("Welcome to '" + deDirEntry.Name
+

"'");

}
catch (Exception exp)
{
MessageBox.Show("Sorry, Invalid User");

}

// End of Code


Thanks for the help

Regards,
Govardhan
 
G

Guest

Hi

I have a query, i have put the code here.

I am using VS 2005, C#.Net.

This is working fine when i am install the Win OS 2003 with ADS, but

after few days it starts entering the exception and gives the message
"

Logon Failure : unknown user name or bad password"

I am a bit confused and want to know the reason for this.

Can someone help me and let me know the reason and solution for this

because i cann't reinstall the OS all the time.

// Start of Code

using (DirectoryEntry deDirEntry = new

DirectoryEntry("LDAP://" + UserDomainTextBox.Text,

UserNameTextBox.Text,

UserPassTextBox.Text,

AuthenticationTypes.Secure))

try
{
string name = deDirEntry.Name.ToString();

MessageBox.Show("Welcome to '" + deDirEntry.Name
+

"'");

}
catch (Exception exp)
{
MessageBox.Show("Sorry, Invalid User");

}

// End of Code

Thanks for the help

Regards,
Govardhan

Govardhan, did you check if account is not locked?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top