Authenticating to multiple OUs in Active Directory

Posted by Jaxidian on Stack Overflow See other posts from Stack Overflow or by Jaxidian
Published on 2010-05-28T18:31:08Z Indexed on 2010/05/28 18:31 UTC
Read the original article Hit count: 282

I'm using the Active Directory Membership Provider with the following configuration:

   <connectionStrings>
      <add name="MyConnString" connectionString="LDAP://domaincontroller/OU=Product Users,DC=my,DC=domain,DC=com" />
   </connectionStrings>

  <membership defaultProvider="MyProvider">
     <providers>
        <clear />
        <add name="MyProvider" connectionStringName="MyConnString"
             connectionUsername="my.domain.com\service_account"
             connectionPassword="biguglypassword"
             type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
     </providers>
  </membership>

This works perfectly except it requires ALL of my users to be in the "Product Users" OU when I would actually like to have all of my users organized into various child OUs under our "Product Users" OU. Is this possible?

(Note that this is a partial repost of this question but the question I'm asking here was never answered there.)

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET