Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

my system admin gave me this:

Domain : capp.net USER : cappdhr2

Pass : admin@12345

what will the connection string be?

I am very very new to adfs. So i tried this:

<add name="ADConnectionString"
      connectionString="LDAP://capp.net/CN=dhr,DC=capp,DC=net"  />

<authentication mode="Forms">
  <forms name=".ADAuthCookie" timeout="43200"/>
</authentication>
<authorization>
</authorization>

<membership>
  <providers>
    <clear/>

    <add name="MyADMembershipProvider"
     type="System.Web.Security.ActiveDirectoryMembershipProvider"
     connectionUsername="cn=dhr2"
     connectionPassword="admin@12345"
    connectionStringName="ADConnectionString"/>

  </providers>
</membership>

I am always getting this error: Unable to establish secure connection with the server

I am doing someting wrong with the connection string. I just dont know how to fix it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
519 views
Welcome To Ask or Share your Answers For Others

1 Answer

Whenever I've accessed AD from .net I've done the following:

var directoryEntry = new DirectoryEntry("LDAP://capp.net");
directoryEntry.Username = "cappdhr2";
directoryEntry.Password = "admin@12345";

Then you can query "AD" using the DirectorySearcher.

var directorySearcher = new DirectorySearcher(directoryEntry);

...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...