Re: ADSI Query to filter out machine accounts in the domain

From: Marc Scheuner [MVP ADSI] (m.scheuner_at_inova.SPAMBEGONE.ch)
Date: 03/12/04


Date: Fri, 12 Mar 2004 09:14:32 +0100


> I tried the code you proposed. The code works great with AD. I use
>the LDAP provider ("LDAP://DomainName") in the domain path when I
>create the DirectoryEntry() object.
>
>I tried using the same code for a NT domain. I changed the provider to
>WinNT ("WinNT://DomainName") in the domain path and use a domain user
>account while creating DirectoryEntry() object
>
>I get an expection in the following line
>The exception message : "The provider does not support searching and
>cannot search WinNT://corp.aspentech.com"
>Error Code : 0x80131515
>
>How should I change the code to work for a NT domain ?.

In short - you can't.

>From the MSDN docs:

"Use a DirectorySearcher to search and perform queries against an
Active Directory hierarchy using the Lightweight Directory Access
Protocol (LDAP). LDAP is the only system-supplied Active Directory
Service Interfaces (ADSI) provider that supports directory searching."

DirectorySearcher does *NOT* support WinNT.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch



Relevant Pages

  • Re: ADSI Query to filter out machine accounts in the domain
    ... In that case can I use LDAP Provider instead ... accounts for both a NT domain and AD domain. ... To be specific does LDAP ... LDAP is the only system-supplied Active Directory ...
    (microsoft.public.dotnet.languages.csharp)
  • LDAP Authentication
    ... I am trying to authenticate user and password against Sun One LDAP. ... This provider can target only Active Directory and ADAM directories ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Updating fields in an LDAP directory
    ... Does anyone know how to update a field in an LDAP directory using ASP? ... don't mean in active directory but I guess if it can be done in that then ... Object or provider is not capable of performing requested operation. ...
    (microsoft.public.inetserver.asp.general)
  • RE: LDAP + Active Directory
    ... Subject: LDAP + Active Directory ... LDAP uses an anonymous access for reading the tree, ... This list is provided by the SecurityFocus Security Intelligence Alert ... For more information on SecurityFocus' SIA service which ...
    (Pen-Test)
  • RE: LDAP + Active Directory
    ... Subject: LDAP + Active Directory ... LDAP server on it's rootdse. ... This list is provided by the SecurityFocus Security Intelligence Alert ...
    (Pen-Test)