locked
Problem with executing simple ldap query RRS feed

  • Question

  • User933406816 posted

    Hello every one,

    I'm facing a problem using the System.DirectoryServices.DirectoryEntry class. All what I'm trying to do is the following

    System.DirectoryServices.DirectoryEntry AD = new System.DirectoryServices.DirectoryEntry("LDAP://dc/","domain\\user","password",System.DirectoryServices.AuthenticationTypes.None);

    I'm getting the following exception

    <error: an exception of type: {System.Runtime.InteropServices.COMException} occurred> System.DirectoryServices.Interop.UnsafeNativeMethods.IAds

    Any one has any ideas??

    Monday, January 30, 2006 2:48 AM

All replies

  • User1354132231 posted
    You have to be doing more than that to get an error.  The bind is not initiated until you actually use the DirectoryEntry object.  What else are you doing?  BTW, you should definitely use .Secure authentication unless this is ADAM and you are just playing around.  In that case, your connection string looks suspect.
    Thursday, February 2, 2006 10:42 AM