Active Directory user removal from the group is not working. [modified]
-
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
-
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
-
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.