代码改变世界

.Net Developer's issues to Directory Programming

2012-12-06 11:46  雪中风筝  阅读(253)  评论(1编辑  收藏  举报

在AD编程的时候遇到了以下几个问题,记录下来:

  1. 在VS中运行没有问题,但是当单独运行Console Application的时候,Domain.GetCurrentDoamin()总报ComException:Retrieving the COM class factory for component with CLSID {080D0D78-F421-11D0-A36E-00C04FB950DC} failed due to the following error: 800401f9.问题还没有确定.偶尔在VS下运行也会出现这个错误,但是重新启动VS以后就没有这个问题了。问题还没有确定。
  2. 在创建universal Security group的时候 总是报错:The attribute syntax specified to the directory service is invalid  经过查找说是group的四个属性都要指定才不会报错,试了下果然可以,参考文章

    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23761296.html

  3.编程将一个组加入到另外一个组的时候总是报错: the server unwilling process the request

        一直到不到错误,后来发现是因为group scope 的问题,我将universal group 要加入到globle group 里去,这个操作本事就不是行的,这个具体的解释,查看MSDN group scope 的详情。