Programing QA

Programing/Developing Questions & Answers. Focus on business application material

The attribute syntax specified to the directory service is invalid C# DirectoryEntry

If you are getting the following exception:

{System.DirectoryServices.DirectoryServicesCOMException (0x8007200B): The attribute syntax specified to the directory service is invalid.

Then you probably trying to update DirectoryEntry property with empty string (“” or string.Empty).

try set it to “Null” instead and it just might work.

Good Luck.