Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default LDAP path

    Hello,

    I was given some code that was done in ColdFusion, and I am trying to figure
    out how to map the LDAP path. Any help would be appreciated.

    This is what I got from the Microsoft web site
    // Path to you LDAP directory server.
    string adPath = "LDAP://yourCompanyName.com/DC=yourCompanyName,DC=com";
    LdapAuthentication adAuth = new LdapAuthentication(adPath);

    This is the code snippet that I got fro ColdFusion
    -------------------------------------------------
    <cfldap action="QUERY"
    name="empquery_login"
    attributes="employeenumber,roomnumber,sname"
    start="ou=people, o=lucent.com"
    filter="(employeenumber=#ssno#)"
    scope="onelevel"
    server="ldap-useast.train.com"
    port="389">

    --
    Thanks in advance,

    sck10


    sck10 Guest

  2. Similar Questions and Discussions

    1. clipping path shows ouside path in quark
      I'm making paths on silo'd objects on white backgrounds to place on colored backgrounds in quark 4. Operating pshop 6.01 in os 9.2. I put the path on...
    2. Convert text path back to regular path
      Im sure this has been covereed beofre , but I want to take an oddly shaped pathy that I have converted to a text path, and revert it to a regualr...
    3. #25444 [Opn->Bgs]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 Updated by: sniper@php.net Reported By: ict at primus dot ca -Status: Open +Status: Bogus...
    4. #25444 [NEW]: php4isapi.dll path to win.ini doesn't load from current path.
      From: ict at primus dot ca Operating system: W2K PHP version: 4.3.3 PHP Bug Type: *Configuration Issues Bug description: ...
    5. load path as a selection button on the path palette
      What button is that and where is the path palette? I am using the pen tool.
  3. #2

    Default RE: LDAP path

    Hi,

    Currently I am looking for somebody who could help you on it. We will reply
    here with more information as soon as possible.
    If you have any more concerns on it, please feel free to post here.


    Thanks for your understanding!

    Best regards,

    Peter Huang
    Microsoft Online Partner Support

    Get Secure! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Peter Huang [MSFT] Guest

  4. #3

    Default Re: LDAP path

    I'm not sure what "LdapAuthentication" is here, but if that is an MS sample,
    there is a good chance that it is AD-specific and should not be used.

    What are you trying to do here, authenticate a user to an LDAP directory or
    just look up some attribute values from their user object in the LDAP store?

    Given that the example below is a simple search, I'll assume the latter. In
    that case, you would want to try to use the DirectorySearcher with something
    like this:

    //air code, may not compile
    DirectoryEntry root = new
    DirectoryEntry("LDAP://ldap-useast.train.com/ou=people, o=lucent.com", "",
    "", AuthenticationTypes.None);
    DirectorySearcher searcher = new DirectorySearcher(root);
    searcher.SearchScope = SearchScope.OneLevel;
    searcher.PropertiesToLoad.AddRange(new string[] {"employeenumber",
    "roomnumber", "sname"});
    searcher.Filter = String.Format("(employeenumber={0})", empNum); //you
    provide that parameter...
    SearchResult result = searcher.FindOne();
    //then retrieve the values from the result.Properties collection

    The trick here will be in providing the correct credentials and
    authentication types to work with your directory. In the example above, I
    provided a null user and password, but that might not be right. Using
    AuthenticationTypes.Anonymous may also be correct.

    The other thing to watch out for would be schema mapping issues. ADSI/S.DS
    is notorious for struggling to parse the schema of third-party LDAP
    directories, so if you get weird "cannot convert datatype" errors, that is
    the problem. In that case, you might not be able to get this to work with
    S.DS and might need to wait for .NET 2.0 and
    System.DirectoryServices.Protocols.

    HTH,

    Joe K.

    "sck10" <sck10@online.nospam> wrote in message
    news:emkSwXgQFHA.2948@TK2MSFTNGP14.phx.gbl...
    > Hello,
    >
    > I was given some code that was done in ColdFusion, and I am trying to
    > figure
    > out how to map the LDAP path. Any help would be appreciated.
    >
    > This is what I got from the Microsoft web site
    > // Path to you LDAP directory server.
    > string adPath = "LDAP://yourCompanyName.com/DC=yourCompanyName,DC=com";
    > LdapAuthentication adAuth = new LdapAuthentication(adPath);
    >
    > This is the code snippet that I got fro ColdFusion
    > -------------------------------------------------
    > <cfldap action="QUERY"
    > name="empquery_login"
    > attributes="employeenumber,roomnumber,sname"
    > start="ou=people, o=lucent.com"
    > filter="(employeenumber=#ssno#)"
    > scope="onelevel"
    > server="ldap-useast.train.com"
    > port="389">
    >
    > --
    > Thanks in advance,
    >
    > sck10
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  5. #4

    Default LDAP path

    please what the o in
    o=lucent.com

    because i have ldap path contain o and c
    "LDAP:// , o= , c = "
    and i want to know what are o and c ?
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139