I wrote this book for application developers who have experience developing .NET applications and who would like to learn best practices for building applications designed to run on the Windows Server 2003 platform.
As a developer, I?ve always found it difficult when the time comes to upgrade to a new operating system. It seems that no application upgrades 100 percent of the way that it is supposed to. During the early ?Whistler? beta builds of Windows Server 2003, I saw a lot of new things, especially in the realm of IIS 6 and COM+ 1.5, that were not being covered from a developer?s perspective. This became apparent when I began giving presentations about Whistler. During product demonstrations, I was asked the same questions almost consistently by developers. I was often left with the feeling that there was a void in the market from a developer?s perspective when it came to writing applications for Windows Server 2003. Currently, many books are available on Windows Server 2003 administration, but none are explicitly targeted at developers. This book is written by a developer for developers and addresses the issues of writing and performance-tuning applications for the Windows Server 2003 environment.
Among the many new and interesting features built into Windows Server 2003 that you can integrate into your applications are:
This book examines these features and shows you how to take advantage of them to maximize the performance and reliability of your applications. It is aimed at developers who are already familiar with the concepts of the .NET Framework and have developed .NET applications for Windows Server-based operating systems. All of the code examples are written in both VB.NET and C# (currently the most popular languages), but you can easily convert them to any .NET-compliant language.
This book will also be beneficial to you if you are familiar with .NET concepts but do not have the experience required to jump right into coding .NET in the real world. Because we will be building on the same application throughout the book, when you finish reading you will see how all of the pieces of an application fit together. In my experience, I have found that this provides a much easier mechanism for learning because you are exposed to the fine points of application development.
In this book, I?ve assumed that you are familiar with certain topics?the .NET Framework, ASP.NET, ADO.NET, code-behind development, IIS, COM+, web services, security, and deployment?so that you can begin applying these topics to a sample application that we build and tune throughout this book. It would be impossible to cover all aspects of these topics, so I focus on the pieces that you?ll find important as a real-world application developer. That way, you will gain a better understanding of how all these pieces fit into your world.
Here?s a quick breakdown of the chapters in this book:
In this chapter, we introduce Windows Server 2003 and the Microsoft .NET platform.
In this chapter, we look at the new features introduced in the .NET Framework 1.1 and how they will affect your existing .NET 1.0 applications.
This chapter shows you how to apply best practices we?ve learned in the field to your current and future ASP.NET applications. We also introduce the case study that you will build on during the course of this book using these best practices.
IIS 6?s architecture has changed significantly with Windows Server 2003. Chapter 4 discusses these changes and describes how you can use IIS 6 to gain maximum performance from your ASP.NET web applications.
In chapter 5, we illustrate the new features of COM+ in Windows Server 2003 by building a transactional component that interacts with our sample application.
This chapter discusses the new services offered by COM+, such as application pooling and recycling, Low-Memory Activation Gates, partitions, private components, and the COM+ SOAP Service.
Web services play a vital role in the .NET initiative. Chapter 7 discusses web services and how to build and consume web services in your .NET applications both synchronously and asynchronously.
In chapter 8, we discuss Windows Server 2003?s UDDI Services. You?ll learn how to use these services to describe and discover web services in an intranet environment.
In this chapter, we discuss security from both an application and a platform level. You?ll learn how and when to best secure your applications running on the Windows Server 2003 platform.
In the final chapter of this book, we explore various methods of application deployment. Here, you?ll learn how to deploy the contacts-management application you built during the course of this book.
The appendix contains the complete data model and database script used in our sample application.
The source code for the example applications in this book is also freely available from Manning?s web site, www.manning.com/foster. Much of the source code is reusable either in its original state or after some customization. The download package contains the source code, instructions on how to obtain the required external packages, and scripts that automate compiling and running the programs.
We used the following conventions in this book:
Courier typeface is used to denote code samples as well as program elements.
//C#.
Programming Windows Server 2003 is supported by an Internet forum, where you may interact with the author and other readers of this book. To access the forum and subscribe to it, point your web browser to www.manning.com/foster. There you will find a link to the forum and registration instructions.
Manning?s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest his interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publisher?s web site as long as the book is in print.
Robert Hill Foster is a .NET Architect who holds the MCSD, MCSE, MCDBA, MCT, and MCP.NET certifications. His concentration is Visual Studio .NET, and he architects distributed, enterprise-level applications. He is the founder of the Nashville Visual Studio .NET User Group, which is a charter member of INETA (International .NET Association). He is also a regular speaker at Microsoft-sponsored industry events such as Microsoft Developer Days and local user group meetings in the southeastern United States. He lives in Murfreesboro, Tennessee.
I would like to thank the following people for their support, their expertise, and their work in getting this book to print.
First, I would like to thank everyone at Manning for making the process of writing this book an unbelievable experience. My thanks go to Marjan Bace, for publishing this book and for the guidance he provided throughout the process; Ted Kennedy, for coordinating the content reviews; Liz Welch, for doing an outstanding job during the copyediting process; and the rest of the Manning team, including Ann Navarro, Susan Capparelle, Mary Piergies, Leslie Haimes, Helen Trimes, Susan Forsyth, and Chris Hillman.
The following people reviewed this book at various stages of development, and I am indebted to them for their valuable suggestions and comments: Mike Houston, Alan Dennis, Chu Xu, Michael Xu, Kristofer Gafvert (who also served as tech editor for this book), and Joel Mueller.
I would especially like to thank Mike Houston and Nexus6Studio.com for the inspiration and the hours and hours of technical conversation, and for helping me conceive the idea of writing this book during one long night in New Orleans.
Finally, I dedicate this book to my wife, Leigh, for her continued support in everything that I pursue.
The figure on the cover of Programming Windows Server 2003 is taken from a Spanish compendium of regional dress customs first published in Madrid in 1799. The book?s title page states:
Coleccion general de los Trages que usan actualmente todas las Nacionas del Mundo desubierto, dibujados y grabados con la mayor exactitud por R.M.V.A.R. Obra muy util y en special para los que tienen la del viajero universal
which we translate, as literally as possible, thus:
General collection of costumes currently used in the nations of the known world, designed and printed with great exactitude by R.M.V.A.R. This work is very useful especially for those who hold themselves to be universal travelers
Although nothing is known of the designers, engravers, and workers who colored this illustration by hand, the ?exactitude? of their execution is evident in this drawing, which is just one of many in this colorful collection. Their diversity speaks vividly of the uniqueness and individuality of the world?s towns and regions just 200 years ago. This was a time when the dress codes of two regions separated by a few dozen miles identified people uniquely as belonging to one or the other. The collection brings to life a sense of isolation and distance of that period?and of every other historic period except our own hyperkinetic present.
Dress codes have changed since then and the diversity by region, so rich at the time, has faded away. It is now often hard to tell the inhabitant of one continent from another. Perhaps, trying to view it optimistically, we have traded a cultural and visual diversity for a more varied personal life. Or a more varied and interesting intellectual and technical life.
We at Manning celebrate the inventiveness, the initiative and the fun of the computer business with book covers based on the rich diversity of regional life of two centuries ago? brought back to life by the pictures from this collection.