0
C#的新手。我正在尝试浏览AD的特定OU。我收到以下错误。错误代码2147016646.我试着用更高的privl运行程序。 ACCT。但仍然有同样的错误。活动目录服务器不可操作。错误代码2147016646
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string objectPath = "Server1";
try
{
if (DirectoryEntry.Exists("LDAP://" + objectPath))
Console.WriteLine(objectPath + "exists");
else
Console.WriteLine(objectPath + " does not exists");
}
catch (DirectoryServicesCOMException e)
{
Console.WriteLine(e.Message.ToString());
}
}
}
}
对于这里提出的具体问题,推荐一本书并不是什么回答。 – 2011-07-07 15:45:15