Using ActiveDirectoryMembershipProvider to authenticate against ADAM

Hi there,

I've searched all over the internet and found more developers with the same problem, but no solutions at all.

I'm using the June CTP of VS.NET 2005 on WinXP SP2 and want to use the ActiveDirectoryMembershipProvider to validate my users against ADAM.

My web.config contains the following parts (where CDomain\MyUsername is a local administrator that is also member of the administrators-group in the ADAM-instance):
<connectionStrings
>
   <
add name="ADConnectionString" connectionString=LDAP://localhost:389/o=Company,c=NL,dc=CDomain
/>
</
connectionStrings
>

<system.web>
   <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" />
   <
membership defaultProvider="MembershipADProvider"
>
      <
providers
>
         <
add
            name="MembershipADAMProvider
"
            type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
"
            description="ADAM Provider"
 
            connectionStringName="ADAMConnectionString"
 
            connectionUsername="CDomain\MyUsername"
 
            connectionPassword="MyPassword"
/>
         </
providers
>
    </
membership
>
</system.web
>

Now, when I try to open the security-tab on the ASP.NET Configuration-site, the following error occurs:
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unable to establish secure connection with the server using SSL. (c:\Projecten\TestSolution\WebSite1\web.config line 23) .

I found a lot of information on using this provider for AD, but all the questions I found on ADAM (mostly with the same problem) do remain unanswered. I hope somebody has tried this before.

Thanx,

Bart




Answer this question

Using ActiveDirectoryMembershipProvider to authenticate against ADAM

  • Lisa Z. Morgan

    I found an article on http://www.vbdotnetheaven.com/Sections/ActiveDirectory.asp that helped me pull active directory user info based on a windows login name.




  • LostStudent

    Unles you want to jump through all of the hoops of registering certs, etc.. (which is of course the most secure way to accomplish this) then i would suggest following dan seller's instructions here:

    http://blogs.msdn.com/dansellers/archive/2005/10/11/479941.aspx

    this will at least get you up and running without all that infrastructure setup ;-)



  • Jaroslaw Pekala

    I just got over that hurdle last week.  Here's what you need to know:
    http://support.microsoft.com/default.aspx scid=kb;en-us;321051

  • Matt Olson

    The case I use this function is very simple. My company has a specific domain, my application runs on a machine of that domain. If the name of my domain is MyDomain then I simply use the connectionstring ldap://mydomain. In you case perhaps its ldap://cdomain, take the user name I see in your config file.


  • Glenn Berry

    the name MembershipADAMProvider declared in the rovider does not match the default provider.


  • Marlyn

    Hi,

    I want to try that, but what is the domain name for my ADAM Is that the instance name Or the name that is the combination of DC-components

    Bart

  • PaulWelby

    I don't know of this is the solution for your case, but I use LDAP://DOMAINNAME as connection string (use the domain name not the domain server name without any other trailing stuff) and use the administrator username in the connectionUsername attribute without the domain name (eg. Administrator not MYDOMAIN\Administrator).
    Good luck!

  • jimoctezuma

    When I do that, I'll get the name of the AD-domain that I'm logged in to, but not the name of the ADAM-instance I'm trying to connect to.



  • jeffehrl

    if you type ipconfig /all at the command prompt and look at the Primary DNS Suffix.  Or, ask you system administrator.


  • gray-team

    That won't work for ADAM, because I'm not logged in to the ADAM-domain, but to another AD-domain so the DC cannot be found using the name of the domain.

  • rouie_a

    Hi Bob,

    I already could do that, but I want to use the ActiveDirectoryMembershipProvider, because I won't have to code against LDAP myself, but will be able to use profile etc.

    Bart

  • Using ActiveDirectoryMembershipProvider to authenticate against ADAM