Bind to Moniker not working on Windows XP 32bit using LDAP

1

I have the following code:

<appSettings>
    <add key="rootDN" value="LDAP://[The rest of the path]"/>
</appSettings>

string rootDN = System.Configuration.ConfigurationManager.AppSettings["rootDN"]; 
object ou = Marshal.BindToMoniker(rootDN);

This is producing an error:

Unhandled Exception: System.Runtime.InteropServices.COMException (0x80072020): A n operations error occurred. (Exception from HRESULT: 0x80072020) at System.Runtime.InteropServices.Marshal.MkParseDisplayName(IBindCtx pbc, St ring szUserName, UInt32& pchEaten, IMoniker& ppmk) at System.Runtime.InteropServices.Marshal.BindToMoniker(String monikerName) at LDAP_CreateGroup.Program.Main(String[] args)

Works fine on Windows Server 2008, not working on XP. Unfortunately need this to run on XP.

com
asked on Stack Overflow Jun 10, 2011 by JL. • edited Jul 15, 2011 by Brian Webster

1 Answer

0

Must be logged on as domain user, run as user didn't work.

answered on Stack Overflow Jun 10, 2011 by JL.

User contributions licensed under CC BY-SA 3.0