AD Account Verification
Mark Aurit <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
I have a web service that interrogates the corporate active directory;
it uses the domain acccount (via IIS Windows Integrated Security) as
the "key".
Now I need to abstract it a level higher for the non-MS
browsers/platforms (or a level lower, depending on where you stand in
the religious wars :-); in that case they need to supply both the domain
account AND password that Im to verify against AD.
I believe one way is to pass the account and the password as parameters
to Directory entry and try ... catch it.
Can anyone provide any help on this? Thanks much!
// current "pseudo code" in working web service
public void GetAccount(string <domain account to lookup>,string <ldap
server>)
{
string ldapDomain="LDAP://"+<ldap server>;
System.DirectoryServices.DirectoryEntry adEntry = new
System.DirectoryServices.DirectoryEntry(ldapDomain);
System.DirectoryServices.DirectorySearcher adSearcher = new
System.DirectoryServices.DirectorySearcher(adEntry);
adSearcher.Filter = ("(anr="+<domain to lookup>+")");
System.DirectoryServices.SearchResult adResult=adSearcher.FindOne();
}
--
====================
Mark Aurit
[email protected]
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com