I got the following snippet (SomeName/SomeDomain contains real values in my code)
var entry = new DirectoryEntry(\"LDAP://CN=SomeNa
If one wants to access a custom attribute from a machine that is not part of the domain where the custom attribute resides (the credentials of the logged in user don't matter) one needs to pass the fully qualified name of the object is trying to access otherwise the schema cache on the client machine is not properly refreshed, nevermind all the schema.refresh() calls you make
Found here. This sounds like your problem, given the updates made to the question.