Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: ,

Sponsored Links



Reading/Writing ADAM users' attributes

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-02-2009
funnypuppy
 
Posts: n/a
Reading/Writing ADAM users' attributes

I am new to ADAM and Active Directory and was wondering if someone can give
me a little guidance. I am using VS.Net 2008, C#, and .Net Framework 3.5
SP1. I would like to read/write to/from users' attributes in ADAM. My ADAM
instance is secured with a certificate and I can connect and call it just
fine using System.Web.Security.Membership. The problem is that Membership
does not expose all the attributes and I need to be able to read/write to
them. So, I need to be implement my own thing to do so.

I have a sample code below to try to read an attribute. I keep getting
"System.Runtime.InteropServices.COMException: The server is not operational."
error. Does anyone know why I'm getting this?

DirectoryEntry user = new DirectoryEntry(
"LDAP://{hostname}:{secured port}/o={organization},cn={users
container},dc={domain},dc=COM",
{ADAM admin user},
{ADAM admin password},
AuthenticationTypes.Secure
);


string path = user.Path;
AdsUserFlags userFlags =
(AdsUserFlags)user.Properties["userAccountControl"].Value;

Where: AdsUserFlags is an enumeration mapped to AD user flags.

Your help is greatly appreciated!
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Reading/Writing ADAM users' attributes"
Thread Thread Starter Forum Replies Last Post
Problem in reading and writing files in VB6 Badrunath Software Development 4 23-01-2010 08:14 PM
Reading and Writing ADAM User attributes funnypuppy Active Directory 4 13-02-2009 07:55 AM
Writing and reading from file structures with the help of C Janhavi4U Software Development 2 03-02-2009 09:40 PM
ADAM - Classes & Attributes dcstc Active Directory 8 19-01-2009 01:25 PM
Make Adam Users look like AD users to email server kimballjohnson Active Directory 1 29-12-2008 12:00 AM


All times are GMT +5.5. The time now is 01:57 AM.