path for DirectoryEntry

Discussion in 'ASP .Net Security' started by Guest, Mar 15, 2005.

  1. Guest

    Guest Guest

    Hi All

    I have a directory server hosting multiple OUs, and I found that all the
    users I created under each OU will not appear under "Users" folder, which
    looks fine to me until now. I am working on an ASP.NET application which
    would allow a selected user from each OU to login and to update profiles of
    users' of his/her own OU.
    To authenticate the user I am going to use the following code

    DirectoryEntry entry = new DirectoryEntry(path, username, password)

    then I will just bind it to the NativeObject, right?

    But my question is, how would the path be for the "admin" user of different
    OUs? i.e. do I need to specify the CN, DC in the path

    for example, the domain is "xyz.com", the OUs are "NA1", "NA2","EU1", "EU2",
    and server name is "SRVNA", how would the path looks like for user
    "Jonathan" under "NA1"?


    Many Thanks

    --
    Guest, Mar 15, 2005
    #1
    1. Advertising

  2. If you just want to use LDAP for authentication, you can simply bind to the
    RootDSE object on the server. As long as the password provided isn't blank,
    that will effectively validate the user's credentials. Once they are
    validated, if you need to read attributes from their user object, the way to
    go would be to search for it with the DirectorySearcher by their user name
    that was provided.

    Joe K.

    <dl> wrote in message news:...
    > Hi All
    >
    > I have a directory server hosting multiple OUs, and I found that all the
    > users I created under each OU will not appear under "Users" folder, which
    > looks fine to me until now. I am working on an ASP.NET application which
    > would allow a selected user from each OU to login and to update profiles
    > of
    > users' of his/her own OU.
    > To authenticate the user I am going to use the following code
    >
    > DirectoryEntry entry = new DirectoryEntry(path, username, password)
    >
    > then I will just bind it to the NativeObject, right?
    >
    > But my question is, how would the path be for the "admin" user of
    > different
    > OUs? i.e. do I need to specify the CN, DC in the path
    >
    > for example, the domain is "xyz.com", the OUs are "NA1", "NA2","EU1",
    > "EU2",
    > and server name is "SRVNA", how would the path looks like for user
    > "Jonathan" under "NA1"?
    >
    >
    > Many Thanks
    >
    > --
    >
    >
    >
    Joe Kaplan \(MVP - ADSI\), Mar 15, 2005
    #2
    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. Mik
    Replies:
    0
    Views:
    411
  2. Guest
    Replies:
    0
    Views:
    2,012
    Guest
    Dec 17, 2003
  3. cameron

    DirectoryEntry Disposal Test

    cameron, Apr 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    508
    Willy Denoyette [MVP]
    Apr 14, 2004
  4. =?Utf-8?B?aHV6eg==?=

    LDAP directoryEntry

    =?Utf-8?B?aHV6eg==?=, Nov 18, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    20,346
    mngates
    Jan 31, 2011
  5. Marek Kopanski
    Replies:
    1
    Views:
    2,052
    =?Utf-8?B?S2F1c3Rhdg==?=
    Mar 18, 2005
Loading...

Share This Page