Re: active directory search doesn't work
From: Arild Bakken (arildb__at_hotmail.com)
Date: 08/19/04
- Next message: Jim Cooper: "Re: C# code analyser..."
- Previous message: Sijin Joseph: "Re: StructLayout and unions"
- In reply to: Ivan G.: "Re: active directory search doesn't work"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 13:42:11 +0200
Personally I use the .config file to store an encrypted version of the
username and password to use.
I you could get the webservice to run under a different useraccount (web
application pool in Win2003 server.) You may then be able to specify a
domain account for this apppool, and then that account would be used when
talking to the DC.
Another (but not recommended way) would be to open for anonymous access to
AD.
Arild
"Ivan G." <ivan_gavrilyuk@hotmail.com> wrote in message
news:ezmzppdhEHA.3944@tk2msftngp13.phx.gbl...
> Hi, Arild!
> You wrote on Thu, 19 Aug 2004 12:37:23 +0200:
>
> Thanks after i specify domain username and password it works fine. But
> what
> can I do to query directory without specifying any password (easy
> deployment
> needed).
>
> AB> Specify a username and password to use in the search by specifying
> that
> AB> for the searchroot DirectoryEntry (entry object in your sample).
>
> AB> Arild
>
> AB> "Ivan G." <ivan_gavrilyuk@hotmail.com> wrote in message
> AB> news:u6zrbbdhEHA.3664@TK2MSFTNGP12.phx.gbl...
> ??>> Hi.
> ??>>
> ??>> I'm trying to search active directory for users like this:
> ??>>
> ??>> DirectoryEntry entry = new DirectoryEntry(); //use default domain
> ??>>
> ??>> DirectorySearcher searcher = new DirectorySearcher(entry,
> ??>> "(|(objectclass=person)(objectclass=user))");
> ??>>
> ??>> SearchResultCollection result = searcher.FindAll();
> ??>>
> ??>> foreach(SearchResult r in result)
> ??>>
> ??>> {
> ??>>
> ??>> ...
> ??>>
> ??>> But it finds nothing when calling from web service. When doing the
> ??>> same from normail application result are what expected. Why?
> ??>>
> ??>> Thanx.
> ??>>
>
> Me.
>
>
- Next message: Jim Cooper: "Re: C# code analyser..."
- Previous message: Sijin Joseph: "Re: StructLayout and unions"
- In reply to: Ivan G.: "Re: active directory search doesn't work"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|