PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2006 by Tony Northrup, Shawn Wildermuth, Bill Ryan, and GrandMasters, LLC
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by
any means without the written permission of the publisher.
ISBN-13: 978-0-7356-2277-7
ISBN-10: 0-7356-2277-9
Library of Congress Control Number 2006924468
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWT 1 0 9 8 7 6
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information
about international editions, contact your local Microsoft Corporation office or contact Microsoft Press Inter-
national directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments
to tkinput@microsoft.com.
Microsoft, Active Directory, Excel, IntelliSense, Internet Explorer, Microsoft Press, MSDN, OpenType,
Outlook, Visual Basic, Visual C#, Visual Studio, Win32, Windows, Windows Server, and Windows Vista are
either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and
events depicted herein are fictitious. No association with any real company, organization, product, domain
name, e-mail address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided with-
out any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers,
or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly
by this book.
Acquisitions Editor: Ken Jones
Project Editor: Laura Sackerman
Technical Editors: Jim Fuchs and David Robinson
Indexers: Lee Ross and Tony Ross
Body Part No. X12-41817
For Sandi Edson
—Tony Northrup
To my mother, Pennie Wildermuth
—Shawn Wildermuth
To my parents, Walter and Carole Converse, for always being there for me.
To Kim and Sarah Finleyson for putting up with me always being busy and keeping me smiling.
Finally, to Walter Bellhaven and Herb Sewell, for helping me maintain my sanity for the past year.
—Bill Ryan
About the Authors
Tony Northrup
In the mid 1980s, Tony Northrup, CISPP, MCSE, and MVP,
learned to program in BASIC on a ZX-81 personal computer
built from a kit. Later, he mastered the 68000 assembly and
ANSI C on the Motorola VERSAdos operating system before
beginning to write code for MS-DOS. After a brief time with
the NEXTSTEP operating system, Tony returned to a
Microsoft platform because he was impressed by the beta
version of Microsoft Windows NT 3.1. Although he has
dabbled in other operating systems, Tony has since focused
on Windows development in Microsoft Visual C++, Visual
Basic, C#, and Perl (for automation projects). Tony now develops almost exclusively
for the .NET Framework.
Tony started writing in 1997 and has since published more than a dozen technology
books on the topics of development and networking. In addition, Tony has written
dozens of articles at http://www.microsoft.com, covering topics ranging from securing
ASP.NET applications, to designing firewalls to protect networks and computers.
Tony spends his spare time hiking through the woods near his Phillipston, Massachu-
setts home. He’s rarely without his camera, and in the past six years has created what
might be the largest and most popular publicly accessible database of nature and
wildlife photographs on the Internet. Tony lives with his wife Erica and his cat (also
his favorite photographic subject) Sammy.
Shawn Wildermuth
Shawn Wildermuth is a Microsoft C# MVP and is the
founder of Wildermuth Consulting Services, LLC, a com-
pany that is dedicated to delivering software and training
solutions in the Atlanta, Georgia area. He is also a speaker
on the INETA Speaker Bureau and has appeared at several
national conferences to speak on a variety of subjects.
Shawn is also the author of the book Pragmatic ADO.NET as
well as the upcoming Prescriptive Data Architectures, both for
Addison-Wesley. He has been writing articles for a number