Active Directory Question
-
I'm attempting to retrieve an Active Directory attribute that is stored as as type OctetString. I want to convert this value to a string, but the Convert class doesn't seem to be able to do this. Can someone help?
-
I'm attempting to retrieve an Active Directory attribute that is stored as as type OctetString. I want to convert this value to a string, but the Convert class doesn't seem to be able to do this. Can someone help?
Marc Merritt wrote: is stored as as type OctetString Hmmm, ok I had to do a little searching here but if you read MSDN's page on ADS_OCTET_STRING[^] you will see that it is a
struct
containing a byte array. To convert this you might want to look into theBitConverter.ToString(..)
method as it may handle this. You may also need to refer to theMarshal
class underSystem.Runtime.InteropServices
. Hope this helps. :) Nick Parker
May your glass be ever full. May the roof over your head be always strong. And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing