15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

searching for User objects ❘ OC145<br />

givenname: Ingo<br />

adspath: LDAP://magellan/CN=Ingo Rammer,OU=thinktecture,DC=cninnovation,<br />

DC=local<br />

description: Author<br />

name: Ingo Rammer<br />

givenname: Jörg<br />

adspath: LDAP://magellan/CN=Jörg Neumann,OU=thinktecture,DC=cninnovation,<br />

DC=local<br />

description: Author<br />

name: Jörg Neumann<br />

searChing for user objeCTs<br />

In this section, you build a WPF application called UserSearch. This application is flexible insofar as a<br />

specific domain controller, username, <strong>and</strong> password to access Active Directory can be entered; otherwise,<br />

the user of the running process is used. In this application, you access the schema of the Active Directory<br />

service to get the properties of a user object. The user can enter a filter string to search all user objects of a<br />

domain. It’s also possible to set the properties of the user objects that should be displayed.<br />

user interface<br />

The user interface shows numbered steps to indicate how to use the application (see Figure 52-10):<br />

figure 52-10<br />

1. Username, Password, <strong>and</strong> the Domain Controller can be entered. All this information is optional.<br />

If no domain controller is entered, the connection works with serverless binding. If the username is<br />

missing, the security context of the current user is taken.<br />

2. A button allows all the property names of the user object to be loaded dynamically in the<br />

listBoxProperties list box.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!