I have the following code to grant account access to some folder:
DirectoryInfo info = new System.IO.DirectoryInfo("C:\MyFreeFolder");
DirectorySecurity access = info.GetAccessControl();
FileSystemAccessRule rule = new FileSystemAccessRule("NETWORK SERVICE", FileSystemRights.FullControl, AccessControlType.Allow);
access.AddAccessRule(...
I'm trying to store a gzipped binary serialized object into Active Directory's "Extension Attribute", more info here. This field is a Unicode string according to it's oM syntax of 64.
I'm saving the binary object into AD's Unicode format like this:
byte[] bytes = ... // This is my blob
System.Text.Encoding.Unicode.GetString(bytes);
...
I have a function that searches AD for members of various groups. If I remove the loop, I don't get the error "A column named 'cn' already belongs to this datatable", however, I need to iterate through each OU.
Function getCOMDLNames(ByVal searchStr As String) As DataTable
Dim MySearchRoot As DirectoryEntry = New DirectoryEntry("pat...
I am trying to update my filter currently appled to the People Picker in SharePoint (WSS).
I am using stsadm to set the filter.
Something like...
stsadm -o setproperty -url http://webserver:39770 -pn peoplepicker-searchadcustomfilter -pv "(&(userAccountControl=512)(objectCategory=person)(objectClass=user)(memberOf=cn=All Users Group,...
What I mean is that right now I am using System.DirectoryServices.AccountManagement and if I use UserPrincipal class I only see the Name, Middle Name, etc
so in my codes it like
UserPrincipal myUser = new UserPrincipal(pc);
myUser.Name = "aaaaaa";
myUser.SamAccountName = "aaaaaaa";
.
.
.
.
myUser.Save();
How would I see the attribute...
I have IIS 7.5 on Windows 7 x64 and IIS 7.0 on Windows 2008 SP2 x86. In both cases, all the IIS 6 Compatibility features have been installed.
In IIS Manager, I have created a virtual directory named TestAccess with the physical path
c:\inetpub\wwwroot\TestAccess
I am trying to read the AccessFlags properties using VB.NET code like th...
I'm trying to create a new user on my development active directory server using .NET System.DirectoryServices namespace.
I try using the following code:
DirectoryEntry dirEntry = new DirectoryEntry(path, "TESTDOM\\Administrator", "2109password", AuthenticationTypes.Secure | AuthenticationTypes.ServerBind);
object o = dirEntry.NativeOb...