开发者

What's the connection string for LDAP?

Here how I need to use it:

string tmpDirectory = String.Format("LDAP://ou={0},dc={1},dc={2}", 
                                    parentOrganizationUnit,
                                    domainName,
                                    domainExtension
);

When I try to run some code using this connection, I get an exception. (See this question for more information).

I've been told I need to provide the connection string with credentials - a username and a password.

What's the connection string like? 开发者_运维问答I need the exact syntax. :) Thanks!

I'm using Windows Server 2003 and Active Directory.


The credentials don't go into the connection string, but are separate parameters on another overload of the DirectoryEntry constructor:

var entry = new DirectoryEntry(tmpDirectory, "username", "password");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜