Search code examples
c#vbscriptldaplinq-to-ldap

LDAP to a mainframe environment


Possible Duplicate:
Querying an LDAP in C#

I'm currently transposing some old ASP code from VBScript to C# and have gotten stuck on a piece that uses LDAP to connect to our IBM Top Secret environment. Any one know of some documentation / resources regarding the process or that could translate the relevant code to C# / .NET?

Set oLdap = CreateObject("LDAPClient")
oLdap.Connect "MY SERVER NAME",1389,"cn=" & <MF Account>, <MF Password>
oLdap.Search "host=ldap,o=COMP, c=us","tssacid=<Target UserID>"

edit I believe i'm getting closer with this:

DirectoryEntry entry = new DirectoryEntry("LDAP://SERVERADDR/tssacid=acidval,tssadmingrp=acids,host=ldap,o=comp,c=us");

Solved my issue using this resource:

ftp://ftp.ca.com/pub/ldap/docs/ldapv3/eTrust_LDAP_Server_Administrator_Guide_30.pdf

I'll duplicate the resource in the "exact duplicate" thread


Solution

  • Besides the existing SO thread, there's also a LINQ to LDAP provider on CodePlex. You could use that as an alternative to the existing Directory Services API in .NET (it's built on top of it, actually).