locked
Active Directory Group RRS feed

  • Question

  • Using VS2005, WinForms and C# is there a command I can use to tell me if a specific user belongs (yes/no) to a specific group in active directory.

    I want to enable/disable certain buttons based on active directroy group.

    Wednesday, November 2, 2011 12:02 PM

Answers

  • OK. I think I have it working.    I had to add the following:

    using System.Collections;

    using System.Collections.Specialized;

    and drop the System.Collections.Generic;

    It's just a matter of playing with it now.

    Thanks Prahalnathan


    • Edited by JHab Wednesday, November 2, 2011 8:17 PM
    • Marked as answer by JHab Wednesday, November 2, 2011 8:17 PM
    Wednesday, November 2, 2011 6:01 PM

All replies

  • Wednesday, November 2, 2011 12:11 PM
  • I copied the code directly into my WinForm and added a  using System.Collections.Specialized;

     

    I am getting the following error message:

    Error 1 Using the generic type 'System.Collections.Generic.IEnumerable<T>' requires '1' type arguments 

    What is this telling me

     

     

    Wednesday, November 2, 2011 4:15 PM
  • OK. I think I have it working.    I had to add the following:

    using System.Collections;

    using System.Collections.Specialized;

    and drop the System.Collections.Generic;

    It's just a matter of playing with it now.

    Thanks Prahalnathan


    • Edited by JHab Wednesday, November 2, 2011 8:17 PM
    • Marked as answer by JHab Wednesday, November 2, 2011 8:17 PM
    Wednesday, November 2, 2011 6:01 PM
  • I'm glad to hear that the problem is solved.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, November 3, 2011 3:25 AM