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

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
 
S

siddharthkhare

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top