Directory Authentication ignores domain

B

Bill Belliveau

I have the following code to authenticate. It works, however I have some question about its robustness

The code snipped

DirectoryEntry entry = new DirectoryEntry("LDAP://" + strPath, strDomainAndUsername, strPassword)

tr

Object obj = entry.NativeObject

catch (Exception Ex

throw Ex


For the most part this work, however I noticed some unusual behavior. For example specifying the strDomainAndUsername with a false domain still validates correctly. For example
strDomainAndUsername = @â€FakeDomain\Usernameâ€

The directory call apparently ignores the domain (assuming it is the same domain as the server aka path?

Aside from that I have to wonder what if this user is from another domain in the same forest and is trying to use a local server. Will the entry object propagate the request to the correct domain

If anyone has some insight or perhaps a more robust directory authentication method, please chime in
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top