Reading - Parsing Records From An LDAP LDIF File In .Net?

Discussion in 'ASP .Net Datagrid Control' started by jeangv@gmail.com, Jun 8, 2006.

  1. Guest

    Reading - Parsing Records From An LDAP LDIF File In .Net?

    I am in need of a .Net class that will allow for the parsing of a LDAP
    LDIF file. An LDIF file is the standard format for representing LDAP
    objects. I need to be able to read the records from an LDIF file into
    ..Net.

    There exists a Perl module that will do exactly this called
    Net::LDAP::LDIF but I am wanting to port my code over to .Net and
    cannot find anything with similar LDIF functionality. I would like to
    avoid having to write my own .Net class to read the LDIF file and
    create record objects. I am sure I am not that only person that needs
    to do this that is using .Net.

    Does there exist a .Net class that will read LDIF files? Is there a
    third party .Net class that can be purchased that can read an LDIF
    file?

    Any help would be appreciated,
    Jean-Marie Vaneskahian
    , Jun 8, 2006
    #1
    1. Advertising

  2. I have not seen such a library anywhere.

    Just out of curiosity, what do you need this for? Are you planning to read
    the LDIF files and do LDAP operations programmatically? It sounds a little
    like you are reinventing LDIFDE.exe...

    Joe K.

    --
    Joe Kaplan-MS MVP Directory Services Programming
    Co-author of "The .NET Developer's Guide to Directory Services Programming"
    http://www.directoryprogramming.net
    --
    <> wrote in message
    news:...
    > Reading - Parsing Records From An LDAP LDIF File In .Net?
    >
    > I am in need of a .Net class that will allow for the parsing of a LDAP
    > LDIF file. An LDIF file is the standard format for representing LDAP
    > objects. I need to be able to read the records from an LDIF file into
    > .Net.
    >
    > There exists a Perl module that will do exactly this called
    > Net::LDAP::LDIF but I am wanting to port my code over to .Net and
    > cannot find anything with similar LDIF functionality. I would like to
    > avoid having to write my own .Net class to read the LDIF file and
    > create record objects. I am sure I am not that only person that needs
    > to do this that is using .Net.
    >
    > Does there exist a .Net class that will read LDIF files? Is there a
    > third party .Net class that can be purchased that can read an LDIF
    > file?
    >
    > Any help would be appreciated,
    > Jean-Marie Vaneskahian
    >
    >
    Joe Kaplan \(MVP - ADSI\), Jun 9, 2006
    #2
    1. Advertising

  3. Guest

    Joe,

    First and foremost I want to thank you very much for all your
    contribution to the message boards on Active Directory access via .Net.
    I also love your new book "The .NET Developer's Guide to Directory
    Services Programming".

    Your assessment is basically correct. My goal is to read the records
    from an LDIF file then programmatically process them. The source of
    the LDIF file however is NOT the Active Directory.

    I work for a HUGE multi-national company that uses a massive X.500
    directory for mastering all object information. I get a very large
    daily LDIF file with the objects exported from the X.500.

    Today I use Perl to parse the LDIF file and read each entry as a
    record. I then use the OLE interface in Perl to set the global Active
    Directory account data to match what was in the X.500 LDIF data after
    some modification.

    To move this process off of Perl and use .Net I would need two parts.
    The ability to read an LDIF file and the ability to manipulate Active
    Directory objects. Your book makes the second of the two tasks easy,
    but the first is very important.

    If no such library that can read an LDIF file exists, what would it
    take to write a .Net class that can do that?

    1 - Understand how LDIF files are formatted based on the RFC

    2 - Know how to convert some LDIF fields from Base64

    3 - Know how to construct a LDAP type object populated with the fields
    and values from the LDIF object that was read.

    This all sounds a bit too complex for me. Especially since I am not
    sure how to pass a object with these unknown parameters back and
    fourth. The Perl module that I used today, makes all this trivial.
    Here is the link to Net::LDAP::LDIF

    http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP/LDIF.pod

    Any guidance at all would be greatly appreciated. My goal in moving
    from Perl way to keep all my code in .Net if possible. I do miss the
    access to all the readily available and very diverse Perl modules in
    the move to .Net

    Thanks for any help,
    Jean-Marie Vaneskahian




    Joe Kaplan (MVP - ADSI) wrote:
    > I have not seen such a library anywhere.
    >
    > Just out of curiosity, what do you need this for? Are you planning to read
    > the LDIF files and do LDAP operations programmatically? It sounds a little
    > like you are reinventing LDIFDE.exe...
    >
    > Joe K.
    >
    > --
    > Joe Kaplan-MS MVP Directory Services Programming
    > Co-author of "The .NET Developer's Guide to Directory Services Programming"
    > http://www.directoryprogramming.net
    > --
    > <> wrote in message
    > news:...
    > > Reading - Parsing Records From An LDAP LDIF File In .Net?
    > >
    > > I am in need of a .Net class that will allow for the parsing of a LDAP
    > > LDIF file. An LDIF file is the standard format for representing LDAP
    > > objects. I need to be able to read the records from an LDIF file into
    > > .Net.
    > >
    > > There exists a Perl module that will do exactly this called
    > > Net::LDAP::LDIF but I am wanting to port my code over to .Net and
    > > cannot find anything with similar LDIF functionality. I would like to
    > > avoid having to write my own .Net class to read the LDIF file and
    > > create record objects. I am sure I am not that only person that needs
    > > to do this that is using .Net.
    > >
    > > Does there exist a .Net class that will read LDIF files? Is there a
    > > third party .Net class that can be purchased that can read an LDIF
    > > file?
    > >
    > > Any help would be appreciated,
    > > Jean-Marie Vaneskahian
    > >
    > >
    , Jun 9, 2006
    #3
    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. Replies:
    0
    Views:
    529
  2. Cruelemort

    LDAP/LDIF Parsing

    Cruelemort, Feb 1, 2007, in forum: Python
    Replies:
    10
    Views:
    940
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Feb 5, 2007
  3. Replies:
    2
    Views:
    167
  4. Replies:
    2
    Views:
    835
  5. Replies:
    0
    Views:
    157
Loading...

Share This Page