2

私のasp.netプロジェクトでは、従業員の電子メールIDを取得するためにActiveDirectoryにアクセスする必要があります。それにアクセスするための手順は何ですか?これらのデータを取得するためにC#クラスを取得しましたが、どうすればよいかわかりません...「nslookupsettype
=all_ldap._tcp.dc._msdcs.DOMAIN_NAME」コマンドを使用してADCサーバー名を見つけました。いくつかの情報やリンクを提供して私を助けてください

ありがとう、

4

1 に答える 1

2

You can access the information you need with System.DirectoryServices.AccountManagement-Namespace. There is the class UserPrincipal, which has a static FindById-Method. You will need an PrincipalContext to query you AD. To connect to the "current"-AD you can use the Domain-Class

于 2012-10-10T12:24:47.033 に答える