Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble Authenticating ASP.NET Users Against Active Directory
    primarykey
    data
    text
    <p>I replaced our domain name with "demo"... please ignore missing commas and such in the image below. </p> <p>My question is as follows:</p> <p>I want to authenticate the SBSUsers in my ASP.NET web application. I cannot figure out what my active directory path needs to be in order to get it to work...</p> <p>When I set it as follows, it fails to authenticate (I assume because my users are not under that path)... but it doesn't give me an error:</p> <pre><code>string adPath = "LDAP://ac-dc01.demo.local:389/CN=Configuration,DC=demo,DC=local"; string domainAndUsername = domain + @"\" + username; DirectoryEntry entry = new DirectoryEntry(adPath, domainAndUsername, pwd); // Bind to the native AdsObject to force authentication. Object obj = entry.NativeObject; DirectorySearcher search = new DirectorySearcher(entry); search.Filter = "(SAMAccountName=" + username + ")"; search.PropertiesToLoad.Add("cn"); SearchResult result = search.FindOne(); if (null == result) { return false; } // Update the new path to the user in the directory adPath = result.Path; _filterAttribute = (String)result.Properties["cn"][0]; </code></pre> <p>When I set it to what I think it should be, it errors on the entry.NativeObject line.</p> <pre><code>string adPath = "ldap://ac-dc01.demo.local:389/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=demo,DC=local"; </code></pre> <p>Any ideas? Do I need to open it up for "global" access somehow? If so, how would I go about doing that? </p> <p><img src="https://i.stack.imgur.com/amOaa.png" alt="LDAP"></p> <p>I was able to successfully connect using another piece of software...</p> <p><img src="https://i.stack.imgur.com/ivNiy.png" alt="LDAP"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload