Link to home
Start Free TrialLog in
Avatar of i9796674
i9796674

asked on

User authentication LDAP C# 3.5

Hello,

Could please anyway send a sample code to
1. authenticate a user
2. check if the user is part of a group
3. Show attributes for that user, like name, surname, etc

I have tried different pieces of code I found on Google but nothing seems to work ok.

Thanks
Alonso
ASKER CERTIFIED SOLUTION
Avatar of angus_young_acdc
angus_young_acdc
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of i9796674
i9796674

ASKER

Hi,

Thanks for the code but it does not seem to work.

I have changed the domain and userName but what should I do with myString? where is it defined?

I know the page you mention but I have not found an example that works well doing what I wanted to do. I thought to use LDAP on 3.5 it would be something link to the System.DirectoryServices.Protocols namespace... or am I wrong here?

Thanks
Alonso
Whoops!  Thats the problem with a fast copy/paste.  You can ignore the line  idList.Add(listIndex, myString); as that was just me building a specific string and passing it back in the list.  You can publish each object (in foreach (object obj in arr)) to whatever you want and it should give you the list of groups for a specific user.  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial