A
Adam
Hi, I have a windows service that will pull data from an external
source and I need to update this informaiton in AD from a Windows
Service.
What is the easiest way to do this? I looked at using the
ActiveDirectoryMembershipProvider but it seems that this is for
ASP.NET applications only(?) or perhaps I am missing some better
results in google.
I know that I can connect via LDAP and change details using code like
the following
DirectorySearcher search = new DirectorySearcher();
search.Filter = String.Format("(SAMAccountName={0})",
userName);
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
but I was wondering if there was a better way?
Thanks for any help
Adam
source and I need to update this informaiton in AD from a Windows
Service.
What is the easiest way to do this? I looked at using the
ActiveDirectoryMembershipProvider but it seems that this is for
ASP.NET applications only(?) or perhaps I am missing some better
results in google.
I know that I can connect via LDAP and change details using code like
the following
DirectorySearcher search = new DirectorySearcher();
search.Filter = String.Format("(SAMAccountName={0})",
userName);
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
but I was wondering if there was a better way?
Thanks for any help
Adam