请问各位大虾:在c#中没有删除删除对象的子树的方法么?在http://msdn.microsoft.com/zh-cn/library/ms180853.aspx的方法,不能实现该功能,出现了错误提示:
目录服务只可以在一个页状对象上运行要求的操作
DirectoryEntry de = new DirectoryEntry();
de.Path = "LDAP://127.0.0.1:389/o=tcl,c=cn"; de.Username = "cn=Manager,o=tcl,c=cn"; de.Password = "secret";
de.AuthenticationType = AuthenticationTypes.None;
try
{
de.DeleteTree();
de.CommitChanges();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString()); }
明明就是:删除对象的子树,却说只能在页对象操作,各位帮忙看一下怎么回事。谢谢!
目录服务只可以在一个页状对象上运行要求的操作
DirectoryEntry de = new DirectoryEntry();
de.Path = "LDAP://127.0.0.1:389/o=tcl,c=cn"; de.Username = "cn=Manager,o=tcl,c=cn"; de.Password = "secret";
de.AuthenticationType = AuthenticationTypes.None;
try
{
de.DeleteTree();
de.CommitChanges();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString()); }
明明就是:删除对象的子树,却说只能在页对象操作,各位帮忙看一下怎么回事。谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货