Native Object - System.Directory Services

  • Thread starter Ganesh Ramamurthy
  • Start date
G

Ganesh Ramamurthy

Hi Experts,

I am using System.DirectoryServices to authenticate my users who are in the
LDAP. I am using the Active Directory Users in my web application.

I am creating the native object to authenticate the users. I am using the
following code

DirectoryEntry oUserDE = new DirectoryEntry(strPath, strUserID,
strPassword);

try
{
// Bind to the native object to force authentication to happen
Object native = oUserDE.NativeObject;
}
catch (Exception Ex)
{
throw new Exception("User not authenticated.", Ex);
}

However, some of the users are not authenticated with this method.

Object native = oUserDE.NativeObject; // fails for some users
and an exception is thrown.

However, I can authenticate the same user from my windows 2k3 and also from
another old ASP application which uses ADO to query the same LDAP.

Can anyone tell me the reason for such a behaviour and the resolution for
that.

Thanks in advance
Regards
Ganesh
 

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,013
Latest member
KatriceSwa

Latest Threads

Top