AD Provider,SSL port and error : The container specified in theconnection string does not exist

  • Thread starter Thread starter siddharthkhare
  • Start date Start date
S

siddharthkhare

Hi All,
i have a connection string like this...
<add name="ADConnectionString1" connectionString="LDAP://ldap.A.B:636/
OU=MyUserOU,DC=A,DC=B" />

i have the provider cinfigured in web.config as

<membership defaultProvider="MyADProvider"
userIsOnlineTimeWindow="15">
<providers>
<clear />

<add name="MyADProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0,Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString1"
connectionProtection="Secure" enableSearchMethods="true"
connectionUsername="domain\User" connectionPassword="password"/>

</providers>

when I try to iterate through the providers it bombs...

this is the code where error happens
if (Membership.Providers["MyADProvider"] == null)

and error message is
"System.Configuration.ConfigurationErrorsException: The
container specified in the connection string does not exist. "

now i have tried this same path using VB script such as
following..

Set objUser = GetObject("LDAP://ldap.A.B:636/
uid=HXXXXXXX,OU=MyUserOU,DC=A,DC=B")

WScript.ECHO objUser.Get("cn")

This works and shows me the cn.

I also tried with ldp.exe and i see that there is a container
in this path.

I do not understand why provider is not finding the
conatiner...does this provider work with SSL port?

please help thanks.

Thanks
Siddharth
 
i disassmbled the code for MemeberShip class . i saw search filters
like these in many places..

searcher.Filter = "(&(objectCategory=person)(objectClass=user)" +
filter + ")";


in my AD these filters are set up differently...for example for
objectClass we do not have value "User" but somethig else such as
"InternalUsers"

and if you provide incorrect filters ..AD .net API just bombs...

so looks like a bug in security application block.
 
Back
Top