views:

501

answers:

2

I am new to Active Directory and asp.net authentication and following this article http://msdn.microsoft.com/en-us/library/ms998360.aspx

to get it done. In one place in the article, it says to define the Active Directory connection string, and the example given is:

 <connectionStrings>
     <add name="ADConnectionString"
        connectionString="LDAP://testdomain.test.com/CN=Users,DC=testdomain,DC=test,DC=com" />
 </connectionStrings>

I have no idea about this connection string. Can anyone please explain what this connection string is or point to some article which has details. I have other Active Directory experts in the team but they are network admins. so another way for me to know how to explain to them what i need?

thanks

+1  A: 

Here's how we connected:

<add name="ADConnectionString" connectionString="LDAP://domaincontrollername:port/DC=domainname,DC=domainnamepart2"/>

We used one of our domain controller server names and used port 389. Our domain is something like [email protected] so we entered it as above.... if you only have username@domain then it would just have one DC.

This is not the only way to connect but you get the idea.

You can use softerra ldap browser (free version) to help figure out how to connect to your servers and then use that string to help you get it right in asp.net. This is how we got started.

klabranche
A: 

A connection string is a string combined of properties/values needed by .NET framework (in this case) to connect to a database. Because there are various types of database and they work in a different way so there are also different ways of writing a connection string.

I personally never did make anything that should connect to a Active Directory but I know a very good place where you could find out how to write a connection string to Active Directory (and other known database-types). Visit ConnectionStrings.com to get more information on that.

To get a more general explanation of what a connection string is try searching for "connection string" on MSDN or Wikipedia.

Stjepan