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. Active Directory

Active Directory

Scheduled Pinned Locked Moved C#
csharpwindows-adminquestion
9 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    mamoony
    wrote on last edited by
    #1

    Hi I am new to active directory. I have an application in c# and want to use active directory login dialogbox in the application. I saw lots of code everywhere. Want to know how the login screen will popup. Is it automatic if you call code below? DirectoryEntry userEntry = new DirectoryEntry(users.Path, LDAPUser, LDAPPassword); ADUserDetail userInfo = ADUserDetail.GetUser(userEntry); userlist.Add(userInfo); } directorySearch.Filter = "(&(objectClass=group)(SAMAccountName=" +fName + "*))"; SearchResultCollection results = directorySearch.FindAll(); Thanks in advance, Sai

    F 1 Reply Last reply
    0
    • M mamoony

      Hi I am new to active directory. I have an application in c# and want to use active directory login dialogbox in the application. I saw lots of code everywhere. Want to know how the login screen will popup. Is it automatic if you call code below? DirectoryEntry userEntry = new DirectoryEntry(users.Path, LDAPUser, LDAPPassword); ADUserDetail userInfo = ADUserDetail.GetUser(userEntry); userlist.Add(userInfo); } directorySearch.Filter = "(&(objectClass=group)(SAMAccountName=" +fName + "*))"; SearchResultCollection results = directorySearch.FindAll(); Thanks in advance, Sai

      F Offline
      F Offline
      fjdiewornncalwe
      wrote on last edited by
      #2

      The code you have would be used to validate the entry a user has made in a login dialog, but you still have to show the login dialog before you can call this code.

      I wasn't, now I am, then I won't be anymore.

      M 1 Reply Last reply
      0
      • F fjdiewornncalwe

        The code you have would be used to validate the entry a user has made in a login dialog, but you still have to show the login dialog before you can call this code.

        I wasn't, now I am, then I won't be anymore.

        M Offline
        M Offline
        mamoony
        wrote on last edited by
        #3

        Where can I find the log in dialog call. It is a windows c# applicatin. Thanks, Sai

        F 1 Reply Last reply
        0
        • M mamoony

          Where can I find the log in dialog call. It is a windows c# applicatin. Thanks, Sai

          F Offline
          F Offline
          fjdiewornncalwe
          wrote on last edited by
          #4

          There isn't one by default. You have to create it. (at least that is the case in Windows.Forms) If you are using WPF, I'm not entirely sure if there is a prebuilt component you can use.

          I wasn't, now I am, then I won't be anymore.

          M 2 Replies Last reply
          0
          • F fjdiewornncalwe

            There isn't one by default. You have to create it. (at least that is the case in Windows.Forms) If you are using WPF, I'm not entirely sure if there is a prebuilt component you can use.

            I wasn't, now I am, then I won't be anymore.

            M Offline
            M Offline
            mamoony
            wrote on last edited by
            #5

            Thanks, So I have to create a login form using buttons and textboxes and then use the active directory code to verify the user? Thanks, Sai

            F 1 Reply Last reply
            0
            • F fjdiewornncalwe

              There isn't one by default. You have to create it. (at least that is the case in Windows.Forms) If you are using WPF, I'm not entirely sure if there is a prebuilt component you can use.

              I wasn't, now I am, then I won't be anymore.

              M Offline
              M Offline
              mamoony
              wrote on last edited by
              #6

              How can I use WPF? I heard the name before. What is Active Directory Common Dialog and DirectoryObjectpickerDialog? Thanks, Sai

              F 1 Reply Last reply
              0
              • M mamoony

                Thanks, So I have to create a login form using buttons and textboxes and then use the active directory code to verify the user? Thanks, Sai

                F Offline
                F Offline
                fjdiewornncalwe
                wrote on last edited by
                #7

                correct.

                I wasn't, now I am, then I won't be anymore.

                M 1 Reply Last reply
                0
                • M mamoony

                  How can I use WPF? I heard the name before. What is Active Directory Common Dialog and DirectoryObjectpickerDialog? Thanks, Sai

                  F Offline
                  F Offline
                  fjdiewornncalwe
                  wrote on last edited by
                  #8

                  Those won't be what you want. If your application isn't already WPF you can't just use it. You would have to create a new project in WPF then. Since you are using WinForms, you'll have to create a login dialog from scratch.

                  I wasn't, now I am, then I won't be anymore.

                  1 Reply Last reply
                  0
                  • F fjdiewornncalwe

                    correct.

                    I wasn't, now I am, then I won't be anymore.

                    M Offline
                    M Offline
                    mamoony
                    wrote on last edited by
                    #9

                    Thank you :).

                    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