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.
Must be logged on as domain user, run as user didn't work.
User contributions licensed under CC BY-SA 3.0