Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8739309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:54:41+00:00 2026-06-13T10:54:41+00:00

I have an application replicating data from a directory service using typical System.DirectoryServices.DirectoryEntry code.

  • 0

I have an application replicating data from a directory service using typical System.DirectoryServices.DirectoryEntry code. I now have a requirement to replicate from Novell eDirectory using SSL with a self-signed certificate. I suspect that the existing code would work with a valid certificate that could be verified, or perhaps if the self-signed cert is added to the local machine keystore. In order to make it work for sure with a self-signed cert however, the only solution I can find is to use the System.DirectoryServices.Protocols namespace and the LdapConnection class, whereby I can wire up a VerifyServerCertificate callback. I can’t find any way of applying the same concept to a DirectoryEntry instance, or of connecting with an LdapConnection instance and somehow “converting” that to a DirectoryEntry instance. Maybe it isn’t possible, I’d just like to confirm that really. Any other thoughts welcome.

The only pertinent link I’ve found is at: http://www.codeproject.com/Articles/19097/eDirectory-Authentication-using-LdapConnection-and

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:54:42+00:00Added an answer on June 13, 2026 at 10:54 am

    This is a phenomenal question.

    I’ve been battling this same issue for a few days now, and I’ve finally got some definitive proof on why the DirectoryEntry object will not work in this scenario.

    This particular Ldap server (running on LDAPS 636) also issues it’s own self signed certificate. Using LdapConnection (and monitoring the traffic via Wireshark), I noticed a handshake taking place that does not occur when using DirectoryEntry :

    enter image description here

    The first sequence is the from the secured ldap server, the second sequence is from my machine. The code that prompts the second sequence is :

    ldapConnection.SessionOptions.VerifyServerCertificate += delegate { return true; };
    

    There are others way to “fake out” the callback, but this what I’ve been using.

    Unfortunately, DirectoryEntry does not have an option or method to verify a self signed cert, thus the acceptance of the certificate never happens (second sequence), and the connection fails to initialize.

    The only feasible way to accomplish this is by using LdapConnection, in conjunction with a SearchRequest and SearchResponse. This is what I’ve got so far :

    LdapConnection ldapConnection = new LdapConnection("xxx.xxx.xxx:636");
    
    var networkCredential = new NetworkCredential("Hey", "There", "Guy");
    ldapConnection.SessionOptions.SecureSocketLayer = true;
    ldapConnection.SessionOptions.VerifyServerCertificate += delegate { return true; };
    ldapConnection.AuthType = AuthType.Negotiate;
    ldapConnection.Bind(networkCredential);
    
    SearchRequest request = new SearchRequest("DC=xxx,DC=xxx,DC=xxx", "(sAMAccountName=3074861)", SearchScope.Subtree);
    SearchResponse response = (SearchResponse)ldapConnection.SendRequest(request);
    
    if(response.Entries.Count == 1)
    {SearchResultEntry entry = response.Entries[0];
     string DN = entry.DistinguishedName;}
    

    From there you can gather AD Properties from the SearchResponse, and process accordingly. This is a total bummer though, because the SearchRequest seems to be much slower then using the DirectoryEntry.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application with needs to have access to some sensitive data(in this case
I have the following requirements for an application that many people will be using
I have a requirement to produce a prototype (running in a J2EE compatible application
We have an application that will be collecting data and storing it in local
Hi I have an application in C# to pull data down off a remote
Application2 was orginally developed an application for WinXP. Now I have to contend with
I have application which uses Sherlock ActionBar package. The application uses platform-specific behavior for
I have application where i have two view controllers my first view and second
I have application which needs to use a dll (also written by me) which
I have application that makes different queries with different results so the caching in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.