Active Directory OIP: Delete Computer Object error

Nov 29, 2012 at 2:06 PM

Creating objects have never been a problem with the Active Directory OIP. But when I try to delete a computer object I keep getting the following error:

"Must enter valid LDAP Path

Exception: ExceptionTarget site: DeleteComputer.CapitalizeLDAPPath
Stack trace:   at Active_Directory.DeleteComputer.CapitalizeLDAPPath(String value)   at Active_Directory.DeleteComputer.Execute(IActivityRequest request, IActivityResponse response)"


The object LDAP Path I use is something like this:

LDAP://go.local/CN=GTS-GRAL-DT-99,OU=Offsite Workstations via Direct Access,OU=Workstations,OU=GTS-GRAL,OU=Klanten,DC=go,DC=local

I also tried to use a LDAP Path without spaces, but nothing works.

It fails on the following code:

private string CapitalizeLDAPPath(string value)
            if (value == null)
                throw new Exception("Must enter valid LDAP Path");
            if (!value.StartsWith("LDAP", true, System.Globalization.CultureInfo.CurrentCulture))
                throw new Exception("Must enter valid LDAP Path");

            StringBuilder result = new StringBuilder(value);
            for (int i = 0; i < 4; i++)
                result[i] = char.ToUpper(result[i]);
            return result.ToString();

It allways gives the error "Must enter valid LDAP Path", so I don't know what the problem exactly is. 

Am I doing something wrong? 

Dec 5, 2012 at 2:23 PM

Does anyone has an idea what I am doing wrong? Thanks in advance!

Dec 7, 2012 at 5:31 PM


Sorry for not responding sooner, let me take a look at the code and I will get back to you!