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

Categories

0 votes
530 views
in Technique[技术] by (71.8m points)

c# - How to reach LDAP authentication serveur with secured connection (LDAPS)

We are basically using this line of code to authenticate and/or retrieve informations from LDAP serveur in our web solutions:

DirectoryEntry dir = new DirectoryEntry( "LDAP://SRV-auth-01.adnav.qc.ca:636"  /*db.getLDAP()*/, user + "@adnav.qc.ca", password);

Is this a secured connection? One of my coworkers was worried that if we use this it wouldn't be totally safe, not as safe as if we managed to use put an S at the end of LDAP like so "LDAPS://SRV-auth-01.adnav.qc.ca:636"

it is working without the S though... Has someone ever managed to use an LDAPS connection with DirectoryEntry class?

related : How to connect to Active Directory via LDAPS in C#?


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

1 Answer

0 votes
by (71.8m points)

636 is a ssl only port, if this works using only "LDAP://SRV-auth-01.adnav.qc.ca:636" then it's an ssl connection, and thus the prefix "ldap://" isn't used anyway.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...