Native Object - System.Directory Services

Discussion in 'ASP .Net' started by Ganesh Ramamurthy, Nov 5, 2004.

  1. 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
     
    Ganesh Ramamurthy, Nov 5, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Showjumper
    Replies:
    2
    Views:
    1,856
    Showjumper
    Aug 2, 2003
  2. =?Utf-8?B?Sm9oYW4gRGVsaW1vbg==?=

    The active directory datatype cannot be converted to/from a native

    =?Utf-8?B?Sm9oYW4gRGVsaW1vbg==?=, May 2, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,798
    =?Utf-8?B?Sm9oYW4gRGVsaW1vbg==?=
    May 2, 2005
  3. Nathan Sokalski
    Replies:
    2
    Views:
    1,156
  4. codeboy
    Replies:
    1
    Views:
    1,593
    Juan T. Llibre
    Jun 8, 2009
  5. Lisa Ngo
    Replies:
    3
    Views:
    501
    Jan Tielens
    Jan 18, 2004
Loading...

Share This Page