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. .NET (Core and Framework)
  4. Active Directory user removal from the group is not working. [modified]

Active Directory user removal from the group is not working. [modified]

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpasp-netsysadminwindows-admin
3 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.
  • S Offline
    S Offline
    sxd9mm
    wrote on last edited by
    #1

    Hi all, I'm writing a VB.NET (VS2008) console application that would remove a certain user from the given Active Directory group. All Active Directory related code works (like finding the user, group, etc.) but the user removal itself. The exception says that 'Server could not remove the user'. I tried both VB.NET and the C# with the same result. But, when I ran the same code in ASP.NET (vb) application - it worked! I made sure that I've all references the same but no luck. Both apps I'm testing on my machine. And I do have rights to delete. Is there something different that needs to be done in the console application? Thanks a lot!

    modified on Wednesday, June 10, 2009 11:49 AM

    L 1 Reply Last reply
    0
    • S sxd9mm

      Hi all, I'm writing a VB.NET (VS2008) console application that would remove a certain user from the given Active Directory group. All Active Directory related code works (like finding the user, group, etc.) but the user removal itself. The exception says that 'Server could not remove the user'. I tried both VB.NET and the C# with the same result. But, when I ran the same code in ASP.NET (vb) application - it worked! I made sure that I've all references the same but no luck. Both apps I'm testing on my machine. And I do have rights to delete. Is there something different that needs to be done in the console application? Thanks a lot!

      modified on Wednesday, June 10, 2009 11:49 AM

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

      This sounds like a permission issue. Have you tried manually setting the account details when you create your directory entry? Have you set an authentication type? Sometimes I've found this to work.

      Using the wrong tool for the job is half the fun.

      S 1 Reply Last reply
      0
      • L Leonscape

        This sounds like a permission issue. Have you tried manually setting the account details when you create your directory entry? Have you set an authentication type? Sometimes I've found this to work.

        Using the wrong tool for the job is half the fun.

        S Offline
        S Offline
        sxd9mm
        wrote on last edited by
        #3

        Yep, I've hard coded the user name and the password and made sure that the user has all needed permissions.

        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