3
我想找回一些语意含混的Active Directory属性:C#得到模糊的Active Directory属性
- msexchmailboxsecuritydescriptor和
- terminalservicesprofilepath(在userparameters)
我有麻烦到两个都。
例如,对于msexchmailboxsecuritydescriptor,如果我有类似下面的代码:
DirectoryEntry deresult = result.GetDirectoryEntry();
byte[] bteMailACL =(byte[])deresult.Properties["msexchmailboxsecuritydescriptor"].Value;
它抱怨我不能施放系统.__ ComObject到System.Byte [],但我已经看到了使用几个例子类似于上面的代码。
我如何理解这些信息?
+1。我也注意到了。某些属性通常会返回多个值(例如,列出AD组中成员的'member')。我想为了一致性的原因,API的设计者决定所有的值都应该是一个数组,即使它们大多数只包含1个项目。 – 2011-06-07 09:13:07
我实际上很喜欢这个设计(一旦我掌握了它),因为现在我可以在我的大部分操作上使用LINQ。感谢+1 :) – Maverik 2011-06-07 09:17:42