The most glaring problem I see is that in your call to the
DirectoryEntry
constructor, the string parameter has an invalid space in it, namely:
"LDAP:// MyDomain"
It should be:
"LDAP://MyDomain"
Second, you may be missing some parameters inside the string. I recommend that you google "C# DirectoryEntry", and go with one of the 546,000 examples that you get back.