Demetri ha scritto:
Hello,
My company has charged me with creating a web service that will validate a
user and return the user's roles via Active Directory.
The requirement is that the web service must return data to any consumer.
This means the consumer may be a Java app or any app on any platform.
Now, my knowledge of returning data to consumers who are not .Net
applications or platforms is limited. I was told to make sure that SOAP
headers contain all the correct information, etc.
Can anyone explain what it entails to accomplish such a feat? Or atleast
point me to an article or some such that will help me in my quest?
Thanks
Demetri,
you shod drop a look @ System.Director yServices.
This namespace cant put your .NET WS in the Active Directory World.
All you need is getting connect with AD Server, you can use this code as
a template.
System.Director yServices.Direc toryEntry myDE = new
System.Director yServices.Direc toryEntry(@"LDA P://DC=" + domain +
",DC=it", domainAdminUser name, domainAdminPass word,
System.Director yServices.Authe nticationTypes. Secure);
as you seen is not so hard like seems.
Just pass the domain controller name and a pair of credentials that have
the rights to interact with AD.
At this time you are almost ready to perform query against AD with
DirectorySearch er. Use myDE (code above) as your SearchRoot and then..
query :)
DirectorySearch er expose a lot of methods and properties like
caching,maxresu lt for query and so on.
This is the way.
If you need more informations you can catch them on
(
http://msdn.microsoft.com/library/de...mberstopic.asp)
Hope this Help.
Greetz
Alessio