Last post Aug 06, 2010 05:33 AM by mrygaard
Aug 05, 2010 11:05 AM|mrygaard|LINK
I've been searching for a solution to get a list of the AD Groups for at specific AD user. I'll need the current user logged in and would like to query by the username.
The problem is that all the solutions I find on the web uses System.DirectoryServices - and I can't find the dll in my .Net 4.0 webproject (I only have System.DirectoryServices.AccountManagement) - so I can't use any of the examples that I've found.
Is there a difference way to query the AD through 4.0 compared to 2.0?
I could really use some examples, articles or just good advise to get moving - I'm kind of stuck at the moment.
Aug 05, 2010 01:50 PM|smirnov|LINK
To add System.DirectoryServices go to Project - Add Reference - .NET
Aug 05, 2010 02:04 PM|mrygaard|LINK
Yep I know that - but the strange thing is that its not present under .Net if I choose a 4.0 project - then I thought that they might had changed the way to use it. I can choose it if I create a 2.0 project.
Any idea why that is?
Aug 05, 2010 03:23 PM|smirnov|LINK
I created a new .NET4 Web Project, opened Add Reference and see under .NET
All 3 have version 184.108.40.206
Aug 06, 2010 05:33 AM|mrygaard|LINK
Strange - I re-installed and now it worked - but hey as long as it works I'm happy :)