Enabling an user account with ActiveDS (WinNT provider)

  • Thread starter Eliseo Calderon \(Verizon\)
  • Start date
E

Eliseo Calderon \(Verizon\)

I am resubmitting this again:

I have this code:

DirectoryEntry usr = new DirectoryEntry("WinNT://./guest");
int val = (int) usr.Properties["UserFlags"].Value;
usr.Properties["UserFlags"].Value = val & ~0x0002; <=== this fails
usr.CommitChanges();

I am trying to enable a usera account with the DirectoryServices class.

When the code executes, I get this error.

Error: Unspecified error at System.DirectoryServices.Interop.IAds.PutEx(...


Any ideas what I am missing? The user account I am using to execute this
program has Adminsitrator rights for the local machine.

Thanks
Eliseo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top