Set up silent authentication using LDAP / AD
Can anybody help with the above. We're using a CMS product called Immediacy, which claims it c开发者_运维问答an handle silent authentication using LDAP / AD but just can't get the thing to work.
Ignoring Immediacy, can anybody point me to a good article or post that lays out the steps to do the above (assuming it's achievable)?
Basically, we need to secure pages on our intranet, and, as our firm is full of 'very important people' who 'don't have time to log in' this is an almost essential requirement.
Thanks in advance. Rob
System.DirectoryServices
is what you what to use. It lets you create a DirectoryEntry
object which takes the location of your LDAP server, the username and password as constructors.
Once you've instantiated your DirectoryEntry object, you can check to see if its Children
collection is null
or not; if it is, that means the user isn't there and shouldn't be granted access.
You can go fancier than that if you want, since the Children
collection returns all the properties set for that individual in LDAP (including custom ones), and get greater access granularity than "there or not", but this will get you started.
Regarding Immediacy, it probably can't automatically know where your LDAP server is located, so it may be that that's a setting somewhere that isn't configured properly.
精彩评论