Hello

I want to map X509Certificate object to Active Directory account using
classes from System.DirectoryServices in .NET Framework. I'm looking for
a code sample doing this with DirectorySearcher or some other classes.

I'm developing web service using Web Services Enhancements 2.0 - so the
message level security is applied.
To authenticate X509Certificate against AD I need to override
AuthenticateToken method in X509SecurityTokenManager class. And I
believe the only way to achieve the goal is to access AD in
AuthenticateToken method and map X509Certificate to AD account in this
method using DirectoryServices.

I wasn't able to find an example on the net.

I would appreciate any help.

Regards,
Marcin Belczewski

PS. Remove NIESMIEC from my address when answering on prov.