Com 使用LDAP绑定到不适用于Windows XP 32位的名字对象
我有以下代码:Com 使用LDAP绑定到不适用于Windows XP 32位的名字对象,com,Com,我有以下代码: <appSettings> <add key="rootDN" value="LDAP://[The rest of the path]"/> </appSettings> string rootDN = System.Configuration.ConfigurationManager.AppSettings["rootDN"]; object ou = Marshal.BindToMoniker(rootDN); 字符串ro
<appSettings>
<add key="rootDN" value="LDAP://[The rest of the path]"/>
</appSettings>
string rootDN = System.Configuration.ConfigurationManager.AppSettings["rootDN"];
object ou = Marshal.BindToMoniker(rootDN);
字符串rootDN=System.Configuration.ConfigurationManager.AppSettings[“rootDN”];
对象ou=Marshal.BindToMoniker(rootDN);
这会产生一个错误:
未处理的异常:
System.Runtime.InteropServices.COMException
(0x80072020):n操作错误
发生。(HRESULT的例外情况:
0x80072020)在
System.Runtime.InteropServices.Marshal.MkParseDisplayName(IBindCtx
中国人民银行,St环,UInt32&
pchEaten、IMoniker和ppmk)在
System.Runtime.InteropServices.Marshal.BindToMoniker(字符串
monikerName)在
LDAP_CreateGroup.Program.Main(字符串[])
args)
可以在Windows Server 2008上正常工作,但不能在XP上工作。不幸的是,我们需要在XP上运行它 必须以域用户身份登录,以用户身份运行不起作用