Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / June 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jeangv@gmail.com - 08 Jun 2006 23:03 GMT
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
jean@vaneskahian.com
Joe Kaplan (MVP - ADSI) - 09 Jun 2006 21:00 GMT
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.

Signature

Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

> Reading - Parsing Records From An LDAP LDIF File In .Net?
>
[quoted text clipped - 17 lines]
> Jean-Marie Vaneskahian
> jean@vaneskahian.com
jeangv@gmail.com - 09 Jun 2006 21:37 GMT
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
jean@vaneskahian.com

> I have not seen such a library anywhere.
>
[quoted text clipped - 30 lines]
> > Jean-Marie Vaneskahian
> > jean@vaneskahian.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.