none
System.DirectoryServices msExchRecipientTypeDetails getting its value. RRS feed

  • Question

  • Hello,

    I am trying to get the value for msExchRecipientTypeDetails from my local active directory. I am using the following C# code. However instead of returning the integer value of the msExchangRecipientTypeDetails as a string it is returning a COM object.

    Can someone explain why this is the case and help me with a solution. Every other property is returning with a value. Include msexchagneRecipientDisplayType.

    Thanks

     

    _adObject = new DirectoryEntry(DirectoryObjectString); msExchRecipientTypeDetails = _adObject.Properties["msExchRecipientTypeDetails"][0].ToString();



     

    Monday, November 17, 2014 9:43 PM

Answers

  • Hello williamtholmes,

    It might be the property value is represented using the ADSI IADsLargeInteger COM interface as described in the link which discusses the similar question:

    http://stackoverflow.com/questions/441110/why-am-i-getting-system-comobject-from-my-ldap-property

    According to the article written by Jeff Hewitt, it needs to be converted to a .NET value.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 18, 2014 8:20 AM
    Moderator