Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Active Directory Question

Active Directory Question

Scheduled Pinned Locked Moved C#
questionwindows-adminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Christian Merritt
    wrote on last edited by
    #1

    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?

    N 1 Reply Last reply
    0
    • C Christian Merritt

      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?

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      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 the BitConverter.ToString(..) method as it may handle this. You may also need to refer to the Marshal class under System.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


      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups