.NET and LDAP
-
Hi I was wondering if anyone could offer some advice on authenticating a .NET application with LDAP. The code seems to work fine with AD, but fails with LDAP. Also, I have a Java App that can do this just fine, but somehow the solution with .NET eludes me! (extract)
DirectoryEntry entry = new DirectoryEntry("LDAP://testdomain/DC=testdomain", "testdomain/testuser", textPassword.Text); Object obj = entry.NativeObject; DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=testuser)"; search.PropertiesToLoad.Add("cn"); SearchResult result = search.FindOne(); if (null == result) { . . . }
The test PC runs on a Windows XP box with .NET Framework 1.1, and is bound to whichever server we're testing on at the time. The authentication server is a Mac OS X 10.4 server running LDAPv3 (I believe built on OpenLDAP, and should be similar in every way). Any suggestions? (or anyone with a Linux OpenLDAP domain out there?) -
Hi I was wondering if anyone could offer some advice on authenticating a .NET application with LDAP. The code seems to work fine with AD, but fails with LDAP. Also, I have a Java App that can do this just fine, but somehow the solution with .NET eludes me! (extract)
DirectoryEntry entry = new DirectoryEntry("LDAP://testdomain/DC=testdomain", "testdomain/testuser", textPassword.Text); Object obj = entry.NativeObject; DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=testuser)"; search.PropertiesToLoad.Add("cn"); SearchResult result = search.FindOne(); if (null == result) { . . . }
The test PC runs on a Windows XP box with .NET Framework 1.1, and is bound to whichever server we're testing on at the time. The authentication server is a Mac OS X 10.4 server running LDAPv3 (I believe built on OpenLDAP, and should be similar in every way). Any suggestions? (or anyone with a Linux OpenLDAP domain out there?)Novell has some LDAP client software in C#. Never used it. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
-
Novell has some LDAP client software in C#. Never used it. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
-
Look for it with the Mono stuff or on Novellforge. I just read something about it, not sure if it will help you, just have a vague memory :) xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots