Last post Apr 03, 2006 01:17 PM by mattdaddym2
Mar 29, 2006 01:52 AM|mattdaddym2|LINK
I'm very new to the ldap and .net, and have logged countless hours this last week trying figure this stuff you. You will be proud to know that with this website and other resources I have finally connected and am pulling info out of the directory. Whew...but....
I have an older code example (asp 3.0) that shows the queries being done in sql syntax. This is much easier than what I have seen so far. Here is an example:
oCon = Server.CreateObject("ADODB.Connection")
oCmd = Server.CreateObject("ADODB.Command")
oCon.Provider = ("ADsDSOObject")
oCon.Open("Active Directory Provider")
oCmd.ActiveConnection = oCon
oCmd.CommandText = "SELECT AdsPath FROM 'LDAP://xxx.xxx.xxx:389/ou=people,ou=intranet,dc=xxx,dc=com' WHERE uid='xxx'"
....blah, blah, blah
Now , I can run this code in my page by selecting ASPCOMPAT="TRUE" in the page directive, but I'd like to be able to do this in .NET.
Is there a way to query ldap in asp .net /vb .net with an sql string? Seems cleaner to me, but that's probably because I have experience with SQL and not so much with LDAP and VB .NET. Doesn't the SQL format make it easier
to plug into a DATASET rather than building it manually like in the examples I have seen here?
Thanks all for your time!
Mar 31, 2006 04:19 PM|dunnry|LINK
Apr 03, 2006 01:17 PM|mattdaddym2|LINK