Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys, I've been asked to implement active directory on an asp.net web api, I've never worked with this so... are there any requirements? Any frequent difficulties I should know? How should I do it? any tips, samples?
Posted
Comments
ZurdoDev 9-Feb-15 10:02am    
What exactly do you mean? If you mean your site needs to support Windows Authentication that is built-in and easy to do.

Or, do you mean you'll need to run LDAP queries against AD for various reasons?
varmartins 9-Feb-15 10:06am    
Yeah I mean running LDAP queries
ZurdoDev 9-Feb-15 10:09am    
OK, see my solution then.
Kornfeld Eliyahu Peter 9-Feb-15 10:03am    
Check this: https://msdn.microsoft.com/en-us/library/ms180890%28v=vs.80%29.aspx

1 solution

You'll use the System.DirectoryServices namespace, https://msdn.microsoft.com/en-us/library/system.directoryservices(v=vs.110).aspx[^]

Here is a good article on it: Querying Active Directory using .NET classes and LDAP queries[^]

Also, you can just google for c# ldap examples and find lots more.
 
Share this answer
 
Comments
varmartins 9-Feb-15 10:23am    
Thanks mate ;)
ZurdoDev 9-Feb-15 10:33am    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900