Authentication via Active Directory unsuccessfull

G

Guest

I'm unable to authenticate a username\password using Active Directory, when
I run the aspx code below,

even though I can login to the domain controller with username\password.

When I run the following code, I receive the message


"System.Exception: Error authenticating user. Unknown error (0x80005000)"


private void Page_Load(object sender, System.EventArgs e)\
{

String adPath = "ldap://coname.com/dc=coname,dc=com";
DirectoryEntry entry = new
DirectoryEntry(adPath,"coname\administrator","pwd1");

try
{
//Bind to the native AdsObject to force authentication.
Object obj = entry.NativeObject;
}

catch (Exception ex)
{
throw new Exception("Error authenticating user. " + ex.Message);
}
}
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top