Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. .NET and LDAP

.NET and LDAP

Scheduled Pinned Locked Moved C#
csharpjavadotnetsysadminlinux
4 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ehuysamer
    wrote on last edited by
    #1

    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?)

    L 1 Reply Last reply
    0
    • E ehuysamer

      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?)

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • L leppie

        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

        E Offline
        E Offline
        ehuysamer
        wrote on last edited by
        #3

        Thanks - have you perhaps got a link to it?

        L 1 Reply Last reply
        0
        • E ehuysamer

          Thanks - have you perhaps got a link to it?

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups