Serch AD information

Posted by Sagarp under C# on 11/25/2009 | Views : 1193 | Status : [Member] | Replies : 6
HI

DirectoryEntry rootEntry = new DirectoryEntry(ldap ,txtUserName.Text,txtPassword.Text);
DirectorySearcher searcher = new DirectorySearcher(rootEntry);
string Query = "raditobuttonlist1.selectvalue.tostring();"; //example selected value="User"
if (Query == "")
{
searcher.Filter = "(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))(objectCategory=user))";
}
else
{
searcher.Filter = "(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))(objectCategory=user)(" + Query + "))";
}
searcher.SearchScope = SearchScope.Subtree;
--


plz i go all information category wise.

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/



Responses

Posted by: Abhijit Jana on: 11/26/2009 [Member] [MVP] Bronze

Up
0
Down
Check this URL :

http://www.codeproject.com/KB/system/everythingInAD.aspx

Cheers !
Abhijit

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/26/2009 [Member] Bronze

Up
0
Down
HI abhijit sir


i m select through radio button list 3 list User,group and both plz tell chnages in my code


thanks
sagarp

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhijit Jana on: 11/26/2009 [Member] [MVP] Bronze

Up
0
Down
I did not get you. You are selecting user and group from radio button list and based on that you want to apply LDAP Serach ?

Cheers !
Abhijit

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/26/2009 [Member] Bronze

Up
0
Down
hiiiiii sir


yes..plz send code example


thanks
sagar

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/26/2009 [Member] Bronze

Up
0
Down
HI abhijit sir

yes..plz send code example


thanks
sagar

Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sagarp on: 11/28/2009 [Member] Bronze

Up
0
Down
HI abhijit sir

plz reply


Thanks
sagarp


Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/

Sagarp, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response