Re: active directory search doesn't work

From: Arild Bakken (arildb__at_hotmail.com)
Date: 08/19/04


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.
>
>



Relevant Pages

  • Re: Permissions
    ... where I must specify the correct username and password ... connect to the database without specifying a username and password. ... In enterprise manager and query analyser I must specify any of the ... > Are you using mixed mode security? ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Ruby-net-ldap fail
    ... Is it necessary to specify the organization unit? ... on username to get the DN and then use that to bind. ... than run an extra search for every authentication request. ... Ask for "Username" and append the UPN suffix ...
    (comp.lang.ruby)
  • Re: OutlookSecureTempFolder script
    ... default directory (Temporary Internet Files), but if I specify the username, ...
    (microsoft.public.scripting.wsh)
  • Re: File Transfer
    ... I dont want to go to owner applet in control panel and manually set the ... Is there a way to specify those parameteres ... username, password and domain. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: active directory
    ... All you need is a username and password to an account you create in your AD ... The problem with this is that any user accessing the webservice will get the ... and enabling basic authentication on the website. ... > Hi, Arild! ...
    (microsoft.public.dotnet.languages.csharp)