Query on User Authentication aganist ADS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • apondu

    Query on User Authentication aganist ADS

    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://" + UserDomainTextB ox.Text,


    UserNameTextBox .Text,


    UserPassTextBox .Text,


    AuthenticationT ypes.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

Working...