SlideShare a Scribd company logo
Programming Windows Server 2003 Robert Hill
Foster pdf download
https://ebookgate.com/product/programming-windows-
server-2003-robert-hill-foster/
Get Instant Ebook Downloads – Browse at https://ebookgate.com
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
Mastering Active Directory for Windows Server 2003 3rd
ed Edition Robert R. King
https://ebookgate.com/product/mastering-active-directory-for-
windows-server-2003-3rd-ed-edition-robert-r-king/
Mastering Windows Server 2003 1st edition Edition Mark
Minasi
https://ebookgate.com/product/mastering-windows-server-2003-1st-
edition-edition-mark-minasi/
Windows Server 2003 bible R2 and SP1 edition Jeffrey R.
Shapiro
https://ebookgate.com/product/windows-server-2003-bible-r2-and-
sp1-edition-jeffrey-r-shapiro/
Microsoft Windows Server 2003 Administrator s Companion
2nd Edition Charlie Russel
https://ebookgate.com/product/microsoft-windows-
server-2003-administrator-s-companion-2nd-edition-charlie-russel/
Windows Server 2003 best practices for enterprise
deployments 1st Edition Danielle Ruest
https://ebookgate.com/product/windows-server-2003-best-practices-
for-enterprise-deployments-1st-edition-danielle-ruest/
Beginning Microsoft SQL Server 2008 Programming Robert
Vieira
https://ebookgate.com/product/beginning-microsoft-sql-
server-2008-programming-robert-vieira/
How to Cheat at Managing Microsoft Windows Small
Business Server 2003 1st Edition Susan Snedaker
https://ebookgate.com/product/how-to-cheat-at-managing-microsoft-
windows-small-business-server-2003-1st-edition-susan-snedaker/
Planning Implementing and Maintaining a Windows Server
2003 Environment for an MCSE Certified on Windows 2000
Study Guide 1st Edition Syngress
https://ebookgate.com/product/planning-implementing-and-
maintaining-a-windows-server-2003-environment-for-an-mcse-
certified-on-windows-2000-study-guide-1st-edition-syngress/
How to Cheat at Designing a Windows Server 2003 Active
Directory Infrastructure 1st Edition B. Barber
https://ebookgate.com/product/how-to-cheat-at-designing-a-
windows-server-2003-active-directory-infrastructure-1st-edition-
b-barber/
Programming Windows Server 2003 Robert Hill Foster
Programming Windows Server 2003
Programming
Windows Server 2003
ROBERT HILL FOSTER
M A N N I N G
Greenwich
(74° w. long.)
For online information and ordering of this and other Manning books, go to
www.manning.com. The publisher offers discounts on this book when ordered
in quantity. For more information, please contact:
Special Sales Department
Manning Publications Co.
209 Bruce Park Avenue Fax: (203) 661-9018
Greenwich, CT 06830 email: orders@manning.com
©2004 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted,
in any form or by means electronic, mechanical, photocopying, or otherwise, without prior
written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial
caps or all caps.
Recognizing the importance of preserving what has been written, it is Manning’s policy to have the
books we publish printed on acid-free paper, and we exert our best efforts to that end.
Manning Publications Co. Copyeditor: Liz Welch
209 Bruce Park Avenue Typesetter: Denis Dalinnik
Greenwich, CT 06830 Cover designer: Leslie Haimes
ISBN 1-930110-98-7
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – VHG – 07 06 05 04 03
To Leigh
vii
brief contents
1 Windows Server 2003 overview 1
2 The .NET Framework, version 1.1 12
3 ASP.NET best practices 34
4 Internet Information Services 6 68
5 The Component Services 1.5 architecture 95
6 Using COM+ Services 1.5 119
7 Using XML and web services 162
8 Utilizing Microsoft UDDI Services in your enterprise 192
9 Windows Server 2003 application security 215
10 Deploying .NET applications 270
ix
contents
preface xiii
acknowledgments xvii
about the cover illustration xviii
1 Windows Server 2003 overview 1
1.1 The whole .NET enchilada 1
Smart clients 2 ) Servers 3 ) Developer tools 4
1.2 Windows Server 2003 6
Assigning server roles 6
1.3 This book’s direction 8
1.4 The Windows Server 2003 family tree 10
Windows Server 2003 Standard Edition 10 ) Windows Server
2003 Enterprise Edition 10 ) Windows Server 2003 Web
Edition 10 ) Windows Server 2003 Datacenter Edition 11
1.5 Summary 11
2 The .NET Framework, version 1.1 12
2.1 Requirements 12
Operating system 12 ) Software 13 ) Hardware 14
2.2 New features of version 1.1 15
The .NET Compact Framework 15 ) Effectively utilizing
ADO.NET 19 ) ASP.NET mobile controls 26 ) Side-by-
side execution with the .NET Framework 1.0 30 ) Framework
security 31
2.3 Summary 33
3 ASP.NET best practices 34
3.1 ASP.NET—A simple example 34
3.2 Language best practices 41
Coding styles 41 ) Binding 42
x CONTENTS
3.3 Server controls 45
ViewState 45 ) Validation 46
3.4 Error handling 47
Using no error handler 47 ) Using try/catch blocks 50
Redirecting web.config errors 53 ) Using the error event of the
application object 54 ) Best practice 54
3.5 State management 54
3.6 ASP.NET caching 56
Page output caching 56 ) Fragment caching 57 ) Using the
built-in cache API 59
3.7 The ASP.NET sample application 61
Application files 61
3.8 Summary 66
4 Internet Information Services 6 68
4.1 Installing IIS 6 68
4.2 The IIS architecture 73
IIS services 73 ) The XML metabase 74 ) IIS 6 Isolation
Modes 75
4.3 Configuring an ASP.NET application 78
Allowing dynamic content 78 ) Configuring an application
pool 79 ) Configuring an IIS 6 web site 83
4.4 IIS authentication 89
4.5 Summary 94
5 The Component Services 1.5 architecture 95
5.1 Overview of Component Services 95
In the beginning … there was COM 95 ) Moving to MTS 98
On to COM+ 98
5.2 The COM+ component architecture 99
COM+ applications 102 ) Your objects’ context 103
5.3 Creating a COM+ component 104
Designing the COM+ component 104 ) Creating the
component 106 ) Installing the component 115
5.4 Summary 118
6 Using COM+ Services 1.5 119
6.1 My Computer properties 119
6.2 Application properties 127
6.3 Component properties 135
CONTENTS xi
6.4 COM+ services new to Windows Server 2003 140
Application pooling 140 ) Application recycling 140
Configuring applications as NT services 142 ) Low-Memory
Activation Gates 143 ) Object constructor strings 145
COM+ partitions 146 ) Private components 150 ) The
COM+ SOAP service 152 ) Copying and moving COM+
components 158 ) Pausing and disabling applications 158
Process dumping 159
6.5 Summary 161
7 Using XML and web services 162
7.1 Web services overview 162
XML 162 ) SOAP 171 ) WSDL 174
7.2 Building a web service 177
7.3 Accessing a web service 181
7.4 Summary 191
8 Utilizing Microsoft UDDI Services in your enterprise 192
8.1 Installing UDDI Services 193
8.2 The UDDI Services Console 197
Site properties 197 ) Server properties 201
8.3 Configuring and using UDDI Services 204
A UDDI Services example 205
8.4 Summary 214
9 Windows Server 2003 application security 215
9.1 Platform security 215
Application architecture 216 ) IIS authentication and
authorization 216 ) Certificates 219 ) ASP.NET
authentication and authorization 227 ) Enterprise Services
authentication and authorization 229 ) SQL Server 2000
authentication and authorization 229
9.2 ASP.NET security 230
Windows authentication 230 ) Forms authentication 230
Passport authentication 248 ) The None authentication
option 250 ) URL authorization 250 ) Impersonation 251
9.3 Securing web services 251
Configuring authentication 251 ) Limit your protocols 252
Secure web service connections 253
9.4 Enterprise Services security 254
Declarative security 254 ) Programmatic security 258
xii CONTENTS
9.5 SQL Server 2000 security 260
SQL Server 2000 SSL 262
9.6 Security policies 264
9.7 Summary 269
10 Deploying .NET applications 270
10.1 Deployment strategies 270
Your assembly’s “manifest-o” 271 ) XCOPY deployment 272
Windows Installer 274
10.2 Using Visual Studio .NET for deployment 274
The Setup Wizard 275 ) Setup editors 277 ) Configuring
your setup project’s properties 282 ) Generating your MSI
file 284
10.3 Creating a deployment plan 285
10.4 Summary 285
appendix A The data model 286
index 293
xiii
preface
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 develop-
ers. This book is written by a developer for developers and addresses the issues of writ-
ing 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:
• The .NET Framework 1.1
• Internet Information Services 6
• COM+ 1.5
• UDDI Services
• Tighter security
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 develop-
ers 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 lan-
guages), but you can easily convert them to any .NET-compliant language.
xiv PREFACE
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.
CHAPTER ROAD MAP
In this book, I’ve assumed that you are familiar with certain topics—the .NET Frame-
work, 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:
Chapter 1: Windows Server 2003 overview
In this chapter, we introduce Windows Server 2003 and the Microsoft .NET platform.
Chapter 2: The .NET Framework, version 1.1
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.
Chapter 3: ASP
.NET best practices
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.
Chapter 4: Internet Information Services 6
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 perfor-
mance from your ASP.NET web applications.
Chapter 5: The COM+ 1.5 architecture
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.
SOURCE CODE xv
Chapter 6: Using COM+ Services 1.5
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.
Chapter 7: Using XML and web services.
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 synchro-
nously and asynchronously.
Chapter 8: Utilizing Microsoft UDDI Services in your
enterprise
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.
Chapter 9: Windows Server 2003 application security
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.
Chapter 10: Deploying .NET applications
In the final chapter of this book, we explore various methods of application deploy-
ment. Here, you’ll learn how to deploy the contacts-management application you
built during the course of this book.
Appendix A: The data model
The appendix contains the complete data model and database script used in our sam-
ple application.
SOURCE CODE
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 con-
tains the source code, instructions on how to obtain the required external packages,
and scripts that automate compiling and running the programs.
xvi PREFACE
CONVENTIONS
We used the following conventions in this book:
• Italic typeface is used to introduce new terms.
• Courier typeface is used to denote code samples as well as program elements.
• Code is differentiated with comments and brackets. For example, at the begin-
ning of all C# code examples, you will see a comment that looks like this: //C#.
• In VB.NET code, an underscore (_) is used at the end of a breaking line; C#
code does not use a line continuation symbol.
AUTHOR ONLINE
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 sug-
gest you try asking the author some challenging questions lest his interest stray!
The Author Online forum and the archives of previous discussions will be acces-
sible from the publisher’s web site as long as the book is in print.
ABOUT THE AUTHOR
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 archi-
tects 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 south-
eastern United States. He lives in Murfreesboro, Tennessee.
xvii
acknowledgments
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 con-
ceive 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 every-
thing that I pursue.
xviii
about the cover illustration
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 Nacio-
nas del Mundo desubierto, dibujados y grabados con la mayor exacti-
tud 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 com-
puter business with book covers based on the rich diversity of regional life of two cen-
turies ago‚ brought back to life by the pictures from this collection.
1
C H A P T E R 1
Windows Server 2003
overview
1.1 The whole .NET enchilada 1
1.2 Windows Server 2003 6
1.3 This book’s direction 8
1.4 The Windows Server 2003 family tree 10
1.5 Summary 11
It seems that “.NET” something or other is everywhere in the Microsoft world these
days. Microsoft has unleashed its marketing machine to help get the term on every-
one’s mind through its extensive television marketing. It’s important that you learn
the .NET strategy because virtually every software product Microsoft plans to release
will utilize .NET. This, in turn, will impact the way other software developers interact
with .NET products and tools. This chapter introduces .NET and discusses Microsoft’s
latest product, Windows Server 2003, which is the newest server operating system
release to join the .NET Enterprise Server family.
1.1 THE WHOLE .NET ENCHILADA
A question that I’m often asked when teaching classes and speaking at conferences is
“What is .NET?” My answer: everything! Well, .NET is not actually “everything,” but
it encompasses the technologies that support Microsoft’s newest vision of connecting
people and businesses “anywhere, anytime, and on any device.” When we dig past the
vagaries of such a marketing statement, this permanent state of connection is made
possible largely due to web services, which are small applications that connect to one
2 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW
another as well as other systems via the Internet utilizing Extensible Markup Language
(XML) as a means of communication.
Figure 1.1 demonstrates how various platforms can utilize web services to commu-
nicate with one another. This includes everything from clients—such as desktops,
phones, and PDAs—to server products—such as SQL Server and Exchange. Most
products in the Microsoft suite support web services in one way or another. In fact,
if they currently don’t support web services, it’s a safe bet that the next version of the
product will support them. Microsoft breaks web services support in .NET into three
distinct categories: smart clients, servers, and developer tools. Let’s take a closer look.
1.1.1 Smart clients
Smart clients are anything that a person can use to stay connected to a network (i.e.,
the Internet or an intranet). The most common smart clients are desktops and laptops,
which are also the most powerful ones because they include a fully functional operat-
ing system and processing power.
Figure 1.1 Microsoft’s .NET vision
THE WHOLE .NET ENCHILADA 3
Personal digital assistants (PDAs) and cell phones are also considered smart clients
because they can host local applications. Windows CE provides a solid operating sys-
tem in which you can host applications for dispersed users.
Smart clients can share the same web services to provide users with specific infor-
mation. Exposing pieces of your application to provide detailed information that users
need while they are “on the go” is a good example of how web services and smart cli-
ents are used. A real-world implementation of smart clients using web services is that
of United Parcel Service’s package-tracking application. Each package is assigned a
unique bar code so that whenever a package arrives at or leaves a facility, its location can
be traced. Though this application had its beginnings as an intranet application, it has
been exposed to the Internet for everyone to use to track personal or business packages.
Microsoft Passport is yet another way that you can utilize .NET to stay connected
wherever you are in the world. This single sign-in service lets you access multiple sites
and services, utilizing only one user ID and password. A Passport account can be cre-
ated using any valid email address. Passport, by default, gives you the functionality of
a built-in calendar for alerts, contact management, and instant messaging.
Currently, Microsoft is implementing products such as MapPoint.NET that are
entirely web services based. MapPoint.NET is the latest version of Microsoft MapPoint,
an application that provides geographical mapping functionality. It is implemented as
a subscription-based software service that is accessible over the Internet. Your applica-
tions can take advantage of web services like these by simply calling a method that is
exposed as a web service. This gives you the ability to provide graphical maps, driving
directions, and so forth in real time to your applications. For example, a package-delivery
business could develop an application in which the MapPoint.NET functionality runs
wirelessly on tablet PCs to provide their drivers with real-time maps to delivery loca-
tions—which with factors like road construction, new roads, and business and loca-
tion changes is a challenge. These implementations fulfill the “software as a service”
paradigm that Microsoft’s .NET strategy aims to achieve.
1.1.2 Servers
Microsoft introduced a new moniker and bundled a few more products into its suite
formerly known as BackOffice. This suite of products is now called the Microsoft .NET
Enterprise Servers. Currently, the .NET Enterprise Servers suite consists of the follow-
ing products:
• Application Center
• BizTalk Server
• Commerce Server
• Content Management Server
• Exchange Server
• Host Integration Server
4 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW
• Internet Security and Acceleration Server
• Microsoft Operations Manager
• Microsoft Project Server
• Mobile Information Server
• SharePoint Portal Server
• SQL Server
• Windows 2000 Server family
• Windows Server 2003 family
A common feature of these server products is that they each utilize XML in some form.
This is important to businesses because they instantly have a way for all applications
to communicate with one another via XML. Previously, this communication was much
more difficult because every business had a unique way of describing its data. XML now
provides a common syntax for data description, and industry-standard vocabularies are
being developed at an increasingly rapid pace. Due to the heavy utilization of XML in
the .NET Enterprise Servers suite, it is relatively inexpensive to integrate your applica-
tions with each other because they can speak the same language: XML. Now, extend-
ing that theory a little, if XML is the basis for cross-application communication, then
it becomes just as easy for businesses to communicate with other businesses, given an
agreed-upon vocabulary. This is where the whole .NET vision comes to fruition because
it breaks down the platform and language barriers that have been in place for as long
as computers have been around.
1.1.3 Developer tools
The last aspect of Microsoft’s .NET vision that we’ll discuss here involves changes and
improvements to the company’s software development tools. When the folks at
Microsoft set out to create a new development platform that would support their .NET
vision, they looked carefully at the types of applications that were currently being
developed so that they could best meet the needs of developers. The Web played a sig-
nificant part in the development of .NET simply because developers were writing a
large number of web applications. Also, from a web client’s prospective, the Web pro-
vides you with a standard set of protocols, such as TCP and HTTP, which are already
configured on an extremely large number of clients. Even with these protocols in place,
pre-.NET applications have a difficult time communicating with one another because
of differing protocols and the lack of “set” standards, such as XML and HTTP.
Another issue that was addressed in the .NET developer tools was the fact that pro-
grammers ended up writing a lot of complicated application infrastructure code that
consisted of anything from simple date-conversion tools to WIN32 API calls. Web
applications provide a perfect example of this because they can have many different
types of clients (i.e., Internet Explorer vs. Netscape) that require different infrastruc-
ture code. In addition to these infrastructure tasks, if you wanted to expose some of
THE WHOLE .NET ENCHILADA 5
your application’s functionality to the wireless world, you had to learn Wireless
Markup Language (WML), which introduced a new set of problems: most wireless
web phones understand a different dialect of WML. This also meant that you had to
learn several flavors of WML in order to support a sufficiently broad spectrum of wire-
less web phone users.
Most of these problems have been solved with a developer tool called the .NET
Framework. The .NET Framework is a set of utilities (actually about 6500+ classes) spe-
cifically designed for use in the creation of .NET applications. The .NET Framework
supports development efforts in any number of languages, including C#, VB.NET,
and J#, making it one of the most flexible toolkits available today.
The .NET Framework is managed by a runtime engine called the Common Lan-
guage Runtime (CLR). The CLR is similar to the Java Virtual Machine (JVM) in that
it acts as a centrally managed environment required to run your .NET applications. It
provides thread support, COM marshaling, type checking, exception management, a
security engine, a debug engine, code management, and garbage collection for your
applications. These features are discussed in more detail in chapter 2.
Figure 1.2 Runtime compilation: Going from source code to native code
6 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW
Figure 1.2 illustrates what happens when an application is compiled and executed by
the runtime. You can see that the application starts with the source code and is com-
piled by its respective compiler. Our example shows only VB.NET and C#, but com-
piles the same for any .NET-compliant language. Once the application has been
compiled, Microsoft Intermediate Language (MSIL) code is generated by the com-
piler. (MSIL is similar to assembly language.) When compiled, your application is not
actually compiled to native code, or code that is native to an operating system (i.e., it
will run only on a specific platform), until it is executed by the runtime. The first
time that the application is executed, the runtime reads the MSIL and compiles it to
native code. This process is called just-in-time (JIT) compilation. The process is exactly
the same for all .NET applications, no matter what type of application is being gener-
ated (including web, Windows, or console applications).
Learning to work with the .NET Framework and understanding how it functions
is key to writing successful .NET applications. Several tools are available that allow you
to write .NET applications effectively. Two of these are Visual Studio .NET and the
ASP.NET Web Matrix Project. This book focuses on building applications using Visual
Studio .NET. The ASP.NET Web Matrix Project, a free utility that you can download
from www.asp.net, is a development environment targeted at hobbyist ASP.NET devel-
opers who want a tool that is more robust than “Visual Notepad.” This is not to say
that the Web Matrix Project can’t be used to build robust business applications; how-
ever, Visual Studio .NET provides developers with a more robust environment in which
to develop applications (but unlike the Web Matrix Project, it isn’t free).
Both of the integrated development environments (IDEs) do give you one thing:
a “hook” into the .NET Framework so that you can easily develop .NET applications.
One thing you should keep in mind is that languages are irrelevant with .NET. The
.NET Framework is language independent, so learning how to use the Framework should
be one of your main goals as a developer; then learning the language part is easy. The
Framework is exactly the same, no matter what the language. If you study the .NET
Framework classes, and learn how to declare variables, loops, and if-then statements
in any .NET-compliant language, you can write a .NET application fairly easily.
1.2 WINDOWS SERVER 2003
Windows Server 2003 is the newest edition to the Windows family of products. Win-
dows Server brings a lot of new features to the table that you can use in your existing
and future infrastructures. It is also the first operating system to natively include the
Microsoft .NET Framework, version 1.1. This means that once you install the prod-
uct, you can begin to develop managed .NET applications that will run on Windows
Server 2003.
1.2.1 Assigning server roles
After you install Windows Server 2003, one of your first tasks is to configure your
server into a specific “role.” Each role must be manually configured by an administrator.
WINDOWS SERVER 2003 7
Server roles are designed to help you tune your server to perform a specific task or
functionality without adding any unnecessary functionality or security risks to your
server. You can set up your server as one of the following roles:
• File Server—Enables Windows to share and manage files. With this role, you
can use the NT File System (NTFS) to enable and manage disk usage quotas, set
up the Indexing Service to index your files for faster searches, and search the
content of files in various languages and formats.
• Print Server—Enables your server to provide access to and management of print-
ers on your network. You can manage your printers through Windows Manage-
ment Instrumentation (WMI). This allows you to use a scripting language like
VBScript to automate administrative functions on your printers, such as automatic
printer mapping for clients, which can also be done from a web point-and-click
interface that you set up on the print server. In addition, you can use a Uniform
Resource Locator (URL) to print to printers that are set up on a print server.
• Web Application Server—Enables the server that has Internet Information Ser-
vices (IIS) 6 set up and configured to host web applications and services.
• Mail Server—Allows you to provide Post Office Protocol 3 (POP3) services to
your users.
• Terminal Server—Allows you to remotely connect to your server with Terminal
Services. Terminal Services can be used for either remote server administration
or for serving terminal sessions to clients.
• Remote Access/VPN Server—Enables you to set up routing and remote access
to a variety of clients through Terminal Services, create custom networking solu-
tions, and use persistent network connections that allow your users to stay con-
nected to your server’s resources during long sessions.
• Domain Controller (Active Directory)—Lets you maintain all of the user’s logon
information, such as the login name and the groups in which a user belongs, and
manages the communication between other domain controllers across your network.
WARNING If your server is set up as a domain controller, you shouldn’t host web appli-
cations from it because the performance of IIS is lessened due to the load
on the server. Setting up IIS on a domain controller will work, but is not
recommended because IIS will perform poorly as a result of the dual load
of managing the network and functioning as a web server. Visual Studio
.NET is not compatible with a server that is set up as a domain controller.
• DNS Server—Allows client computers to resolve DNS domain names. This ser-
vice is used to help you locate resources on your network or other networks, such
as the Internet.
• WINS Server—Provides the functionality that lets you register and query Net-
BIOS names for legacy Windows OS machines on your network.
8 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW
• DHCP Server—Allows your server to dynamically assign IP addresses to clients
that are connected to your network.
• Streaming Media Server—Allows your server to provide live streaming media
over your intranet or the Internet.
One of the wonderful things about configuring your server to any of these server roles
is that the configuration process is completely driven by wizards. If you want to set up
your server as a domain controller, a wizard will seamlessly guide you through the
process of installing Active Directory and will automatically install any service that it
requires. You can configure your server into any combination of roles.
Because of an increased focus on security, one of the first things that you will notice
after installing Windows Server 2003 is that it is locked down by default. One of the
security issues with Windows 2000 Server was that when you set it up on a server, it
had several security holes (for example, IIS was installed by default, making it a target
for viruses like Nimda). Windows Server 2003 isn’t set up to perform any of the previ-
ously mentioned roles. In fact, most Windows services that could cause security holes
aren’t even installed (including some trivial things that may or may not be used on a
server, such as the volume control!). You as a developer or administrator have to phys-
ically configure your server to get each specific “feature” to work properly.
1.3 THIS BOOK’S DIRECTION
This book focuses mainly on the new features of Windows Server 2003 and how you
can integrate them into your existing infrastructure. These new changes heavily revolve
around COM+, IIS 6, and web services.
New features have been added to COM+ so that your applications (COM+ com-
ponents) are much more stable and secure. Some of the new COM+ features are:
• Application pooling and recycling
• Support for COM+ partitions
• The COM+ Simple Object Access Protocol (SOAP) service
• The Low-Memory Activation Gates service
• The ability to pause and disable applications
• The Process Dump tool
Much like IIS 6, COM+ applications can be pooled to run in the same worker pro-
cess. They can also be recycled if something goes wrong with the application. The
COM+ Partitions feature allows you to create and run multiple applications with dif-
ferent configurations on the same machine. For example, you can have a development
and a production application (the same DLL) running on the same machine, which
was not possible with previous versions of Component Services (which required you
to have either a development or production version running, but not both at the
same time).
THIS BOOK’S DIRECTION 9
You can easily generate a SOAP proxy class for your application in COM+ by simply
right-clicking the applications and “flipping a switch” in the properties dialog box.
The Low-Memory Activation Gates service determines whether enough virtual mem-
ory is available to start your application before it is started. If there is not enough mem-
ory, then the application will not start. This feature improves the reliability of your
applications that are running in COM+: They no longer start and then crash—which
means you won’t have to address the errors that accompany the crash.
COM+ lets you pause and disable your application without affecting any instances
of the application that are currently running in memory. You can analyze a running
process by dumping its state and viewing it with the Process Dump tool. That way,
you can troubleshoot your production applications without having to bring down
your production server to analyze a problem.
IIS 6 has been architected to follow a new process model, called Worker Process
Isolation Mode. Using this mode, your web applications and services can run in sep-
arate, isolated processes on the web server. If an isolated application were to fail, it
would not affect any other web applications or services also being hosted by the server.
The benefits of this behavior alone are enormous because of the design of IIS; it means
more uptime for your applications, with little extra administration or configuration.
This also brings us to why web services are important in Windows Server 2003. With
all of its new changes, IIS 6 was designed to make your web services very fast and highly
available, with very little downtime. Much like COM+, IIS 6 enables you to utilize web
application pooling so that your web applications will run in their own process. Win-
dows 2000’s IIS 5 web server was a great web server—meaning it was great at hosting
web applications. When it came to hosting web services, IIS 5 was not so great. This
is because IIS 5 was released before web services were technically “mainstream,” so not
as much emphasis was placed on web service performance as it was with IIS 6. IIS 6,
however, is an ideal web server for hosting web services because it is specifically tuned
to handle the loads put on it by SOAP.
Universal Description, Discovery, and Integration (UDDI) Services is another new
component found in Windows Server 2003. UDDI—a product of OASIS (www.oasis-
open.org), a not-for-profit consortium that helps drive the adoption of e-business
standards—is an industry specification for publishing and locating XML web services.
It is supported by many of the major companies in the industry, including Microsoft,
Sun Microsystems, and IBM. In essence, UDDI is a search engine for web services on
the Internet. It also allows you to describe your company or business, specify a clas-
sification for your web services, and provide details about the functions that your web
services expose to the world. The Internet consortium UDDI.org (www.uddi.org) is
composed of many companies, which make up the UDDI Business Registry (UBR).
The UBR designed and maintains the UDDI registry for the Internet.
The UDDI Services Microsoft includes with Windows Server 2003 are different
from the OASIS UDDI in that they are designed to be deployed and managed on your
intranet. While UDDI is deployed and available on the Internet, UDDI Services are
10 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW
available to your business and partners only. This allows companies to take full advan-
tage of UDDI without exposing their web services to the world.
1.4 THE WINDOWS SERVER 2003 FAMILY TREE
The Windows Server 2003 family includes four editions: Standard Edition, Enterprise
Edition, Web Edition, and Datacenter Edition. By breaking the product up into sep-
arate editions, Microsoft gives you more choices based on the needs of your business.
1.4.1 Windows Server 2003 Standard Edition
Windows Server 2003 Standard Edition is designed for either small businesses or depart-
ments with fewer than 500 users. Of the four editions, it most closely resembles Win-
dows 2000 Server. Standard Edition provides the support you need to run and manage
small to medium-sized networks in your infrastructure, including Internet Authenti-
cation Service (IAS), Internet Connection Sharing (ICS), and two-way symmetric pro-
cessing. In addition, you can configure this server into any combination of server roles
(see section 1.2.1) in order to gain maximum benefit of the product (remember, by
default everything is locked down). It supports up to 4 GB of RAM, provides support
for either one or two processors, and unlike Enterprise and Datacenter Edition, is
available only on the x86 platform.
1.4.2 Windows Server 2003 Enterprise Edition
Windows Server 2003 Enterprise Edition is designed for medium to large enterprises
with more than 500 users. This product resembles Windows 2000 Advanced Server.
It differs from Standard Edition in that it provides you with clustering features, which
allow you to scale your server load out, or add more servers to balance processing
load, so that you can apply load balancing to your infrastructure. Clustering your
servers together also gives you more reliability by implementing fail-over support for
your mission-critical applications. Enterprise Edition comes in two forms: a 32-bit
edition for x86 servers and a 64-bit edition for Itanium and Itanium 2 servers. Both
versions provide eight-way symmetric multiprocessing (SMP), eight-node clustering,
and support for up to eight processors. The 32-bit version supports up to 32 GB of
RAM, while the 64-bit version supports up to 64 GB of RAM.
1.4.3 Windows Server 2003 Web Edition
Windows Server 2003 Web Edition is the newest themed version in the Windows Server
2003 family. It is specifically designed to be a web server, with an emphasis on hosting
ASP.NET web applications. It is most similar to Windows .NET Standard Server in the
features that it offers, but is not designed to do major day-to-day network operations,
such as acting as a domain controller. It can be used largely to scale out a front-end
web site for supporting more users. Web Edition supports two-way SMP and up to 2 GB
of RAM.
SUMMARY 11
1.4.4 Windows Server 2003 Datacenter Edition
Windows Server 2003 Datacenter Edition is the most scalable of any product in the
Windows Server 2003 family of products. It is designed for the largest enterprises so that
they can deliver their mission-critical applications, databases, ERP systems, or server
farms. It differs from Enterprise Edition only in that it can be scaled further up (sup-
port for more RAM, CPUs, etc.) and out (support for clustering more servers together).
It supports 32-way SMP, eight-node clustering, and up to 64 processors. Much like
Enterprise Edition, it also comes in 32-bit and 64-bit versions. The 64-bit version pro-
vides support for both Itanium and Itanium 2 processors. The 32-bit version supports
up to 64 GB of RAM, and the 64-bit version supports up to 128 GB of RAM.
1.5 SUMMARY
The Microsoft .NET vision enables you to stay connected anytime, anywhere, and on
any device with Windows Server 2003 setting the stage for you to better make these
types of applications a reality. With the changes that have been made to COM+ and
IIS 6, Windows Server 2003 is a great operating system for laying the foundation of
your enterprise applications. The introduction of four different editions of Windows
Server 2003 gives you the flexibility to implement just the software and hardware
support needed to suit your enterprise computing tasks.
In the next chapter, you’ll learn about the .NET Framework 1.1 and how you can
begin using it immediately after installing Windows Server 2003.
12
C H A P T E R 2
The .NET Framework,
version 1.1
2.1 Requirements 12
2.2 New features of version 1.1 15
2.3 Summary 33
The .NET Framework, version 1.1, accompanied the release of the Windows Server
2003 family. This version includes bug fixes from version 1.0, as well as a few new
classes, but mostly it includes various entities that you were required to download and
install into version 1.0 separately. In this chapter, we discuss these changes and see
how they affect both our current and future applications.
2.1 REQUIREMENTS
Before you install the .NET Framework 1.1 on a machine, it is essential to recognize the
operating system (OS), software, and hardware requirements for both the server and
the client platforms. Almost all of the requirements are the same as with version 1.0
of the Framework, so you don’t have to worry about breaking your applications. This
is good for you as a developer because it will make for a smooth transition to the new
version. This section describes the requirements of the .NET Framework 1.1.
2.1.1 Operating system
The requirements for the Windows operating system (currently the only platform that
.NET will run on) are relatively broad, compared to the other requirements for the .NET
Framework. They can be broken down to two categories: client and server requirements.
REQUIREMENTS 13
In order for the client to be able to run the .NET Framework, you need one of
the following:
• Windows 98/98SE
• Windows ME
• Windows NT 4 Workstation (Service Pack 6a)
• Windows NT 4 Server (Service Pack 6a)
• Windows 2000 Professional
• Windows 2000 Server family
• Windows XP Professional
• Windows XP Home
• Windows Server 2003 family
NOTE In any discussion of OS requirements, the Mono Project (www.go-mono. com)
always seems to make its way into the conversation. Currently a few indus-
try initiatives—among them the Mono Project—are porting the .NET Frame-
work to other platforms. The Mono Project is a venture designed to enable
the .NET Framework to run on Linux.
All of the Windows operating systems require Microsoft Internet Explorer 5.01 or later
and the Windows Installer, version 2.0. An example of when you will need to install
the .NET Framework on a client machine is anytime that you would like to run a .NET
application locally—for example, a Windows Forms application.
The OS requirements for the server are a little more stringent than those for the
client. This is because the server will be used mainly for ASP.NET applications and there-
fore must have Internet Information Services (IIS) installed. To meet the OS require-
ments for the server, you need one of the following:
• Windows 2000 Professional (Service Pack 2)
• Windows 2000 Server family (Service Pack 2)
• Windows XP Professional
• Windows Server 2003 family
2.1.2 Software
You will need some additional software in order to use certain features of the .NET
Framework, such as ASP.NET, COM+, and the SQL Server Managed Provider. Again,
these requirements can be broken down into two categories: client and server.
Table 2.1 lists additional features for clients and the corresponding requirements.
You can obtain the Windows 2000 Service Pack 2 through the Windows Update fea-
ture. Windows Management and Instrumentation (WMI) is included with most
“recent” operating systems, as you can see in table 2.1, but you can download it from
Microsoft. The Microsoft Data Access Components (MDAC) 2.7 (or later versions) can
14 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
be installed in one of several ways. First, updates to it are usually included in products
such as Microsoft Office. Deploying the .NET Framework will also deploy the MDAC.
You can easily determine which version is installed from Windows 2000 or later by
opening RegEdit and navigating to HKEY_LOCAL_MACHINESOFTWAREMicro-
softDataAccess. The Version attribute contains the currently installed version of
MDAC. If you do not have the proper version of MDAC, you can download it from
www.microsoft.com/data (Windows Server 2003 ships with MDAC 2.8). Table 2.2
lists additional features for servers and the corresponding requirements.
NOTE If you do not plan on installing Visual Studio .NET on your server (and you
are not running one of the Windows Server 2003 family of products), you
can simply run the Component Update included with Visual Studio .NET.
This will install everything you need to host and run applications available
on the .NET Framework.
2.1.3 Hardware
In addition to the software requirements for version 1.1 of the .NET Framework, let’s
look at the hardware you need to run the Framework (table 2.3).
The hardware requirements are relatively low, so there’s a good chance that the
minimum OS requirements are greater than the minimum requirements for the
.NET Framework. You should evaluate both and choose whichever one yields the
higher performance.
Table 2.1 Additional features and software requirements for clients
Feature Requirements
COM+ Windows 2000 Service Pack 2 or later
System Management Access WMI, which is installed by default on Windows 2000, ME,
and XP
SQL Server .NET Managed Provider Microsoft Data Access Components (MDAC) 2.7 or later
Table 2.2 Additional features and software requirements for servers
Feature Requirements
ASP
.NET Internet Information Services 5.0 or later
SQL Server .NET Managed Provider Microsoft Data Access Components 2.7 or later
Table 2.3 Hardware requirements
Required Recommended
Pentium 133 MHz with 128 MB of RAM >= Pentium 133 MHz, with >= 256 MB of RAM
NEW FEATURES OF VERSION 1.1 15
2.2 NEW FEATURES OF VERSION 1.1
The .NET Framework 1.1 is included with the Windows Server 2003 family of
products. As we explained in the introduction, it includes bug fixes and features that
you were required to download separately to extend the functionality of version 1.0.
The new features described in this section include the .NET Compact Framework,
ADO.NET, ASP.NET mobile controls, side-by-side execution with version 1.0, and
Framework security.
2.2.1 The .NET Compact Framework
Because of the rising popularity of mobile devices (i.e., running Windows CE),
Microsoft offers the .NET Compact Framework to meet the demands of these
devices. The Compact Framework is a subset of the .NET Framework; it contains less
overhead and gives you a smaller footprint when installed on a mobile device.
The .NET Compact Framework is new to the overall .NET Framework. It was
released in conjunction with the .NET Framework 1.1. By utilizing the Compact Frame-
work, you can easily write applications that are designed for smart devices, such as
PDAs, mobile phones, and set-top boxes.
One of the first things you will notice about the .NET Compact Framework is that
you already know how to develop applications on this platform. You can use Visual
Studio .NET to develop applications written using this framework. That way, you’re
using a familiar tool and familiar controls to develop your smart-device applications.
A common problem for developers is that writing applications for PDAs and mobile
phones simply can’t be done by using one platform. For example, if you develop an
application that runs on the Pocket PC platform, then you have to learn a tool such
as Embedded VB or Embedded C++. These standalone tools are closely related to
Visual Basic 6.0 and Visual C++ 6, but you can only use them to develop Pocket PC
applications. If you want to develop applications for PalmOS, you must use a tool such
as CodeWarrior or AppForge. A concern with PDA development is that such a wide
variety of CPUs and development platforms is available that it becomes difficult to
determine which platform is the best for your particular problem.
If your application is to be run on a mobile web phone (i.e., a WAP-enabled
phone), then you have to learn a completely different language: Wireless Markup Lan-
guage (WML). One of the major problems with developing WML applications is that
much discrepancy exists between versions of the WML specification that each phone
is able to render. WML also requires constant connectivity, which can be a problem
due to loss of signal, interference, and other such factors. Additionally, WML is
designed to display data only on a mobile web phone; you can’t take advantage of any
client-side processing.
The .NET Compact Framework solves many of these issues by giving developers
one shared platform to develop a wide variety of applications. It currently supports
development in both VB.NET and C# for devices running Pocket PC and Pocket PC
16 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
2002, Microsoft Smartphone, and any device that runs Windows CE.NET, such as the
new Windows-based PDAs.
The Compact Framework utilizes much of the same programming model as .NET
Windows Forms applications, which means that you can just as easily write applica-
tions using the .NET Compact Framework as you can with the full-blown .NET Frame-
work. The Compact Framework includes about 25 percent of the .NET Framework
classes and is designed to run on a mobile device. When an application runs on a mobile
device using the .NET Compact Framework, it gets compiled to native code for that
device because the device has a version of the Common Language Runtime (CLR) run-
ning locally. This is not the case with Embedded Visual Basic; the code is interpreted.
One of the key features of the Compact Framework is that it was designed from
the ground up to support web services. This is important to remember because it
means that your networked mobile devices can communicate with many different sys-
tems by using common web service protocols—which opens up lots of functionality
to you as a mobile developer, no matter which platform you’re using. For example, if
you have web services written on the Java platform, your .NET Compact Framework
applications can take full advantage of them.
Another key is that unlike most PDA programming models in the past, the .NET
Compact Framework has a built-in security model. This model follows the same
“evidence-based” security model as .NET desktop applications. One of the problems
with other mobile technologies is that there is no defined security model. Developers
Figure 2.1
The Stock Quote
application
NEW FEATURES OF VERSION 1.1 17
end up having to write their own methods for security, which can vary drastically from
application to application.
Let’s take a quick look at a simple .NET Compact Framework application. This
application utilizes a web service that is hosted by Nexus6Studio.com and allows you
to search for stock quotes by providing a company’s ticker symbol. In figure 2.1, our
example application displays stock symbols. As you can see, all that is required from
the user is a valid stock symbol to return data from the web service.
Figure 2.2 demonstrates adding a web reference to the stock quote web service. As
you can see by the browser window, the services provide us with two methods:
GetQuickQuote and GetDetailQuote. Both methods require a ticker symbol as
a single input parameter. The GetQuickQuote method returns the price only as a
string object, and GetDetailQuote returns a custom data type in the form of a
structure called DetailQuote.
Once our references have been set, we can easily use the services (listing 2.1).
'VB.NET
Private Sub cmdGetQuote_Click(ByVal sender As System.Object, ByVal e _
As System.EventArgs) Handles cmdGetQuote.Click
Dim oWS As New Nexus6StudioStockQuoteWebService
If optDetailedQuote.Checked Then
Listing 2.1 Using the Nexus6Studio.com stock ticker web service
Figure 2.2 Adding a web reference to the Stock Quote web service
18 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
Dim q As DetailQuote
q = oWS.GetDetailQuote(txtTicker.Text.Trim.ToUpper)
With q
lblPriceVal.Text = .Price
lblChangePtsVal.Text = .Change_Points
lblChangePctVal.Text = .Change_Percent.Replace("""", _
String.Empty)
lblOpenVal.Text = .Open
lblHighVal.Text = .High
lblLowVal.Text = .Low
lblBidVal.Text = .Bid
lblAskVal.Text = .Ask
lblVolumeVal.Text = .Volume
End With
Else
lblPriceVal.Text = _
oWS.GetQuickQuote(txtTicker.Text.Trim.ToUpper)
lblChangePtsVal.Text = "N/A"
lblChangePctVal.Text = "N/A"
lblOpenVal.Text = "N/A"
lblHighVal.Text = "N/A"
lblLowVal.Text = "N/A"
lblBidVal.Text = "N/A"
lblAskVal.Text = "N/A"
lblVolumeVal.Text = "N/A"
End If
End Sub
//C#
private void cmdGetQuote_Click(object sender, System.EventArgs e)
{
Nexus6StudioStockQuoteWebService oWS = new
Nexus6StudioStockQuoteWebService();
if(optDetailedQuote.Checked == true)
{
DetailQuote q;
q = oWS.GetDetailQuote(txtTicker.Text.Trim().ToUpper());
lblPriceVal.Text = q.Price;
lblChangePtsVal.Text = q.Change_Points;
lblChangePctVal.Text = q.Change_Percent.Replace(""",
String.Empty);
lblOpenVal.Text = q.Open;
lblHighVal.Text = q.High;
lblLowVal.Text = q.Low;
lblBidVal.Text = q.Bid;
lblAskVal.Text = q.Ask;
lblVolumeVal.Text = q.Volume;
}
else
{
lblPriceVal.Text =
oWS.GetQuickQuote(txtTicker.Text.Trim().ToUpper());
NEW FEATURES OF VERSION 1.1 19
lblChangePtsVal.Text = "N/A";
lblChangePctVal.Text = "N/A";
lblOpenVal.Text = "N/A";
lblHighVal.Text = "N/A";
lblLowVal.Text = "N/A";
lblBidVal.Text = "N/A";
lblAskVal.Text = "N/A";
lblVolumeVal.Text = "N/A";
}
}
When the user enters a stock quote and clicks the Get Quote button, an instance of
the web service is created. If the user clicks GetDetailQuote on the resulting screen,
then the GetDetailQuote method is called and populates the labels with the
returned data. If the user clicks GetQuickQuote, the GetQuickQuote method is
called and populates the Price label with the price returned by the web service and
fills all other labels with the value N/A.
Overall, the .NET Compact Framework is built on the same concepts that you
already know, so you gain the knowledge of building secure applications for mobile
devices along with learning VB.NET and C# applications.
2.2.2 Effectively utilizing ADO.NET
Microsoft has extended ADO.NET to include the Oracle and ODBC .NET data pro-
viders. That means you can natively use ADO.NET to access Oracle databases and
ODBC databases without having to perform a separate download and install to gain
access to these features. In this section, you’ll learn about ADO.NET by looking at dif-
ferent ways to connect to databases other than SQL Server.
Connecting to Oracle
If you are querying against an Oracle database, you want to use the Oracle .NET Data
Provider because it gives you the best performance (much like the SqlClient for SQL
Server). The Oracle provider is located in the System.Data.OracleClient
namespace in the .NET Framework. Until this provider was available, developers had
to use the OLEDB .NET Data Provider when accessing Oracle databases. Although
that approach is acceptable for accessing any database, the Oracle .NET Data Provider
yields much stronger performance, similar to the SQL Server .NET Data Provider.
When you use the Oracle .NET Data Provider, you bypass the need to use OLEDB
drivers in order to perform queries. This dramatically increases the performance of your
application because you don’t have to go through a “middleman” (OLEDB) to access
the database. The calls are sent directly into Oracle by using the Oracle Call Interface
(OCI), which give you a “hook” into the database from your application. (The OCI
is the technology used by the Oracle client software.) The .NET Data Provider for
Oracle provides support for the new data types that were introduced in Oracle 9i, as
20 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
well as ref cursors. Ref cursors become useful when you are running stored procedures
that return result sets. Your Oracle database must be 8i Release 3 (8.1.7) or later to
be able to use the .NET Data Provider for Oracle.
If your database meets the version requirements, it is easy to use the Oracle .NET
Data Provider. Let’s take a look at a code sample (listing 2.2) and learn how to use
the Oracle .NET Data Provider to connect to a database.
'VB.NET
Imports System.Data.OracleClient
Public Class OracleNet
Sub BindDataGrid()
Dim cnOracle As New OracleConnection( _
"Data Source=OracleDB;Integrated Security=SSPI")
Dim cmdEmployees As New OracleCommand( _
"SELECT * FROM Employees", cnOracle)
cmdEmployees.CommandType = CommandType.Text
Dim ds As New DataSet()
Dim adpEmployees As New OracleDataAdapter(cmdEmployees)
adpEmployees.Fill(ds, "Employees")
dgEmployees.DataSource = ds.Tables("Employees")
End Sub
End Class
//C#
using System.Data.OracleClient;
using System.Data;
public class OracleNet
{
void BindDataGrid()
{
OracleConnection cnOracle = new OracleConnection("Data
Source=OracleDB;Integrated Security=SSPI");
OracleCommand cmdEmployees = new OracleCommand("SELECT *
FROM Employees", cnOracle);
cmdEmployees.CommandType = CommandType.Text;
DataSet ds = new DataSet();
OracleDataAdapter adpEmployees = new
OracleDataAdapter(cmdEmployees);
adpEmployees.Fill(ds, "Employees");
dgEmployees.DataSource = ds.Tables["Employees"];
}
}
First, the BindDataGrid method in listing 2.2 creates an OracleConnection
object and passes a connection string into the constructor. Then, the code creates an
OracleCommand object, which executes a query that selects all rows and columns
Listing 2.2 Connecting to Oracle
NEW FEATURES OF VERSION 1.1 21
from the Employees table in the Oracle database. Next, the code creates an Oracle-
DataAdapter object and passes the corresponding OracleCommand object,
cmdEmployees, into the constructor. Finally, the code calls the Fill method of
the OracleDataAdapter object, adpEmployees, to execute the query and pop-
ulates a DataSet object, ds, with the result set of the query. Finally, the code binds
the returned table to a DataGrid object, dgEmployees, to display it on a form.
Connecting to Access
As you can see in the previous example, connecting to Oracle using the Oracle .NET
Data Provider is a simple process. As listing 2.3 shows, it is equally easy to connect to
a database by using the ODBC .NET Data Provider that is included with the .NET
Framework 1.1.
'VB.NET
Imports System.Data.Odbc
Public Class Class1
Sub BindDataGrid()
Dim cnODBC As New OdbcConnection( _
"Driver={Microsoft Access Driver (*.mdb)};
Dbq=c:somepathmydb.mdb;Uid=Admin;Pwd=")
Dim cmdEmployees As New OdbcCommand( _
"SELECT * FROM Employees", cnODBC)
cmdEmployees.CommandType = CommandType.Text
Dim ds As New DataSet()
Dim adpEmployees As New OdbcDataAdapter(cmdEmployees)
adpEmployees.Fill(ds, "Employees")
dgEmployees.DataSource = ds.Tables("Employees")
End Sub
End Class
//C#
using System.Data;
using System.Data.Odbc;
public class Class1
{
void BindDataGrid()
{
OdbcConnection cnODBC = new
OdbcConnection("Driver={Microsoft Access
Driver (*.mdb)};
Dbq=c:somepathmydb.mdb;Uid=Admin;Pwd=");
OdbcCommand cmdEmployees = new
OdbcCommand("SELECT * FROM Employees", cnODBC);
cmdEmployees.CommandType = CommandType.Text;
DataSet ds = new DataSet();
OdbcDataAdapter adpEmployees = new
Listing 2.3 Connecting to Microsoft Access
22 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
OdbcDataAdapter(cmdEmployees);
adpEmployees.Fill(ds, "Employees");
dgEmployees.DataSource = ds.Tables["Employees"];
}
}
Listing 2.3 is similar to the previous listing, except that we are connecting to
Microsoft Access using the ODBC .NET Data Provider.
Utilizing universal data link files
One of the problems that I often encounter when I am on a consulting project is that
my current client has a different database (i.e., the manufacturer, such as Microsoft or
Oracle) from my previous client. And more times than not, it is usually a different
database than SQL Server. So, off to the Internet I go to figure out how to write a con-
nection string for the current database that I’m working with. Table 2.4 lists the con-
nection strings that you can use to connect to various databases using the four .NET
Data Providers.
Table 2.4 Connection strings
Provider Database Connection String
SqlClient SQL Server 7
.0
and later
Data Source=ServerName;Initial Catalog=database;
Integrated Security=SSPI;
OracleClient Oracle 8i
Release 3
(8.1.7) and later
Data Source=OracleInstance;Integrated Security=SSPI
OleDb SQL Server Provider=SQLOLEDB;Data Source=ServerName;
Initial Catalog=database;User ID=aUsername;Password=aPassword;
Oracle Provider=OraOLEDB.Oracle;Data Source=OracleInstance;
User ID=aUsername;Password=aPassword;
Sybase Provider=Sybase ASE OLE DB Provider;Data Source=aDataSource;
Database=database;User ID=aUsername;Password=aPassword;
Access Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=c:pathaccessDB.mdb;User ID=Admin;Password=;
IBM AS/400 Provider=IBMDA400.DataSource.1;Data Source=database;
User ID=aUsername;Password=aPassword;
Odbc SQL Server Driver={SQL Server};Server=ServerName;Database=database;
UID=aUsername;PWD=aPassword;
Oracle Driver={Microsoft ODBC for Oracle};Server=OracleInstance;
UID=aUsername;PWD=aPassword;
Sybase Driver={Sybase System 11};SRVR=ServerName;DB=Database;
UID=aUsername;PWD=aPassword;
Access Driver={Microsoft Access Driver (*.mdb)};
Dbq=c:pathaccessDB.mdb;UID=Admin;PWD=;
DSN DSN=dsnName;UID=aUsername;PWD=aPassword;
NEW FEATURES OF VERSION 1.1 23
Though universal data link (UDL) files are not native to the .NET Framework 1.1, I
feel that it is an important issue to cover in this section. A well-known fact is that it is
easy to create a Data Source Name (DSN) to connect to an ODBC database. This can be
done in the data sources (ODBC) tool that is built into Windows. However, if you
want to connect to an OLEDB data source, then a DSN is useless. It is just as easy to
create a connection to an OLEDB data source by using UDL files. You can create a UDL
file by simply right-clicking on your desktop or in a directory, selecting New, and
then choosing Text Document. When the new text document appears in your direc-
tory, rename it and change the extension from .txt to .udl. For example, Pubs.udl
would be a good filename for a UDL file that is configured to point at the Pubs data-
base. Once you rename the file, double-click it to open the Data Link Properties dia-
log box, shown in figure 2.3.
The Provider tab lets you select an OLEDB provider for the database to which you
would like to connect. The tab displays a list of OLEDB providers that are installed
on your machine. For this example, select the Microsoft OLE DB Provider for SQL
Server, as we’ve done in figure 2.3. Next, select the Connection tab, shown in figure 2.4.
The Connection tab (figure 2.4) allows you to select a server where the database
is located, logon information, and the database you want to connect to. It also lets you
test the current connection configuration by clicking the Test Connection button.
At this point, click the Advanced tab, shown in figure 2.5. On this tab, you specify
network settings, the connection timeout, and access permissions for the connection.
The Impersonation Level drop-down list allows you to specify how the server will
impersonate the client; possible values are:
Figure 2.3
The Data Link Properties dialog
box, open to the Provider tab
24 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1
• Anonymous—The client is anonymous to the server.
• Delegate—The process impersonates the client’s security context.
• Identity—The server can obtain the client’s identity.
• Impersonate—The server impersonates the client’s security context.
Figure 2.4
The Connection tab
Figure 2.5
The Advanced tab
Another Random Document on
Scribd Without Any Related Topics
Gordon paused to lean down and speak confidentially to the
invalid. “We can’t make him wear a belt,” he said, “and he won’t
wear a khaki coat, either. He’s very funny about some things; well,
good-by.”
Mr. Wade gave them a letter to be delivered to Dr. Brent, alias
Red Deer, and bade them a hearty good-by, with many hints to be
used in their search for the needle in the haystack. The three patrols
stood together and gave them a great send-off. But not the full
troop, either, for seated by the roadside over the hill, they came
upon Frankie and his faithful follower, Giant George.
“What did you think of that scheme yesterday?” said Frankie.
“It was great,” answered Harry.
“I thought up all those signs,” Frankie continued.
“They were very clever, too,” Harry said.
“I thought up that about the odd shoes, too.”
“That was the best part; well, good-by, Frank.”
They had gone perhaps a hundred yards when the piping voice
of Giant George was heard in rebellious altercation with his leader,
and presently a frantic shout from him brought them to a halt.
“I thought up that about the odd garters!” he shouted.
“Good for you, George!”
CHAPTER XIII
AN EXTRAORDINARY INVENTION
(Patent not applied for)
They cut up through the woods where Gordon had picked his
way to the Albany camp, for he wanted to show Harry the chasm
and the path he had taken.
“Now, Kid,” said Harry, “you will be kind enough to keep your
beautiful brown eyes straight ahead, or by the great eternal sphinx
I’ll put a pair of blinders on you. No more pink arrows! Just look
ahead and listen to me. We’ve got three things to do, and one of
them is right in your line. First, we’ve got to strike Crown Point and
find the elderly lady who lost this bag.”
“How do you know she’s elderly, Harry?”
“On account of the smelling salts. Then we’ve got to find the
troop, and if all goes well I’m going to give Mr. E. C. Wade the
surprise of his life. How would you like to be Ethan Allen?”
“What!” said Gordon, the idea suddenly dawning on him.
“Well, now,” Harry continued, “Ethan Allen was like you; he was
the kind of a fellow who could find a way.”
“That’s like you, Harry.”
“Well, but he liked to talk and make fine speeches, too, so I think
it’s up to you. Anyway, I’m going to put the idea up to Red Deer, if
we can root him out, and see if we can’t plan an assault. We’ll
reconnoiter the locality, send a couple of scouts in, then go over into
Vermont, transport our men in dories right under Mr. Wade’s nose,
gag his sentries (he’ll have some out, you can wager), and enter the
fort, call upstairs and give him Allen’s speech about Jehovah and the
Continental Congress. Exactly how we’ll take the fort is a thing I’ll
have to think out and talk over with Red Deer. But so far, how does it
strike you?”
Gordon was radiant. “It’s great, Harry! It’s simply fine! And I read
in a book—the school history—that after it was all over Ethan Allen
and Seth Warner made a trip to Philadelphia and received the thanks
of Congress; and we’ll do that too, Harry, we—”
“I don’t just see how we could do that,” said Harry.
“Yes, we could, Harry; there’s a way. My uncle belongs to a club
where there’s a man who knows a senator, and he—”
“Now just come down to earth,” said Harry. “Do you suppose
Allen was figuring on the thanks of Congress before he did anything?
You’re a nice kind of patriot!”
They had reached the chasm and explored it together. Harry
found a strip of wood which had evidently held the three logs
together when they spanned the gully, and found that it contained
several nails exactly like the telltale one whose impressions he had
followed. He even found another one lying in the mud.
“It’s seldom a man commits a crime,” he said, “without either
taking or leaving something that he doesn’t mean to. Sometimes it
isn’t large enough to convict him. Sometimes it’s so small that it
escapes notice. But a hundred to one, he takes or leaves something.
Come on, let’s get away from here. You did great work, Kid.”
That was the last that Harry ever said, voluntarily, about the
sordid crime. He seemed disgusted at all mention of it and anxious
to forget it.
Emerging on the road where Gordon had seen the pink arrow,
they started north for their belated ascent of Dibble Mountain. Their
purpose was to get an outlook from its summit and go down its
northern slope into the little village of Crown Point. They had almost
reached the point where the stream ran under the road in its
journey to the lake, when they heard voices ahead, and presently
came in sight of a country boy leaning over the railing of the bridge
and talking to some one below.
“Never heerd o’ no sech feller outside a book. I seen a book onct
with a guy by the name o’ Dan’l Boone onto it, but I never heerd tell
o’ no sech a feller in these parts; there’s a Dan’l Berry over to
Hammondville. How’s that?”
A voice answered from below, but Harry and Gordon could not
hear what it said.
“Oh, why didn’t ye say so?” the country boy called down. “Kind o’
play-actin’ folks, was they?”
By this time the boys had reached the bridge. Underneath,
rocking gently in the water, was the handsomest motor boat that
Harry Arnold had ever seen. Its brass trimmings shone dazzling in
the morning sunlight. Cushions of scarlet plush covered its seats,
their vivid color thrown into relief by the color of the boat itself,
which was as white as snow. Also as white as snow was the
mustache of the gentleman who occupied it, and the eyes which met
those of Gordon and Harry as they looked down were genial with
just the suggestion of a humorous twinkle. He wore a linen suit, very
much wrinkled, and very much wrinkled, also, was the kindly face,
and rather scanty were the gray locks that showed under the little
blue yatching cap which he wore. A young man in chauffeur’s attire
sat near the engine with his hand on the steering-gear.
“Good morning,” said the gentleman. “How far can I get with this
thing?”
“Not much farther, I’m afraid,” answered Harry. “How much does
she draw?”
“Now, you’ve got me,” said the gentleman, laughing. “How much
does she draw, Pat?”
Pat shook his head.
“She draws about twenty dollars a week in the summer,” said the
gentleman, “and if she were mine, I’d discharge her.”
“What seems to be the trouble?” laughed Harry.
“The trouble,” responded the gentleman, merrily, “is between
herself and my son—it’s not my quarrel. She is occasionally taken
with carburitis, which is a complaint of the carbureter. To-day she’s
doing very nicely, thank you. Do either of you boys know where the
Boy Scouts have their camp—how far up this stream? I’m trying to
get to them.”
“We just came from there,” Harry answered. “They’re about two
miles up, but I’m afraid you’ll have to foot it. It’s pretty shallow and
rocky from here on.”
The gentleman put on his glasses. “Oh, yes,” said he, “I might
have noticed. Is that a blue shirt you’ve got on? The sun is right in
my eyes—you tall fellow, I mean?”
“It’s supposed to be blue,” laughed Harry.
“He’s got a khaki one,” added Gordon, “but he never wears it.”
“You belong up there, I suppose?”
“No, sir, we’ve been making them a visit. We’re a couple of
tramps just now.”
“Is that a leather wristlet you’ve got?”
“Yes, sir.”
“Well, just come—no, wait a minute—I’ll come up there.”
“Stay where you are, sir,” answered Harry. “We’ll come down.”
He led the way down as if he expected to be charged with a
crime. He suspected what was coming.
“Come in here, my boy—you too. My name is Robert E. Danforth.
I have a place across the lake. You saved my boy’s life yesterday—
don’t attempt to deny it! You’re the very boy I’m looking for. Did you
give your name as Buffalo Bill? You did—don’t deny it! Who are you,
anyway? Why didn’t you come up to the house so that we could
thank you? Do you realize what you did?”
Harry had hoped that he might hear nothing more of the
incident, but there was nothing now for him to do but face the
music.
Mr. Robert E. Danforth, according to gossip, had begun life with
nine cents, and he now had nine million dollars. It was not likely that
such a man would permit the modesty of a boy scout to stand in the
way of his purpose. And his purpose now was to make suitable
acknowledgment to the boy who had saved his little son’s life. In the
winter Mr. Danforth worked very hard; in the summer he played very
hard, and this was his play season.
He would hear of nothing but that the two boys should go back
with him to Overlook, his magnificent estate on the Vermont shore.
So the boat’s prow was turned downstream and the little craft went
chugging out through the reedy basin and across the lake toward a
beautiful boat-house surmounted by an octagonal cupola, in one of
the open arches of which they could see a small figure. They were
halfway across when suddenly a white object shot from the cupola
and dropped into the water a few feet from the boat.
“Get it, Pat,” said Mr. Danforth, and the boat was steered over to
the floating object, which Harry reached for and secured. It was a
little aeroplane, crude enough in construction, having a plane about
twenty inches long, on which dried glue, somewhat sticky now from
the plunge, appeared in untidy masses. But as Harry lifted it, the
propeller, which was nothing but one of those celluloid fans which
shoot into the air when twisted from between the hands, began to
revolve with a steady, even motion, continuing for fully half a
minute. Mr. Danforth smiled as Harry examined it.
“He thinks he’s going to revolutionize juvenile aeronautics,” said
the father.
“Well, I don’t know but what he will!” said Harry. “What is this,
anyway?”
“It’s the alarm apparatus from a clock.”
The mechanism was bound with thread under the center of the
plane. The brass frame which encased a set of clockwork had been
filed into and broken off, so that nothing was left but a little corner
of frame holding a small clock spring, one little cogwheel, and the
catch and release teeth which create and govern the vibration of the
upright striking bar. The little metal knob, or striker, on the top of the
bar had been twisted off and, since its weight modified the striking
action, its removal created an excess of power which was here taken
up by the propeller. This latter was rather clumsily connected with
the mechanism by a light, flat-linked brass chain which ran around
the cogwheel. The trouble with the whole affair was its weight,
which, though small, might easily have been reduced still further.
They had now reached the boat-house, where the man jumped
out and hauled the craft in between two others, one a beautiful
steam yacht. The other, about the size of an ordinary rowboat, was
covered with canvas. The little boy whom Harry had rescued met
them on the stairs, his eyes glistening with tears.
“It’s the twenty-third time it wouldn’t go,” he said.
“Never mind, my boy,” said his father, putting his arm
affectionately over the little fellow’s shoulder. “Maybe it will go next
time.”
“Twenty-three’s a hoodoo number, anyway,” added Harry. “Why
do you send it over the water?”
“Because if it flies across the lake, I’ll win the cup. But it won’t—it
never does.”
“Well, Pat will row out and get it for you every single time,” said
his father, soothingly.
“It’ll get spoiled—it’s spoiled now—the ones you buy go.” He
almost broke out crying, and Mr. Danforth looked as if the little
fellow’s disappointment actually hurt him.
“I was all this week and two days of last week making it—and it’s
spoiled.” He set his lips tight in a manly effort to control his distress.
Harry stepped forward, placing his arm over the boy’s shoulder
as his father had done. “You remember me?” he said in his quiet
way. “Well, now, you listen a minute. Never mind if your machine is
spoiled, you’ve still got the idea and it’s a mighty good one, too. You
can work it up again and make it still better.” He smiled
encouragingly and patted the little fellow’s shoulder. The father was
delighted.
“Hear that, Pen? This is the boy who got you out of the water
yesterday—come to see how you are—maybe he can give you some
ideas. Take him up to the aviation tower and show him things—show
him the cup.” He winked at Harry. “I want you boys to stay here till
to-morrow,” he called after them as Penfield led the way upstairs,
“as a favor to me.”
“I’m afraid we’ll never find our friends unless we get about it,”
Harry protested.
“Well, one day won’t make any difference. I want a chance to
talk to you. Come up to the house when you’ve seen his den.”
Penfield led them into a little octagonal room, littered thick with
shavings, pieces of silk, tangled masses of reed, and a fishing rod
which had been laid under contribution for strips of bamboo.
Magazine cuts of the various types of air craft, the Curtis, the Voisin,
the Cody, and the Wright, were tacked on the wall.
“That’s the Voisin,” said Penfield, excitedly, as Harry stood before
the picture. “It looks like the Wright, but it isn’t, it’s got more
longitudinal stability on account of the enclosed ends and partitions.
But it can’t coast like the Wright. I like monoplanes best, don’t you?
That’s the Bleriot. You can flex the tips of the planes, that’s one
thing about it I like. Pat likes the Antoinette model, but I don’t. The
Curtis is my favorite,—only, of course, that’s a biplane. You can’t
make a toy biplane fly, it needs too much control. But the Curtis is
my favorite. It’s the lightest of all, but that isn’t why I like it. And it
has the best finish, but that isn’t why I like it, either. It’s the control;
you lift and decline the fore planes by shifting the steering wheel.
And the balance is controlled by moving your body sideways. Isn’t
that a dandy idea? But I like the Wright brothers—my, I’d like to see
them!”
“Well, they began just like you,” said Harry.
There was one thing he noticed in particular as he picked up the
broken and unfinished models that lay about. The most common,
everyday objects had been used for some practical purpose. A
circular typewriter eraser acted as wheel to a cog chain. Metal paper
clips were used to hold joints. The circular, hollow bar of a gas jet
held together and served as ferrule and fore-weight to the three
dowel sticks forming a motor-base. The boy seemed to have his own
way of doing everything, and everything he had done was ingenious.
On a rough bracket, six feet or so above the floor, stood a
battered pewter stein.
“That the cup?” Harry asked.
“Yes, that’s it, but I can’t touch it—not till I’ve won it.”
“Who offered it?” Gordon asked.
“I did, but I make believe it was a club. I’m trying to win it—it’s a
trophy. I can’t even touch it till my monoplane flies across the lake.”
Gordon would have laughed, but he encountered Harry’s look,
and refrained.
“Well, now, let’s see,” Harry said, sitting down and taking the
little model on his knees. “I think we’re just the fellows for you.
You’ve heard of the Boy Scouts, I suppose. Well, we belong to the
Scouts of Oakwood, New Jersey, and there’s an aero club in our
troop—”
“Oh, my father’s building a house there,” cried the boy.
“Where—Oakwood?”
“Yes, we’re going to live there this Fall when it’s finished. We’re
not going to live in the city any more.”
“Do you suppose he means the big house they’re putting up on
the hill?” Harry asked of Gordon.
“Yes, it’s on the hill,” Penfield spoke up, “and I’m going to sleep
outdoors.”
“Well, that’s news,” said Harry. “I wondered who was putting up
that house.”
“Yes, and may I join your aero club—if I make one that goes?”
“You certainly may!” said Harry. “You can join the troop, and then
if you are interested in aeroplanes you can join the little club six of
the boys have formed. There’s going to be a big meet in Oakwood
this Fall; any boy that lives in the county can enter his ’plane—
provided he made it. I believe the Oakwood News is offering a cup,
too, isn’t it, Gordon? I don’t know very much about aeros myself.”
“He does too,” said Gordon.
Penfield was delighted. Excitedly he explained his crude little
model to Harry. And Harry saw that the novel motive power which
he had used held vast possibilities. He wound up the spring and
found that the power sustained the propeller in rapid motion for
thirty-four seconds.
“Twelve seconds is the best ever done with elastic band torsion,”
said Penfield. It was evident that he had been studying the subject.
“Well, then,” said Harry, in a brown study. “I don’t see why we
should lose those twelve seconds. Let’s see, twelve and thirty-four
make forty-six. Forty-six seconds in the air will beat any model
airship ever made. Say that you lose six seconds for the transfer of
power—there you have forty left.”
“What do you mean?” asked both boys.
“Why, see here. The way they run these things usually—those
you buy as well as the home-made ones—is by a long, thin strand of
elastic from the axis of the propeller to a stationary hook. Wind the
propeller and it winds the elastic—there’s your power. Now, see this
little jigger here?” He put his finger on the upright wire bar on which
the striker of the alarm had been mounted. “This vibrates rapidly
while the spring is unwinding. Now, suppose you bend the top of it
into a hook, wind up your elastic, then wind up your spring. This
striker bar will hold the wound spring stationary until the power of
the elastic is exhausted. As soon as the elastic is run down, the
spring goes to work. There are half a dozen ways to connect the
spring movement with the propeller—the catch chain is one. You’ll
have to work it out. I give you the tip—the name is also thrown in—
it’s the celebrated Strikastic Multiple Motor, producing a sustained
flight of about forty seconds. ‘Strike’ stands for striker; ‘astic’ for
elastic.”
“Or you might call it the Clockubber Transfer Motive System—that
brings in clock and rubber,” said Gordon. “Or better still, the
Penalarm Torsubber Champastic Double Motor—there you’ve got
everything in—Penfield, Alarm, Torsion, Rubber, Champlain, Elastic
and—and—wait a minute—”
“No aeroplane could carry such a name as that,” said Harry, “it
would keel right over. Now, old boy,” he said to Penfield, “if I were
you, I’d take time and make this right, and I believe you’ll have a
winner. Make your plane bigger—thirty inches anyway, and flex it.
You take a wooden pie plate and see how much higher it goes than
a flat disk.
“Flex it this way” (he showed with pencil and paper); “then if I
were you I’d have the sticks of your motor-base, or backbone, as
you might call it, just wide enough apart to wedge this clockwork
business between; it’ll stand rigid and you’ll get rid of a lot of
friction. You might take away the brass frame altogether and line the
wooden casing with aluminum. You’ve got to have the spring farther
aft than this so as to have a good long span of elastic. I don’t know
what will happen up in the air when the power is transferred. Your
propeller will probably slow down a second or two; you’ve got to
experiment with that. Your difficulty is going to be in utilizing the
power supplied by the spring by some light, simple mechanism.
Cogwheels eat up a lot of energy—but there’s a way, as my old
college chum here would say, and it’s up to you.”
The boy stood radiant as they rose to go.
“Did you think of using the alarm apparatus?” Harry asked him.
“Yes, but now I see what can be done with it—and—you’re a
genius.”
“No, you’re the genius,” Harry answered; “you’d have worked it
up this way sooner or later. You see, your plane was too small for
your motor; then, again, this isn’t a first-rate propeller, it hasn’t
enough slant.”
“I know how to make one,” Penfield broke in. “You cut strips of
cigar-box wood, glue them on top of each other, put a nail in the
middle, then before they begin to dry, twist them a little, as you do
with a pack of cards. When the pile dries, whittle off the uneven
edges, and you’ve got a dandy propeller. It’s easier than trying to
make one out of one piece.”
“How’d you learn that?” Harry asked.
“Oh, I thought of it when I saw some one twist a pack of cards.”
They went up a gravel walk which wound through the green
lawn, and found Mr. and Mrs. Danforth on the porch. Penfield
disappeared and Mrs. Danforth greeted the boys, thanking Harry
profusely for his service to her son. They found it was true that Mr.
Danforth was building a house in Oakwood and that the family were
to go there early in the Fall.
“We have done everything we could for Penfield,” said Mrs.
Danforth. “We bought this place so that he might have the mountain
air, and we are leaving New York for the same reason. Yet we can’t
get him to go outdoors and play with other boys. He would much
rather sit in the house and read. Last year the boys in Ticonderoga
had a baseball eleven, the small boys, and asked him to play
quarterstop—”
“Shortstop,” corrected her husband.
“But we couldn’t get him to, he simply wouldn’t. And it was the
same with football. He would not go on the frying pan.”
“Gridiron,” said Mr. Danforth.
“Diamond,” said Mrs. Danforth.
“No, ‘diamond’ is in baseball.”
“Well, then, where was it they wanted him to play quarterdeck?”
“Quarterdeck is on a ship; Roger said something about
quarterback, but Pen couldn’t play quarter.”
“Why don’t you have him join the scouts?” asked Gordon.
“I wish you boys would take him in hand this Fall,” said Mr.
Danforth.
“He spends all his time indoors making aeroplanes and reading
about them.”
“Well, that’s a good thing,” said Harry. “But he ought to get
outdoors, of course. I’ve been telling him about an aviation contest
they’re getting up in Oakwood, and he thinks he’d like to enter.
Suppose we get him to join the scouts after we all get home, and
then—”
“Do they shoot off guns?” asked Mrs. Danforth, looking fearfully
at Harry’s rifle.
“Sometimes, but not the younger ones. It would be a great thing
for your boy.”
The answer surprised him. “I think it would be splendid.”
An hour later, as Mr. Danforth was showing the boys over the
place, he stopped abruptly.
“You’ll stay over night with us?” Harry thanked him but said it
was impossible. He knew the house was full of guests; the tennis
courts were crowded with young people, among whom he could
distinctly see the valiant hero of the day before bobbing about, and
he thought of his own and Gordon’s very limited wardrobe. Then,
too, they were anxious to lose no more time.
“Well, then,” said Mr. Danforth, “I won’t urge you, but you know
you’re welcome. Now I want to make some little acknowledgment
for what you did yesterday—something in the way of a trophy, as
you might say.” He had evidently sized Harry up with his wonted
business shrewdness, and he avoided the word “reward.” His tact did
him small good, however.
“I don’t think you could make any better acknowledgment than
you have done,” said Harry, feeling a trifle uncomfortable, as he
always did when any one praised him. He spoke in his customary
careless tone, but his nervous little smile seemed to say that he
would like to have done with all this. This uneasiness of the boy who
was always so much the master of himself was amusing.
“Of course, it would be absurd,” Mr. Danforth continued, “to ask
you if you are fond of the water.” Gordon’s eyes opened wide and he
listened with rapt attention. “The boat we came across in was
recently brought up from New York. But before that my elder son,
who is away at present, ordered one which we tried, but found too
small for our parties. In fact, it’s nothing but a little motor-dory. It’s
down by the boat-house now, and I want you to tumble your freight
into it and take it along just to remember us by—or leave it here till
you come back if you’d rather.” There was an awkward pause.
Gordon stood in terrible suspense.
“I couldn’t do that, Mr. Danforth,” said Harry. “I don’t know how
to thank you, and if you knew how fond of the water I am, you’d see
how the idea of a present of that kind nearly turns my head. You’ve
—you’ve hit me in the weakest spot,” he said, kicking the gravel walk
and smiling ruefully, “but I can’t take it—I—I—just can’t.”
“Why can’t you?”
“Because it’s one of our rules to accept nothing for service to a
stranger. We have our own awards, honors, and of course we can try
for those. That’s different. Saving life isn’t always hard, anyway; the
little fellow isn’t heavy, and, well, I guess obeying rules is sometimes
harder. Maybe that’s the good thing about rules.” His foot still kicked
the gravel, nervously.
“Now, look here, my boy, you listen to me. That’s all nonsense,
and what’s more, I don’t believe you understand the rule.”
“Yes, I do, Mr. Danforth, it’s part of the law.”
“Well, see how lawyers differ about the law,” he went on
cheerfully, “and besides, you can’t have a law that isn’t constitutional
—you must know that. Now here’s a rule which infringes on personal
liberty, which forbids me to dispose of a boat that I don’t want. That
isn’t fair, now, is it?”
“That’s right, Harry,” broke in Gordon, “we have no right to
interfere with personal liberty—no one would say that was right.
We’d have no right to even if we wanted to, Harry.”
Harry laughed in spite of himself.
“Last year,” Mr. Danforth went on, “I gave a thousand dollars to
the library out in the little Western town where I was born. They
didn’t refuse it. This year I gave five thousand dollars to help start a
hospital. They took it all right.”
“Well,” said Harry, “if you wanted to do something for the Scout
organization, I couldn’t stop you, but—”
Mr. Danforth seemed about to speak, then suddenly changed his
mind, studying Harry closely. The boy was not aware of the scrutiny,
for his eyes were on the ground. Neither did he know that he had
put an idea into this kindly gentleman’s shrewd mind.
“What, for instance?” Mr. Danforth asked.
“Oh, I don’t know; I didn’t just mean to say that.”
“Is there any reward, or honor, as you call it, for doing a service
to the Boy Scouts?”
“There is, yes, sir. But I think it’s only given in very rare cases.
There was one boy up in Maine who stopped a forest fire which
threatened a big summer pavilion that the organization owned. I
think they made him the award, but that’s the only case I’ve heard
of. I think the rule says, ‘rare and exceptional service,’ or something
like that. My friend here knows the regulations better than I do. I
think that’s the only case.”
“What is it called?”
“The gold cross,” said Harry.
“Where is the headquarters of the organization?”
“It’s in New York, sir,” said Gordon.
“I see.”
Penfield joined them, and they wandered down to the shore. “Let
me show you the boat, anyway,” Mr. Danforth urged.
“I’d rather not, sir,” said Harry, hesitatingly. “I—well, I’d just
rather not.” Instinctively he held out his hand, and Mr. Danforth
shook it cordially.
“There’s no use asking you to think it over?”
“No, sir, but I don’t know how to thank you—I wish I did. You’ll
let Penfield join us in the Fall, won’t you?”
“Of course, I want him to.”
“He’s going to walk away with the prize cup,” Harry added.
“Yes, and he’ll accept it, too,” was Mr. Danforth’s final shot, as the
two scouts got into the boat in which Pat was to take them across
the lake.
“Good-by, Pen,” said Harry, shaking hands with the little fellow.
“You work up that idea now, and make your planes large enough,
and don’t forget to flex them the way I showed you—get some strips
of whalebone. We’ll be home when you get to Oakwood, and we’ll
sail in and win that trophy so easily it’ll be a shame to take it.”
“He’s a mighty nice little fellow, and clever too,” Harry said, as
they crossed the lake. Gordon disdained to reply. Neither did he
speak as they left the boat and started across the quarter-mile
stretch of flat country toward Dibble Mountain.
“Where are we going, anyway?” he finally demanded sullenly.
“Up Dibble Mountain to spy round the country—where’d you
think?” was Harry’s cheery answer.
“How’d I know?”
“Why, that was the idea, wasn’t it?”
“I don’t care where we go.”
“What’s the matter, Kid?”
“Nothing the matter with me. Goodness, I can speak, can’t I!”
“Well, what are you grouching about, then?”
“Who’s grouching?”
“You are; don’t you want to hunt up the troop?”
“Oh, certainly, if you care to.”
“We’d be a couple of gumps to go back home now.”
“Well, there’s more than one way of being a gump.”
“Refusing a boat, for instance? What do I want of a boat? I’ve
got you along, Kid, and that’s all I care about. I’d rather have you
than twenty boats. Come now, brace up, old man.”
“You didn’t have sense enough to be convinced by reason. That
was a fine argument about the public library and the hospital.”
“I know it, Kid. I don’t claim to have much sense—you’ll just
have to put up with me.”
“You won’t gain anything, either,” Gordon continued spitefully.
“My father knows him; he belongs to a trust and he’ll manage to get
around the law all right.”
“He’s a pretty shrewd business man, I should say,” Harry
commented.
“You bet he is, and he’ll think up a way.”
“He’s like you, Kid, eh?”
CHAPTER XIV
ON DIBBLE MOUNTAIN
The belated quest of the needle in the haystack now went
forward in real earnest. In the cool of that same afternoon they
stood on the brow of Dibble Mountain. Gordon’s hands were dyed
purple from the berries he had picked and eaten along the way, and
a goodly smootch ornamented his cheek. Sometimes the ascent was
so steep that they found the easiest way was to “shinny” up the
slender trees along the mountain side, and step off on to the jutting
cliffs. It was slow work. From a great bowlder they finally looked
down upon the surrounding country, which now, for the first time, as
Gordon said, actually did look like a map.
To the east, and almost under them, as it seemed, was the lake,
and beyond it the green hills of western Vermont. On its northern
side the mountain sloped gradually, including Breed’s Hill and Sugar
Hill in its easy descent, and beyond these lay the little village of
Crown Point. Close on the west rose the great bulk of Buck
Mountain, towering above them and closing out their view. Five
miles southward lay Ticonderoga, and looking to the west of the
village the boys followed an imaginary course northward, trying to
pick out in the dense woods the location of the Albany camp. The
several roads which they had traversed looked like gray pencilings.
Between them and the lofty Buck Mountain ran a high, walled
valley, almost a cañon indeed, known as Burgoyne’s Pass, for it was
through this valley that the British general led his army for the
surprise of Ticonderoga,—the army which, hungry and forlorn, was
destined to surrender to the Americans at Saratoga. Far in the north,
but near enough to see its outline clearly, rose Bald Knob, a veritable
monarch amid its great neighbors. Here and there thin columns of
smoke rose, suggesting pleasant habitations and reminding the
hungry boys that it was supper time.
“Well, what do you think of our seats up in the family circle, Kid?
Pretty good view up here, hey?”
“It’s A-No. 1! But I don’t see the troop, do you?”
“Certainly, right over there.”
“Not! That’s a church! Let’s take a squint through that field glass,
will you? Placing the telescope to his eye,” Gordon continued, suiting
the action to the word, “our young hero now proceeded to gaze
round the landscape, when suddenly—”
“The bully, who was standing near,” interrupted Harry, also
suiting his action to the word, “gently took it from him.”
“Ha! I will be even with you yet!” said Gordon, dramatically.
“Kid, I think the best thing for us to do is to camp here for the
night. If the moon comes out, we can see pretty nearly the whole
section of country that I marked on the map—I mean we could see
any smoke that rose. This is the very nearest mountain to the shore.
We can overlook the low land immediately north and south. As for
the west, that big chunk of earth is in the way, but they wouldn’t be
to the west. If we have to go up Buck Mountain, we will. But to-
night I think we’d better perch here, and when these folks about the
country get through supper they’ll let their fires go out, and any
smoke we see after that will be from a camp-fire. There’s no use
going west of that ridge, is there?”
“What ridge?”
“Why, we’re in the Champlain Valley; this mountain happens to
be standing almost alone, commanding north and south.”
“Is it standing in the bottom of the valley, Harry?”
“Yes.”
“How about old shaggy-headed Buck, next door, here?”
“That’s part of the ridge.”
“I believe you’re honest, Harry, so I’ll take your word for all that.”
“All right, we’ll stay here, then.”
“But answer me one question, Harry, before I trust my fate to
thee. Where is the other side of the valley?”
“Over in Vermont. The Green Mountains.”
Gordon looked about. “Over there?”
“Yes, but I’m not considering that side. I’m only considering this
side of the lake.”
“You are splitting the valley down the middle like a piece of
kindling wood?”
“Correct.”
“Harry, you would not deceive me?”
“I’ll gag you in a minute.”
“And this mountain is a kind of knot in the wood, Harry? Do all
the splitting you like, but for goodness sake, be careful—”
Harry placed his hand over Gordon’s mouth, and by a dexterous
movement tumbled him on to the ground. “Get up now, and help
pitch camp, and I’ll make you a rice pudding with figs in it. How
does that strike you?”
“I can stand it if you can.”
“No sooner said than stung,” observed Harry.
Their first business was to find water, and this they soon
discovered—a crystal spring, ice cold, that bubbled temptingly up
between the rocks. While Gordon kindled a fire, Henry felled a small
sapling and binding it horizontally between two other saplings, in a
sheltered spot, threw his balloon silk shelter over it, drawing it
diagonally toward the earth on either side. Gordon kept up a running
accompaniment as he busied himself with the fireplace.
“‘Oh, we are merry mountaineers,
And have no carking cares or fears.’
“What kind of a care is a carking care, Harry?”
“Don’t know.”
“One that’s made out of khaki, I guess—don’t you throw that!
Roll that green log this way, will you, Harold? Many thanks. Placing
the green log in a parallel position to the other one, our young hero
now knelt stealthily—”
“Our young hero will never see home again if he isn’t careful,”
said Harry, as he tugged at the cover of a can.
“When suddenly,” continued Gordon, “the bully—”
But actions spoke louder than words. The bully let fly both camp
cushions, one after the other, and under this rapid fusillade “our
young hero” sank to the ground.
“Coward! Coward!” he called.
“Look here, Kid,” said Harry, standing over him and brandishing
the can opener, “I’ve got you on the top of this lonely mountain. My
contract provides that I shall accompany you in searching for camp.
It does not include your old friend Alger, nor Harry Castleman, either.
In just a minute—”
Gordon rose contritely. “What next—Harold?”
“Put some water to boil.”
They sat with their backs against the trunk of a large tree, and
Gordon admitted that fried bacon never tasted so good, and that
nothing went so well with it as pilot biscuit. “I don’t see what they
have bread and butter for, anyway,” said he. But his inventive genius
would not long remain satisfied with the fare which Harry provided,
and presently he was announcing luscious combinations. “I say, try
this, Harry—it’s simply great!” He handed Harry two slices of bacon
with a fig between them. When the rice pudding was served, words
failed him. He ate it with silent and serene delight. They topped off
with squares of chocolate, on one of which Gordon was on the point
of pouring a little “fly-dope” by way of experiment.
When they had finished the meal, Gordon suggested “going back
the way they had come,” beginning with chocolate, thence to rice
pudding, thence to bacon; but Harry vetoed this novel plan.
It was with considerable suspense that they awaited the rising of
the moon. As the twilight faded, the smoke which rose here and
there in the distance disappeared till no stir was visible on the
horizon. The boys knew that a cooking fire in the open, unless it
were very close at hand, would hardly be discernible, but they set
their faith in the campfire of huge logs, such as Red Deer had never
tired of describing. About nine o’clock Gordon, who had gone to the
spring for water, came rushing back, wildly pointing to a circling line
of smoke in the southwest which was thrown into clear relief against
the moonlit sky.
“Look, Harry, there they are!” he cried.
“Yes, I saw that,” said Harry. “You see that little silvery streak just
beyond? That’s the stream. It’s the Albany camp. I’d like first rate to
be there with them, too.”
“We’ll see them again,” said Gordon, somewhat crestfallen.
“You bet,” Harry answered, “when we surprise them in the old
fort.”
“We’ll give them a jocular demonstration, all right, hey, Harry?”
“Ocular!” said Harry.
They played mumbly-peg in the moonlight, and discussed the
proposed attack upon the “British stronghold.” Gordon was for doing
everything, even to the smallest detail, with historical fidelity. “You
must be sure to call ‘What, ho!’ Harry, when Mr. Wade asks who it is,
because that’s in the book, and you must roll your r’s the way they
do up in Vermont. I wish we had an old rusty sword!”
“What’ll we do with them when we’ve made them prisoners,
Harry?”
“That’ll be our chance to return their hospitality,” Harry
answered. “They’ll be the guests of the Green Mountain Boys, and
Mr. Wade will have to go away back and sit quietly down.”
“Oh, it’ll be great!” said Gordon, with a positive groan of delight.
“I wish it was the last two weeks of August now!”
“If we do it.”
“If we do it? Of course, we’ll do it!”
It was ten o’clock or after when Gordon’s roaming vision was
arrested by a thin, gray line rising out of the black woods far to the
north. Harry got out his compass and found that it was a little west
of north and, as nearly as he could judge, five or six miles distant.
He studied it closely.
“That’s it, sure,” said Gordon.
“You might run up there and see,” Harry answered dryly. “I’ll wait
till you get back.” He got out his map and tried to determine the
locality. “Port Henry is eight or nine miles north of here, see?” he
said. “It may possibly come from there, but it’s not coming out of a
chimney, I’m almost certain. Of course, there’s no telling how far
north it is, but it’s probably this side of the high land which begins
with Bulwagga Mountain. I dare say it’s between Bulwagga and the
shore. There’s a stream there, too—Grove Brook—and that would
attract them.” He studied it long and carefully. “I don’t see any
suggestion of lightness below it, do you? It must be at least five
miles off.”
“Harry, I have an idea!”
“Good for you.”
“You know Red Deer’s rule—eleven o’clock sharp. We all agreed
to it. You remember what he said about not leaving any fire burning?
Well, now, if they smother that at eleven o’clock—I can just see
Conway jumping up like a little tin soldier and piling on green stuff
as soon as Red Deer gives the word. You’ll see, Harry, something will
happen to that at eleven o’clock!”
Harry folded his map, took a piece of chocolate, and settled
himself comfortably against the tree trunk. “We’ll wait and see,” he
said.
The thin, distant column wavered in the moonlight, its top
dissolving in the air. Sometimes it was scarcely visible. As eleven
o’clock drew near, they watched it with growing suspense. The
smoke in the southwest had long since died away. For twenty
minutes or so before the hour the boys fancied that the column was
losing somewhat in volume. Eleven o’clock came—five—ten minutes
after eleven and nothing happened. Gordon looked puzzled. “I—I
guess, maybe, Red Deer’s watch is wrong,” he said.
“Look!” shouted Harry, jumping to his feet.
The thread of smoke had suddenly expanded into a dense mass.
They could see it plainly now.
“We’ve found them! We’ve found them!” shouted Gordon.
“When our young hero gets over his fit,” said Harry, “I will gently
remind him that we have not found them at all. There is something
going on up in that direction—there seems to be a fire. That’s all we
know.” But they watched the thickening mass intently. “Well,” said
Harry, “we may as well obey the rule, Kid; let’s turn in. In the
morning we’ll cut up through Crown Point village and camp on high
ground to-morrow night.”
“No, sir! We’ll go straight—”
“Where?”
“To that—to camp.”
“Yes, but where?”
“Right where that smoke is.”
“There won’t be any smoke there to-morrow morning. Where do
you propose to go? Can you point me out on the map just where
that smoke is? Well, then, come down out of your airship and listen
to reason. If to-morrow is very clear we may possibly be able to pick
out the smoke of the cook fire—assuming that that’s our own camp.
But I don’t think there’s much chance of our seeing it. That smoke
has been coming from several good-sized logs—it’s a big fire. To-
morrow we’ll drop into Crown Point and return this little reticule to
its owner and then—”
“And you’ll ask questions in Crown Point, Harry, and they’ll tell
you just where our camp is, and you’ll spoil the whole business. No
sirree, we’ve picked up the trail ourselves, and I’m not going to run
the chance of our getting information.”
“I’ll promise not to ask a soul, Kid.”
“Then what will you do?”
“We’ll get up north of Crown Point and camp to-morrow night on
Bulwagga Mountain. If my idea is correct, we ought to see that
smoke to-morrow night close underneath us. Then the next morning
we can drop right in on them—if—”
“There’s no if about it,” said Gordon. But he reluctantly agreed to
this cautious advance, and they turned in for the night. Gordon sang
Kipling’s “Scout Song,” chastising his companion by way of
accompaniment:
“These are our regulations:
There’s just one law for the scout.
And the first and the last.
And the future and the past,
And the present and the perfect is,
Look out!”
With every emphasized word a camp cushion came down upon
Harry’s head. “And the first” (bang) “and the last” (bang).
“You bet it’s the last!” said Harry, “Look out!” and he promptly
returned the compliment with the other cushion.
“And the first and the last,
And the future and the past.
I say, that’s a terrible song, isn’t it, Harry? Say it. Go on, say it
once. You can never get it out of your head. There was a fellow over
in England—a tenderfoot—and he learned it and it drove him crazy.
Go on, say it, Harry.”
“Who told you that?”
“You say it once—please.”
Harry said it, and lost two hours of his night’s sleep in
consequence. For while Gordon slept peacefully, dreaming of what
the next day was to bring forth, his friend lay looking out into the
darkness and saying, over and over:
“And the first and the last,
And the future and the past,
And the first and the last,
And the future and the past,
And the present and the perfect is,
LOOK OUT!”
He finally shouted the last two words in hopeless exasperation.
“What’s the matter?” said Gordon, sitting suddenly up. “Look out
for what?”
“And the first and the last,
And the future and the past,”
moaned Harry, while a smile of delight stole over Gordon’s sleepy
countenance.
“Kipling’s a fiend, isn’t he, Harry?”
“Kid, if you ever mention that song to me again, I’ll do something
desperate!”
CHAPTER XV
THE OWNER OF THE RETICULE
The sleeping propensity of a top is nothing to the way Harry and
Gordon slumbered. You cannot sleep such sleep indoors. You need
the starry sky, the dark surrounding trees, the lullaby of cricket and
locust, the low, musical rustle of leaves. Then you can sleep, as
Gordon put it, “till the cows come home.”
It must have been the custom for the cows in that vicinity to
come home at seven A. M., for at that hour the boys awoke, and
Harry soon had water boiling for the coffee. Of course, every one’s
way of making coffee is by far the best way. The scout way is to
bring your water to a boil first, then drop your coffee in and stir like
the mischief.
At eight-thirty they had every single thing in their bags and were
on their way down the northern slope of the mountain. You would
not have known that any one had camped at the spot except for the
ashes of the fire and the beaver’s head scratched on a rock.
They followed a winding, woodland path, scarcely visible in
places. “What’s this?” asked Gordon, picking up a small, flat,
triangular stone which his alert eyes had discovered. It proved to be
an Indian arrow-head about an inch and a half long and nearly an
inch wide at one end, tapering to a blunt point at the other. Harry
showed his companion how, wedged into the split end of a stick and
bound firmly, it constituted the old-time arrow of the bloody Mohawk
tribe, whose savage warwhoops had no doubt once been heard
along this obscure mountain path.
Gordon trudged along, kicking the earth in search of more of
these murderous souvenirs. Although they searched carefully, they
could find no more of them, but Harry came upon something which
held a grewsome interest. At the base of an old oak tree where the
earth was gray and powdery, he found the head of a tomahawk,
eaten with rust and so encrusted with earth that he was able to
break off the corners of it as if it had been made of plaster.
“I guess some poor chap met his end here,” Harry said soberly.
“How would you like to be tied against that old tree and have a pack
of savages throw these things at you?”
Gordon shuddered. “Do you suppose we’re on the old trail of the
Mohawks, Harry?”
They were, indeed, treading the very ground over which that
treacherous, bloodthirsty tribe had once carried their victims to
torture and massacre. The thought of it had a quieting effect on
Gordon, and they pressed their way along silently for a little while.
Then he began humming:
“Though you didn’t or you wouldn’t,
Or you hadn’t or you couldn’t—”
“What’s that?” asked Harry.
“It’s the rest of that ‘Scout Song,’ Harry,” said Gordon, looking
slyly sideways at his friend.
“You know what I told you, Kid! So help me—”
“Where do we come out?” Gordon interrupted.
“We’re headed for Crown Point Centre.”
Within an hour they came upon an open road and soon reached
the village. It was not necessary to inquire for the owner of the little
reticule, for on a wooden post outside the post-office was a notice
written in a delicate hand on a half sheet of note paper:
LOST
Lady’s small hand-bag on road near Ticonderoga. Finder
will confer great favor by kindly leaving with postmaster or
returning to
Miss Antoinette Crosby,
Buck Mansion.
The word “great” was underlined several times, the word “kindly”
was underlined twice, and the word “Miss” once.
“How far is it to Buck Mansion?” Harry asked, sauntering into the
post-office.
The postmaster took a leisurely scrutiny of both boys. “What yer
want to go up thar for?”
“Just to see some one. About how far is it?”
“Well, up here folks calls it three mile. City folks sometimes calls
it five. One man that was up thar last summer calc’lated ’twas ten—
said ’twas ten mile down and twenty mile back. He was a kind of a
comic. But I can tell you right now they ain’t got a vacant room in
the house.”
“Thank you,” said Harry. “Come on, Kid, we’ll go up there. We
don’t need to get up Bulwagga Mountain before night.”
The distance to Buck Mansion was somewhere between one mile
and ten, and the way led them through a fragrant country with
houses at intervals along the road. To-day the distance was rather
shorter than usual, or else the “scout pace” helped to make it seem
so, for within an hour the boys reached a spacious white house,
standing well back from the road. The lawn in front was covered
with trees, where a number of hammocks hung. The fence skirting
the road was broken in one place by a little summer-house
containing a pump, and the half of a cocoanut shell hung near by
way of a cup.
The position of this little well-house on the very edge of the
public road afforded a tempting resting-place for tired wayfarers.
Through the trees the boys could see that a deer’s head with
spreading antlers hung over the doorway of the house. On the deep
porch easy-chairs stood about, and in a frame swing to one side of
the lawn a solitary figure sat writing. With this exception, not a soul
was to be seen, which seemed odd in a spot that afforded such
tempting facilities for idleness and repose.
“The deserted village,” said Harry, “but I guess this is the place,
all right.”
Just then voices reached the boys through the trees:
“Shall I come to you?”
“No, try to go out.”
“She’s for that wicket.”
“She can’t get through.”
“I could send her down to you.”
“She plays before I do.”
“Well, I’m going to try to hit her anyway.” There was a second’s
silence, then a whack, then “Missed! I told you so!”
“Come on over there,” said Harry.
On a smooth croquet ground an exciting war was going on. So
intent was the group of ladies on the game that it was fully five
minutes before any one spied the two scouts who leaned on the
picket fence watching the play. Then one of them came toward the
fence, her croquet mallet over her shoulder like a musket.
“Excuse me for interrupting you,” said Harry, removing his hat,
“but I didn’t like to come out on the ground. Is this Buck Mansion?”
“Yes, indeed,” she said, eying the boys curiously. “Is there some
one you wish to see?”
“Is there a Miss Crosby here?”
“Indeed, there is. Nettie!” she called. “Here are two young
gentlemen to see you.”
The figure in the swing rose quickly, spilling a writing tablet, a
bag of candy, a fountain pen, and a magazine. As she straightened
out her gown, which did not reach anywhere near the ground, the
boys saw her to be a girl of not more than sixteen. They turned
toward her.
“Miss Crosby?” Harry asked.
“Ye-es.”
“I think this little hand-bag is yours.”
“Oh, did you find it?”
“Yes, and I ought to have returned it sooner. I’m afraid I found it
within an hour of the time you lost it, but better late than never.” He
handed her the bag.
“Oh, thank you so very, very much. How did you find it?”
“Oh, I was just amusing myself noticing where your auto broke
down.”
“It isn’t my auto.”
“And I picked up the bag on the stone wall.”
“Oh, thank you so very much for your trouble. The bag isn’t
really worth anything, but—” She stopped short and looked at him
suspiciously. “How did you know I was in an auto?”
“You just said so—or said as much,” smiled Harry.
“Yes, but you said it first.”
“Well,” said Harry, driven to it, “I happened to be along the road
above Ticonderoga that night, and I saw the auto tracks in the
moonlight and the ground all rumpled, and, oh, one thing and
another, and then the bag on the wall. So I put it in my pocket to
return it if I could find the owner.”
“You knew we broke down?”
“I thought so.”
“Oh, isn’t that just wonderful?”
“That’s nothing,” said Gordon. “He does things like that every day
—he does them by deduction.”
“Deduction?”
“Yes—putting two and two together and making four.”
“That’s arithmetic,” said she.
“For instance, he thought this bag belonged to an elderly lady,”
Gordon continued. “Of course, once in a great while he’s wrong,” he
added quickly, rather regretting that he had selected this particular
illustration of Harry’s talent for deducing.
“What made him think that? Why, it’s a pale blue—it matches—
what made you think that?” she demanded of Harry.
“On account of the smelling salts,” said Gordon.
She opened the bag and closed it hastily. “I think you’re just
horrid!” she said, looking at Harry. But she did not think he was
horrid. Quite otherwise.
“You see,” explained Harry, “I had to open it to see if it contained
a name or address.”
“Of course,” she said, “but it was just horrid to think I was an old
maid! Do you always finds things out about people that way—what
is it?”
“Deduction,” Gordon spoke up. “All scouts have to learn to decide
things that way—it’s dandy fun.”
“I think it’s horrid. I suppose you’re just finding things out about
me now. It makes me creepy! But you’re very kind,” she promptly
added. “Tell me, honest and true, what are you deducing about me
now?”
“Well,” said Harry, “I deduce that you’ve been writing a letter and
underlining lots of words.”
She opened her mouth in astonishment. “You’re a perfect ghoul!”
said she. “But I haven’t even asked you to sit down yet. Won’t you
come over here and rest?” She led the way to the little well-house
by the roadside, giving Gordon an opportunity to whisper to Harry:
“Now, you see, Harry—if you only had your uniform on! Did you
see how she looked at me? It wasn’t I she cared about, Harry—it
was the scout uniform. The scout suit catches them every time. I
know more about those things than you do, Harry, because I’ve had
more experience. Now you’ve learned a lesson.”
There was no chance for Harry to reply, for the young lady had
reached the little shelter and stood waiting for them. She was an
extremely pretty young lady, with a great mass of dark hair held
together in the back by a huge bow, and she had a very snub nose
and a way of puckering her brows into a kind of whimsical frown. A
number of rebellious locks hung about her forehead, shaken loose
by the habit she had of giving all her adjectives a racking emphasis,
thus causing her head to be in a state of almost continual agitation.
She wore a white sailor blouse, with blue trimming and a blue
anchor worked in front. Also a blue braided cord with a tiny round
mirror on the end, used in capturing and confining the loose locks
after a particularly emphatic tirade. The other extremity of Miss
Antoinette was on the whole more demure and reposeful, her small
feet being encased in bewitching little pumps, which were hardly
worth while at all since they were almost completely obscured by
enormous silk bows.
It took Gordon about one minute to forget his anxiety to keep
secret the object of their wanderings, and presently Miss Antoinette
was apprised of their intention of ascending Bulwagga that very day.
She said it was all wonderful.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com

More Related Content

Similar to Programming Windows Server 2003 Robert Hill Foster (20)

PDF
Microsoft ASP NET coding strategies with the Microsoft ASP NET team Matthew G...
trufincalgua
 
PDF
Download full ebook of Azure in Action 1st Edition Chris Hay instant download...
adobaherrami8
 
PDF
Open Source ESBs in Action 1st Edition Tijs Rademakers
krulatasev
 
PPTX
IIS Web Ecosystem
Kenny Abdiel Maita
 
PDF
Open Source ESBs in Action 1st Edition Tijs Rademakers
gydalravid
 
PDF
Microsoft lync server 2013 step by step for anyone
Vinh Nguyen
 
PDF
Microsoft lync server 2013 step by step for anyone
Vinh Nguyen
 
PDF
Open Source ESBs in Action 1st Edition Tijs Rademakers
zarievidaja
 
DOCX
Pg. 03Question Three Assignment 3Deadline Sunda.docx
JUST36
 
DOCX
Pg. 03Question Three Assignment 3Deadline Sunda.docx
karlhennesey
 
PDF
Developing Applications for the Cloud on the Microsoft Windows Azure Platform...
ausikuayubah
 
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
Clint Edmonson
 
PDF
Research Assignment For Active Directory
Jessica Myers
 
PDF
Programming Microsoft Infopath 1st Edition Thom Robbins
raghuyaacop
 
PDF
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET...
barbuhalahdl
 
PPTX
Windows Azure(Pr-1).ppt.pptx
PrincePatel272012
 
DOC
Foundry Management System Desktop Application
Dharmendra Sid
 
PDF
Global Advertising, Inc.
Nicole Wells
 
PPTX
Microsoft Techsummit Zurich Docker and Microsoft
Patrick Chanezon
 
Microsoft ASP NET coding strategies with the Microsoft ASP NET team Matthew G...
trufincalgua
 
Download full ebook of Azure in Action 1st Edition Chris Hay instant download...
adobaherrami8
 
Open Source ESBs in Action 1st Edition Tijs Rademakers
krulatasev
 
IIS Web Ecosystem
Kenny Abdiel Maita
 
Open Source ESBs in Action 1st Edition Tijs Rademakers
gydalravid
 
Microsoft lync server 2013 step by step for anyone
Vinh Nguyen
 
Microsoft lync server 2013 step by step for anyone
Vinh Nguyen
 
Open Source ESBs in Action 1st Edition Tijs Rademakers
zarievidaja
 
Pg. 03Question Three Assignment 3Deadline Sunda.docx
JUST36
 
Pg. 03Question Three Assignment 3Deadline Sunda.docx
karlhennesey
 
Developing Applications for the Cloud on the Microsoft Windows Azure Platform...
ausikuayubah
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Jeff Blankenburg
 
Migrating To Visual Studio 2008 & .Net Framework 3.5
Clint Edmonson
 
Research Assignment For Active Directory
Jessica Myers
 
Programming Microsoft Infopath 1st Edition Thom Robbins
raghuyaacop
 
Programming ASP NET MVC 4 Developing Real World Web Applications with ASP NET...
barbuhalahdl
 
Windows Azure(Pr-1).ppt.pptx
PrincePatel272012
 
Foundry Management System Desktop Application
Dharmendra Sid
 
Global Advertising, Inc.
Nicole Wells
 
Microsoft Techsummit Zurich Docker and Microsoft
Patrick Chanezon
 

More from sanjinkeirys (6)

PDF
Inside Management Studying Organizational Practices David Vickers
sanjinkeirys
 
PDF
News Values From An Audience Perspective Martina Temmerman Jelle Mast
sanjinkeirys
 
PDF
Making Sense Of The Census Observations Of The 2001 Enumeration In Remote Abo...
sanjinkeirys
 
PDF
Digital Media Youth And Credibility John D And Catherine T Macarthur Foundati...
sanjinkeirys
 
PDF
Archives For Maintaining Community And Society In The Digital Age Keiji Fujiy...
sanjinkeirys
 
PDF
Sexual And Reproductive Health Of Adolescents With Disabilities Tafadzwa Rugoho
sanjinkeirys
 
Inside Management Studying Organizational Practices David Vickers
sanjinkeirys
 
News Values From An Audience Perspective Martina Temmerman Jelle Mast
sanjinkeirys
 
Making Sense Of The Census Observations Of The 2001 Enumeration In Remote Abo...
sanjinkeirys
 
Digital Media Youth And Credibility John D And Catherine T Macarthur Foundati...
sanjinkeirys
 
Archives For Maintaining Community And Society In The Digital Age Keiji Fujiy...
sanjinkeirys
 
Sexual And Reproductive Health Of Adolescents With Disabilities Tafadzwa Rugoho
sanjinkeirys
 
Ad

Recently uploaded (20)

PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Ad

Programming Windows Server 2003 Robert Hill Foster

  • 1. Programming Windows Server 2003 Robert Hill Foster pdf download https://ebookgate.com/product/programming-windows- server-2003-robert-hill-foster/ Get Instant Ebook Downloads – Browse at https://ebookgate.com
  • 2. Instant digital products (PDF, ePub, MOBI) available Download now and explore formats that suit you... Mastering Active Directory for Windows Server 2003 3rd ed Edition Robert R. King https://ebookgate.com/product/mastering-active-directory-for- windows-server-2003-3rd-ed-edition-robert-r-king/ Mastering Windows Server 2003 1st edition Edition Mark Minasi https://ebookgate.com/product/mastering-windows-server-2003-1st- edition-edition-mark-minasi/ Windows Server 2003 bible R2 and SP1 edition Jeffrey R. Shapiro https://ebookgate.com/product/windows-server-2003-bible-r2-and- sp1-edition-jeffrey-r-shapiro/ Microsoft Windows Server 2003 Administrator s Companion 2nd Edition Charlie Russel https://ebookgate.com/product/microsoft-windows- server-2003-administrator-s-companion-2nd-edition-charlie-russel/
  • 3. Windows Server 2003 best practices for enterprise deployments 1st Edition Danielle Ruest https://ebookgate.com/product/windows-server-2003-best-practices- for-enterprise-deployments-1st-edition-danielle-ruest/ Beginning Microsoft SQL Server 2008 Programming Robert Vieira https://ebookgate.com/product/beginning-microsoft-sql- server-2008-programming-robert-vieira/ How to Cheat at Managing Microsoft Windows Small Business Server 2003 1st Edition Susan Snedaker https://ebookgate.com/product/how-to-cheat-at-managing-microsoft- windows-small-business-server-2003-1st-edition-susan-snedaker/ Planning Implementing and Maintaining a Windows Server 2003 Environment for an MCSE Certified on Windows 2000 Study Guide 1st Edition Syngress https://ebookgate.com/product/planning-implementing-and- maintaining-a-windows-server-2003-environment-for-an-mcse- certified-on-windows-2000-study-guide-1st-edition-syngress/ How to Cheat at Designing a Windows Server 2003 Active Directory Infrastructure 1st Edition B. Barber https://ebookgate.com/product/how-to-cheat-at-designing-a- windows-server-2003-active-directory-infrastructure-1st-edition- b-barber/
  • 6. Programming Windows Server 2003 ROBERT HILL FOSTER M A N N I N G Greenwich (74° w. long.)
  • 7. For online information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2004 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Liz Welch 209 Bruce Park Avenue Typesetter: Denis Dalinnik Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-930110-98-7 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – VHG – 07 06 05 04 03
  • 9. vii brief contents 1 Windows Server 2003 overview 1 2 The .NET Framework, version 1.1 12 3 ASP.NET best practices 34 4 Internet Information Services 6 68 5 The Component Services 1.5 architecture 95 6 Using COM+ Services 1.5 119 7 Using XML and web services 162 8 Utilizing Microsoft UDDI Services in your enterprise 192 9 Windows Server 2003 application security 215 10 Deploying .NET applications 270
  • 10. ix contents preface xiii acknowledgments xvii about the cover illustration xviii 1 Windows Server 2003 overview 1 1.1 The whole .NET enchilada 1 Smart clients 2 ) Servers 3 ) Developer tools 4 1.2 Windows Server 2003 6 Assigning server roles 6 1.3 This book’s direction 8 1.4 The Windows Server 2003 family tree 10 Windows Server 2003 Standard Edition 10 ) Windows Server 2003 Enterprise Edition 10 ) Windows Server 2003 Web Edition 10 ) Windows Server 2003 Datacenter Edition 11 1.5 Summary 11 2 The .NET Framework, version 1.1 12 2.1 Requirements 12 Operating system 12 ) Software 13 ) Hardware 14 2.2 New features of version 1.1 15 The .NET Compact Framework 15 ) Effectively utilizing ADO.NET 19 ) ASP.NET mobile controls 26 ) Side-by- side execution with the .NET Framework 1.0 30 ) Framework security 31 2.3 Summary 33 3 ASP.NET best practices 34 3.1 ASP.NET—A simple example 34 3.2 Language best practices 41 Coding styles 41 ) Binding 42
  • 11. x CONTENTS 3.3 Server controls 45 ViewState 45 ) Validation 46 3.4 Error handling 47 Using no error handler 47 ) Using try/catch blocks 50 Redirecting web.config errors 53 ) Using the error event of the application object 54 ) Best practice 54 3.5 State management 54 3.6 ASP.NET caching 56 Page output caching 56 ) Fragment caching 57 ) Using the built-in cache API 59 3.7 The ASP.NET sample application 61 Application files 61 3.8 Summary 66 4 Internet Information Services 6 68 4.1 Installing IIS 6 68 4.2 The IIS architecture 73 IIS services 73 ) The XML metabase 74 ) IIS 6 Isolation Modes 75 4.3 Configuring an ASP.NET application 78 Allowing dynamic content 78 ) Configuring an application pool 79 ) Configuring an IIS 6 web site 83 4.4 IIS authentication 89 4.5 Summary 94 5 The Component Services 1.5 architecture 95 5.1 Overview of Component Services 95 In the beginning … there was COM 95 ) Moving to MTS 98 On to COM+ 98 5.2 The COM+ component architecture 99 COM+ applications 102 ) Your objects’ context 103 5.3 Creating a COM+ component 104 Designing the COM+ component 104 ) Creating the component 106 ) Installing the component 115 5.4 Summary 118 6 Using COM+ Services 1.5 119 6.1 My Computer properties 119 6.2 Application properties 127 6.3 Component properties 135
  • 12. CONTENTS xi 6.4 COM+ services new to Windows Server 2003 140 Application pooling 140 ) Application recycling 140 Configuring applications as NT services 142 ) Low-Memory Activation Gates 143 ) Object constructor strings 145 COM+ partitions 146 ) Private components 150 ) The COM+ SOAP service 152 ) Copying and moving COM+ components 158 ) Pausing and disabling applications 158 Process dumping 159 6.5 Summary 161 7 Using XML and web services 162 7.1 Web services overview 162 XML 162 ) SOAP 171 ) WSDL 174 7.2 Building a web service 177 7.3 Accessing a web service 181 7.4 Summary 191 8 Utilizing Microsoft UDDI Services in your enterprise 192 8.1 Installing UDDI Services 193 8.2 The UDDI Services Console 197 Site properties 197 ) Server properties 201 8.3 Configuring and using UDDI Services 204 A UDDI Services example 205 8.4 Summary 214 9 Windows Server 2003 application security 215 9.1 Platform security 215 Application architecture 216 ) IIS authentication and authorization 216 ) Certificates 219 ) ASP.NET authentication and authorization 227 ) Enterprise Services authentication and authorization 229 ) SQL Server 2000 authentication and authorization 229 9.2 ASP.NET security 230 Windows authentication 230 ) Forms authentication 230 Passport authentication 248 ) The None authentication option 250 ) URL authorization 250 ) Impersonation 251 9.3 Securing web services 251 Configuring authentication 251 ) Limit your protocols 252 Secure web service connections 253 9.4 Enterprise Services security 254 Declarative security 254 ) Programmatic security 258
  • 13. xii CONTENTS 9.5 SQL Server 2000 security 260 SQL Server 2000 SSL 262 9.6 Security policies 264 9.7 Summary 269 10 Deploying .NET applications 270 10.1 Deployment strategies 270 Your assembly’s “manifest-o” 271 ) XCOPY deployment 272 Windows Installer 274 10.2 Using Visual Studio .NET for deployment 274 The Setup Wizard 275 ) Setup editors 277 ) Configuring your setup project’s properties 282 ) Generating your MSI file 284 10.3 Creating a deployment plan 285 10.4 Summary 285 appendix A The data model 286 index 293
  • 14. xiii preface 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 develop- ers. This book is written by a developer for developers and addresses the issues of writ- ing 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: • The .NET Framework 1.1 • Internet Information Services 6 • COM+ 1.5 • UDDI Services • Tighter security 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 develop- ers 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 lan- guages), but you can easily convert them to any .NET-compliant language.
  • 15. xiv PREFACE 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. CHAPTER ROAD MAP In this book, I’ve assumed that you are familiar with certain topics—the .NET Frame- work, 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: Chapter 1: Windows Server 2003 overview In this chapter, we introduce Windows Server 2003 and the Microsoft .NET platform. Chapter 2: The .NET Framework, version 1.1 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. Chapter 3: ASP .NET best practices 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. Chapter 4: Internet Information Services 6 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 perfor- mance from your ASP.NET web applications. Chapter 5: The COM+ 1.5 architecture 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.
  • 16. SOURCE CODE xv Chapter 6: Using COM+ Services 1.5 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. Chapter 7: Using XML and web services. 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 synchro- nously and asynchronously. Chapter 8: Utilizing Microsoft UDDI Services in your enterprise 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. Chapter 9: Windows Server 2003 application security 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. Chapter 10: Deploying .NET applications In the final chapter of this book, we explore various methods of application deploy- ment. Here, you’ll learn how to deploy the contacts-management application you built during the course of this book. Appendix A: The data model The appendix contains the complete data model and database script used in our sam- ple application. SOURCE CODE 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 con- tains the source code, instructions on how to obtain the required external packages, and scripts that automate compiling and running the programs.
  • 17. xvi PREFACE CONVENTIONS We used the following conventions in this book: • Italic typeface is used to introduce new terms. • Courier typeface is used to denote code samples as well as program elements. • Code is differentiated with comments and brackets. For example, at the begin- ning of all C# code examples, you will see a comment that looks like this: //C#. • In VB.NET code, an underscore (_) is used at the end of a breaking line; C# code does not use a line continuation symbol. AUTHOR ONLINE 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 sug- gest you try asking the author some challenging questions lest his interest stray! The Author Online forum and the archives of previous discussions will be acces- sible from the publisher’s web site as long as the book is in print. ABOUT THE AUTHOR 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 archi- tects 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 south- eastern United States. He lives in Murfreesboro, Tennessee.
  • 18. xvii acknowledgments 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 con- ceive 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 every- thing that I pursue.
  • 19. xviii about the cover illustration 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 Nacio- nas del Mundo desubierto, dibujados y grabados con la mayor exacti- tud 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 com- puter business with book covers based on the rich diversity of regional life of two cen- turies ago‚ brought back to life by the pictures from this collection.
  • 20. 1 C H A P T E R 1 Windows Server 2003 overview 1.1 The whole .NET enchilada 1 1.2 Windows Server 2003 6 1.3 This book’s direction 8 1.4 The Windows Server 2003 family tree 10 1.5 Summary 11 It seems that “.NET” something or other is everywhere in the Microsoft world these days. Microsoft has unleashed its marketing machine to help get the term on every- one’s mind through its extensive television marketing. It’s important that you learn the .NET strategy because virtually every software product Microsoft plans to release will utilize .NET. This, in turn, will impact the way other software developers interact with .NET products and tools. This chapter introduces .NET and discusses Microsoft’s latest product, Windows Server 2003, which is the newest server operating system release to join the .NET Enterprise Server family. 1.1 THE WHOLE .NET ENCHILADA A question that I’m often asked when teaching classes and speaking at conferences is “What is .NET?” My answer: everything! Well, .NET is not actually “everything,” but it encompasses the technologies that support Microsoft’s newest vision of connecting people and businesses “anywhere, anytime, and on any device.” When we dig past the vagaries of such a marketing statement, this permanent state of connection is made possible largely due to web services, which are small applications that connect to one
  • 21. 2 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW another as well as other systems via the Internet utilizing Extensible Markup Language (XML) as a means of communication. Figure 1.1 demonstrates how various platforms can utilize web services to commu- nicate with one another. This includes everything from clients—such as desktops, phones, and PDAs—to server products—such as SQL Server and Exchange. Most products in the Microsoft suite support web services in one way or another. In fact, if they currently don’t support web services, it’s a safe bet that the next version of the product will support them. Microsoft breaks web services support in .NET into three distinct categories: smart clients, servers, and developer tools. Let’s take a closer look. 1.1.1 Smart clients Smart clients are anything that a person can use to stay connected to a network (i.e., the Internet or an intranet). The most common smart clients are desktops and laptops, which are also the most powerful ones because they include a fully functional operat- ing system and processing power. Figure 1.1 Microsoft’s .NET vision
  • 22. THE WHOLE .NET ENCHILADA 3 Personal digital assistants (PDAs) and cell phones are also considered smart clients because they can host local applications. Windows CE provides a solid operating sys- tem in which you can host applications for dispersed users. Smart clients can share the same web services to provide users with specific infor- mation. Exposing pieces of your application to provide detailed information that users need while they are “on the go” is a good example of how web services and smart cli- ents are used. A real-world implementation of smart clients using web services is that of United Parcel Service’s package-tracking application. Each package is assigned a unique bar code so that whenever a package arrives at or leaves a facility, its location can be traced. Though this application had its beginnings as an intranet application, it has been exposed to the Internet for everyone to use to track personal or business packages. Microsoft Passport is yet another way that you can utilize .NET to stay connected wherever you are in the world. This single sign-in service lets you access multiple sites and services, utilizing only one user ID and password. A Passport account can be cre- ated using any valid email address. Passport, by default, gives you the functionality of a built-in calendar for alerts, contact management, and instant messaging. Currently, Microsoft is implementing products such as MapPoint.NET that are entirely web services based. MapPoint.NET is the latest version of Microsoft MapPoint, an application that provides geographical mapping functionality. It is implemented as a subscription-based software service that is accessible over the Internet. Your applica- tions can take advantage of web services like these by simply calling a method that is exposed as a web service. This gives you the ability to provide graphical maps, driving directions, and so forth in real time to your applications. For example, a package-delivery business could develop an application in which the MapPoint.NET functionality runs wirelessly on tablet PCs to provide their drivers with real-time maps to delivery loca- tions—which with factors like road construction, new roads, and business and loca- tion changes is a challenge. These implementations fulfill the “software as a service” paradigm that Microsoft’s .NET strategy aims to achieve. 1.1.2 Servers Microsoft introduced a new moniker and bundled a few more products into its suite formerly known as BackOffice. This suite of products is now called the Microsoft .NET Enterprise Servers. Currently, the .NET Enterprise Servers suite consists of the follow- ing products: • Application Center • BizTalk Server • Commerce Server • Content Management Server • Exchange Server • Host Integration Server
  • 23. 4 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW • Internet Security and Acceleration Server • Microsoft Operations Manager • Microsoft Project Server • Mobile Information Server • SharePoint Portal Server • SQL Server • Windows 2000 Server family • Windows Server 2003 family A common feature of these server products is that they each utilize XML in some form. This is important to businesses because they instantly have a way for all applications to communicate with one another via XML. Previously, this communication was much more difficult because every business had a unique way of describing its data. XML now provides a common syntax for data description, and industry-standard vocabularies are being developed at an increasingly rapid pace. Due to the heavy utilization of XML in the .NET Enterprise Servers suite, it is relatively inexpensive to integrate your applica- tions with each other because they can speak the same language: XML. Now, extend- ing that theory a little, if XML is the basis for cross-application communication, then it becomes just as easy for businesses to communicate with other businesses, given an agreed-upon vocabulary. This is where the whole .NET vision comes to fruition because it breaks down the platform and language barriers that have been in place for as long as computers have been around. 1.1.3 Developer tools The last aspect of Microsoft’s .NET vision that we’ll discuss here involves changes and improvements to the company’s software development tools. When the folks at Microsoft set out to create a new development platform that would support their .NET vision, they looked carefully at the types of applications that were currently being developed so that they could best meet the needs of developers. The Web played a sig- nificant part in the development of .NET simply because developers were writing a large number of web applications. Also, from a web client’s prospective, the Web pro- vides you with a standard set of protocols, such as TCP and HTTP, which are already configured on an extremely large number of clients. Even with these protocols in place, pre-.NET applications have a difficult time communicating with one another because of differing protocols and the lack of “set” standards, such as XML and HTTP. Another issue that was addressed in the .NET developer tools was the fact that pro- grammers ended up writing a lot of complicated application infrastructure code that consisted of anything from simple date-conversion tools to WIN32 API calls. Web applications provide a perfect example of this because they can have many different types of clients (i.e., Internet Explorer vs. Netscape) that require different infrastruc- ture code. In addition to these infrastructure tasks, if you wanted to expose some of
  • 24. THE WHOLE .NET ENCHILADA 5 your application’s functionality to the wireless world, you had to learn Wireless Markup Language (WML), which introduced a new set of problems: most wireless web phones understand a different dialect of WML. This also meant that you had to learn several flavors of WML in order to support a sufficiently broad spectrum of wire- less web phone users. Most of these problems have been solved with a developer tool called the .NET Framework. The .NET Framework is a set of utilities (actually about 6500+ classes) spe- cifically designed for use in the creation of .NET applications. The .NET Framework supports development efforts in any number of languages, including C#, VB.NET, and J#, making it one of the most flexible toolkits available today. The .NET Framework is managed by a runtime engine called the Common Lan- guage Runtime (CLR). The CLR is similar to the Java Virtual Machine (JVM) in that it acts as a centrally managed environment required to run your .NET applications. It provides thread support, COM marshaling, type checking, exception management, a security engine, a debug engine, code management, and garbage collection for your applications. These features are discussed in more detail in chapter 2. Figure 1.2 Runtime compilation: Going from source code to native code
  • 25. 6 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW Figure 1.2 illustrates what happens when an application is compiled and executed by the runtime. You can see that the application starts with the source code and is com- piled by its respective compiler. Our example shows only VB.NET and C#, but com- piles the same for any .NET-compliant language. Once the application has been compiled, Microsoft Intermediate Language (MSIL) code is generated by the com- piler. (MSIL is similar to assembly language.) When compiled, your application is not actually compiled to native code, or code that is native to an operating system (i.e., it will run only on a specific platform), until it is executed by the runtime. The first time that the application is executed, the runtime reads the MSIL and compiles it to native code. This process is called just-in-time (JIT) compilation. The process is exactly the same for all .NET applications, no matter what type of application is being gener- ated (including web, Windows, or console applications). Learning to work with the .NET Framework and understanding how it functions is key to writing successful .NET applications. Several tools are available that allow you to write .NET applications effectively. Two of these are Visual Studio .NET and the ASP.NET Web Matrix Project. This book focuses on building applications using Visual Studio .NET. The ASP.NET Web Matrix Project, a free utility that you can download from www.asp.net, is a development environment targeted at hobbyist ASP.NET devel- opers who want a tool that is more robust than “Visual Notepad.” This is not to say that the Web Matrix Project can’t be used to build robust business applications; how- ever, Visual Studio .NET provides developers with a more robust environment in which to develop applications (but unlike the Web Matrix Project, it isn’t free). Both of the integrated development environments (IDEs) do give you one thing: a “hook” into the .NET Framework so that you can easily develop .NET applications. One thing you should keep in mind is that languages are irrelevant with .NET. The .NET Framework is language independent, so learning how to use the Framework should be one of your main goals as a developer; then learning the language part is easy. The Framework is exactly the same, no matter what the language. If you study the .NET Framework classes, and learn how to declare variables, loops, and if-then statements in any .NET-compliant language, you can write a .NET application fairly easily. 1.2 WINDOWS SERVER 2003 Windows Server 2003 is the newest edition to the Windows family of products. Win- dows Server brings a lot of new features to the table that you can use in your existing and future infrastructures. It is also the first operating system to natively include the Microsoft .NET Framework, version 1.1. This means that once you install the prod- uct, you can begin to develop managed .NET applications that will run on Windows Server 2003. 1.2.1 Assigning server roles After you install Windows Server 2003, one of your first tasks is to configure your server into a specific “role.” Each role must be manually configured by an administrator.
  • 26. WINDOWS SERVER 2003 7 Server roles are designed to help you tune your server to perform a specific task or functionality without adding any unnecessary functionality or security risks to your server. You can set up your server as one of the following roles: • File Server—Enables Windows to share and manage files. With this role, you can use the NT File System (NTFS) to enable and manage disk usage quotas, set up the Indexing Service to index your files for faster searches, and search the content of files in various languages and formats. • Print Server—Enables your server to provide access to and management of print- ers on your network. You can manage your printers through Windows Manage- ment Instrumentation (WMI). This allows you to use a scripting language like VBScript to automate administrative functions on your printers, such as automatic printer mapping for clients, which can also be done from a web point-and-click interface that you set up on the print server. In addition, you can use a Uniform Resource Locator (URL) to print to printers that are set up on a print server. • Web Application Server—Enables the server that has Internet Information Ser- vices (IIS) 6 set up and configured to host web applications and services. • Mail Server—Allows you to provide Post Office Protocol 3 (POP3) services to your users. • Terminal Server—Allows you to remotely connect to your server with Terminal Services. Terminal Services can be used for either remote server administration or for serving terminal sessions to clients. • Remote Access/VPN Server—Enables you to set up routing and remote access to a variety of clients through Terminal Services, create custom networking solu- tions, and use persistent network connections that allow your users to stay con- nected to your server’s resources during long sessions. • Domain Controller (Active Directory)—Lets you maintain all of the user’s logon information, such as the login name and the groups in which a user belongs, and manages the communication between other domain controllers across your network. WARNING If your server is set up as a domain controller, you shouldn’t host web appli- cations from it because the performance of IIS is lessened due to the load on the server. Setting up IIS on a domain controller will work, but is not recommended because IIS will perform poorly as a result of the dual load of managing the network and functioning as a web server. Visual Studio .NET is not compatible with a server that is set up as a domain controller. • DNS Server—Allows client computers to resolve DNS domain names. This ser- vice is used to help you locate resources on your network or other networks, such as the Internet. • WINS Server—Provides the functionality that lets you register and query Net- BIOS names for legacy Windows OS machines on your network.
  • 27. 8 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW • DHCP Server—Allows your server to dynamically assign IP addresses to clients that are connected to your network. • Streaming Media Server—Allows your server to provide live streaming media over your intranet or the Internet. One of the wonderful things about configuring your server to any of these server roles is that the configuration process is completely driven by wizards. If you want to set up your server as a domain controller, a wizard will seamlessly guide you through the process of installing Active Directory and will automatically install any service that it requires. You can configure your server into any combination of roles. Because of an increased focus on security, one of the first things that you will notice after installing Windows Server 2003 is that it is locked down by default. One of the security issues with Windows 2000 Server was that when you set it up on a server, it had several security holes (for example, IIS was installed by default, making it a target for viruses like Nimda). Windows Server 2003 isn’t set up to perform any of the previ- ously mentioned roles. In fact, most Windows services that could cause security holes aren’t even installed (including some trivial things that may or may not be used on a server, such as the volume control!). You as a developer or administrator have to phys- ically configure your server to get each specific “feature” to work properly. 1.3 THIS BOOK’S DIRECTION This book focuses mainly on the new features of Windows Server 2003 and how you can integrate them into your existing infrastructure. These new changes heavily revolve around COM+, IIS 6, and web services. New features have been added to COM+ so that your applications (COM+ com- ponents) are much more stable and secure. Some of the new COM+ features are: • Application pooling and recycling • Support for COM+ partitions • The COM+ Simple Object Access Protocol (SOAP) service • The Low-Memory Activation Gates service • The ability to pause and disable applications • The Process Dump tool Much like IIS 6, COM+ applications can be pooled to run in the same worker pro- cess. They can also be recycled if something goes wrong with the application. The COM+ Partitions feature allows you to create and run multiple applications with dif- ferent configurations on the same machine. For example, you can have a development and a production application (the same DLL) running on the same machine, which was not possible with previous versions of Component Services (which required you to have either a development or production version running, but not both at the same time).
  • 28. THIS BOOK’S DIRECTION 9 You can easily generate a SOAP proxy class for your application in COM+ by simply right-clicking the applications and “flipping a switch” in the properties dialog box. The Low-Memory Activation Gates service determines whether enough virtual mem- ory is available to start your application before it is started. If there is not enough mem- ory, then the application will not start. This feature improves the reliability of your applications that are running in COM+: They no longer start and then crash—which means you won’t have to address the errors that accompany the crash. COM+ lets you pause and disable your application without affecting any instances of the application that are currently running in memory. You can analyze a running process by dumping its state and viewing it with the Process Dump tool. That way, you can troubleshoot your production applications without having to bring down your production server to analyze a problem. IIS 6 has been architected to follow a new process model, called Worker Process Isolation Mode. Using this mode, your web applications and services can run in sep- arate, isolated processes on the web server. If an isolated application were to fail, it would not affect any other web applications or services also being hosted by the server. The benefits of this behavior alone are enormous because of the design of IIS; it means more uptime for your applications, with little extra administration or configuration. This also brings us to why web services are important in Windows Server 2003. With all of its new changes, IIS 6 was designed to make your web services very fast and highly available, with very little downtime. Much like COM+, IIS 6 enables you to utilize web application pooling so that your web applications will run in their own process. Win- dows 2000’s IIS 5 web server was a great web server—meaning it was great at hosting web applications. When it came to hosting web services, IIS 5 was not so great. This is because IIS 5 was released before web services were technically “mainstream,” so not as much emphasis was placed on web service performance as it was with IIS 6. IIS 6, however, is an ideal web server for hosting web services because it is specifically tuned to handle the loads put on it by SOAP. Universal Description, Discovery, and Integration (UDDI) Services is another new component found in Windows Server 2003. UDDI—a product of OASIS (www.oasis- open.org), a not-for-profit consortium that helps drive the adoption of e-business standards—is an industry specification for publishing and locating XML web services. It is supported by many of the major companies in the industry, including Microsoft, Sun Microsystems, and IBM. In essence, UDDI is a search engine for web services on the Internet. It also allows you to describe your company or business, specify a clas- sification for your web services, and provide details about the functions that your web services expose to the world. The Internet consortium UDDI.org (www.uddi.org) is composed of many companies, which make up the UDDI Business Registry (UBR). The UBR designed and maintains the UDDI registry for the Internet. The UDDI Services Microsoft includes with Windows Server 2003 are different from the OASIS UDDI in that they are designed to be deployed and managed on your intranet. While UDDI is deployed and available on the Internet, UDDI Services are
  • 29. 10 CHAPTER 1 WINDOWS SERVER 2003 OVERVIEW available to your business and partners only. This allows companies to take full advan- tage of UDDI without exposing their web services to the world. 1.4 THE WINDOWS SERVER 2003 FAMILY TREE The Windows Server 2003 family includes four editions: Standard Edition, Enterprise Edition, Web Edition, and Datacenter Edition. By breaking the product up into sep- arate editions, Microsoft gives you more choices based on the needs of your business. 1.4.1 Windows Server 2003 Standard Edition Windows Server 2003 Standard Edition is designed for either small businesses or depart- ments with fewer than 500 users. Of the four editions, it most closely resembles Win- dows 2000 Server. Standard Edition provides the support you need to run and manage small to medium-sized networks in your infrastructure, including Internet Authenti- cation Service (IAS), Internet Connection Sharing (ICS), and two-way symmetric pro- cessing. In addition, you can configure this server into any combination of server roles (see section 1.2.1) in order to gain maximum benefit of the product (remember, by default everything is locked down). It supports up to 4 GB of RAM, provides support for either one or two processors, and unlike Enterprise and Datacenter Edition, is available only on the x86 platform. 1.4.2 Windows Server 2003 Enterprise Edition Windows Server 2003 Enterprise Edition is designed for medium to large enterprises with more than 500 users. This product resembles Windows 2000 Advanced Server. It differs from Standard Edition in that it provides you with clustering features, which allow you to scale your server load out, or add more servers to balance processing load, so that you can apply load balancing to your infrastructure. Clustering your servers together also gives you more reliability by implementing fail-over support for your mission-critical applications. Enterprise Edition comes in two forms: a 32-bit edition for x86 servers and a 64-bit edition for Itanium and Itanium 2 servers. Both versions provide eight-way symmetric multiprocessing (SMP), eight-node clustering, and support for up to eight processors. The 32-bit version supports up to 32 GB of RAM, while the 64-bit version supports up to 64 GB of RAM. 1.4.3 Windows Server 2003 Web Edition Windows Server 2003 Web Edition is the newest themed version in the Windows Server 2003 family. It is specifically designed to be a web server, with an emphasis on hosting ASP.NET web applications. It is most similar to Windows .NET Standard Server in the features that it offers, but is not designed to do major day-to-day network operations, such as acting as a domain controller. It can be used largely to scale out a front-end web site for supporting more users. Web Edition supports two-way SMP and up to 2 GB of RAM.
  • 30. SUMMARY 11 1.4.4 Windows Server 2003 Datacenter Edition Windows Server 2003 Datacenter Edition is the most scalable of any product in the Windows Server 2003 family of products. It is designed for the largest enterprises so that they can deliver their mission-critical applications, databases, ERP systems, or server farms. It differs from Enterprise Edition only in that it can be scaled further up (sup- port for more RAM, CPUs, etc.) and out (support for clustering more servers together). It supports 32-way SMP, eight-node clustering, and up to 64 processors. Much like Enterprise Edition, it also comes in 32-bit and 64-bit versions. The 64-bit version pro- vides support for both Itanium and Itanium 2 processors. The 32-bit version supports up to 64 GB of RAM, and the 64-bit version supports up to 128 GB of RAM. 1.5 SUMMARY The Microsoft .NET vision enables you to stay connected anytime, anywhere, and on any device with Windows Server 2003 setting the stage for you to better make these types of applications a reality. With the changes that have been made to COM+ and IIS 6, Windows Server 2003 is a great operating system for laying the foundation of your enterprise applications. The introduction of four different editions of Windows Server 2003 gives you the flexibility to implement just the software and hardware support needed to suit your enterprise computing tasks. In the next chapter, you’ll learn about the .NET Framework 1.1 and how you can begin using it immediately after installing Windows Server 2003.
  • 31. 12 C H A P T E R 2 The .NET Framework, version 1.1 2.1 Requirements 12 2.2 New features of version 1.1 15 2.3 Summary 33 The .NET Framework, version 1.1, accompanied the release of the Windows Server 2003 family. This version includes bug fixes from version 1.0, as well as a few new classes, but mostly it includes various entities that you were required to download and install into version 1.0 separately. In this chapter, we discuss these changes and see how they affect both our current and future applications. 2.1 REQUIREMENTS Before you install the .NET Framework 1.1 on a machine, it is essential to recognize the operating system (OS), software, and hardware requirements for both the server and the client platforms. Almost all of the requirements are the same as with version 1.0 of the Framework, so you don’t have to worry about breaking your applications. This is good for you as a developer because it will make for a smooth transition to the new version. This section describes the requirements of the .NET Framework 1.1. 2.1.1 Operating system The requirements for the Windows operating system (currently the only platform that .NET will run on) are relatively broad, compared to the other requirements for the .NET Framework. They can be broken down to two categories: client and server requirements.
  • 32. REQUIREMENTS 13 In order for the client to be able to run the .NET Framework, you need one of the following: • Windows 98/98SE • Windows ME • Windows NT 4 Workstation (Service Pack 6a) • Windows NT 4 Server (Service Pack 6a) • Windows 2000 Professional • Windows 2000 Server family • Windows XP Professional • Windows XP Home • Windows Server 2003 family NOTE In any discussion of OS requirements, the Mono Project (www.go-mono. com) always seems to make its way into the conversation. Currently a few indus- try initiatives—among them the Mono Project—are porting the .NET Frame- work to other platforms. The Mono Project is a venture designed to enable the .NET Framework to run on Linux. All of the Windows operating systems require Microsoft Internet Explorer 5.01 or later and the Windows Installer, version 2.0. An example of when you will need to install the .NET Framework on a client machine is anytime that you would like to run a .NET application locally—for example, a Windows Forms application. The OS requirements for the server are a little more stringent than those for the client. This is because the server will be used mainly for ASP.NET applications and there- fore must have Internet Information Services (IIS) installed. To meet the OS require- ments for the server, you need one of the following: • Windows 2000 Professional (Service Pack 2) • Windows 2000 Server family (Service Pack 2) • Windows XP Professional • Windows Server 2003 family 2.1.2 Software You will need some additional software in order to use certain features of the .NET Framework, such as ASP.NET, COM+, and the SQL Server Managed Provider. Again, these requirements can be broken down into two categories: client and server. Table 2.1 lists additional features for clients and the corresponding requirements. You can obtain the Windows 2000 Service Pack 2 through the Windows Update fea- ture. Windows Management and Instrumentation (WMI) is included with most “recent” operating systems, as you can see in table 2.1, but you can download it from Microsoft. The Microsoft Data Access Components (MDAC) 2.7 (or later versions) can
  • 33. 14 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 be installed in one of several ways. First, updates to it are usually included in products such as Microsoft Office. Deploying the .NET Framework will also deploy the MDAC. You can easily determine which version is installed from Windows 2000 or later by opening RegEdit and navigating to HKEY_LOCAL_MACHINESOFTWAREMicro- softDataAccess. The Version attribute contains the currently installed version of MDAC. If you do not have the proper version of MDAC, you can download it from www.microsoft.com/data (Windows Server 2003 ships with MDAC 2.8). Table 2.2 lists additional features for servers and the corresponding requirements. NOTE If you do not plan on installing Visual Studio .NET on your server (and you are not running one of the Windows Server 2003 family of products), you can simply run the Component Update included with Visual Studio .NET. This will install everything you need to host and run applications available on the .NET Framework. 2.1.3 Hardware In addition to the software requirements for version 1.1 of the .NET Framework, let’s look at the hardware you need to run the Framework (table 2.3). The hardware requirements are relatively low, so there’s a good chance that the minimum OS requirements are greater than the minimum requirements for the .NET Framework. You should evaluate both and choose whichever one yields the higher performance. Table 2.1 Additional features and software requirements for clients Feature Requirements COM+ Windows 2000 Service Pack 2 or later System Management Access WMI, which is installed by default on Windows 2000, ME, and XP SQL Server .NET Managed Provider Microsoft Data Access Components (MDAC) 2.7 or later Table 2.2 Additional features and software requirements for servers Feature Requirements ASP .NET Internet Information Services 5.0 or later SQL Server .NET Managed Provider Microsoft Data Access Components 2.7 or later Table 2.3 Hardware requirements Required Recommended Pentium 133 MHz with 128 MB of RAM >= Pentium 133 MHz, with >= 256 MB of RAM
  • 34. NEW FEATURES OF VERSION 1.1 15 2.2 NEW FEATURES OF VERSION 1.1 The .NET Framework 1.1 is included with the Windows Server 2003 family of products. As we explained in the introduction, it includes bug fixes and features that you were required to download separately to extend the functionality of version 1.0. The new features described in this section include the .NET Compact Framework, ADO.NET, ASP.NET mobile controls, side-by-side execution with version 1.0, and Framework security. 2.2.1 The .NET Compact Framework Because of the rising popularity of mobile devices (i.e., running Windows CE), Microsoft offers the .NET Compact Framework to meet the demands of these devices. The Compact Framework is a subset of the .NET Framework; it contains less overhead and gives you a smaller footprint when installed on a mobile device. The .NET Compact Framework is new to the overall .NET Framework. It was released in conjunction with the .NET Framework 1.1. By utilizing the Compact Frame- work, you can easily write applications that are designed for smart devices, such as PDAs, mobile phones, and set-top boxes. One of the first things you will notice about the .NET Compact Framework is that you already know how to develop applications on this platform. You can use Visual Studio .NET to develop applications written using this framework. That way, you’re using a familiar tool and familiar controls to develop your smart-device applications. A common problem for developers is that writing applications for PDAs and mobile phones simply can’t be done by using one platform. For example, if you develop an application that runs on the Pocket PC platform, then you have to learn a tool such as Embedded VB or Embedded C++. These standalone tools are closely related to Visual Basic 6.0 and Visual C++ 6, but you can only use them to develop Pocket PC applications. If you want to develop applications for PalmOS, you must use a tool such as CodeWarrior or AppForge. A concern with PDA development is that such a wide variety of CPUs and development platforms is available that it becomes difficult to determine which platform is the best for your particular problem. If your application is to be run on a mobile web phone (i.e., a WAP-enabled phone), then you have to learn a completely different language: Wireless Markup Lan- guage (WML). One of the major problems with developing WML applications is that much discrepancy exists between versions of the WML specification that each phone is able to render. WML also requires constant connectivity, which can be a problem due to loss of signal, interference, and other such factors. Additionally, WML is designed to display data only on a mobile web phone; you can’t take advantage of any client-side processing. The .NET Compact Framework solves many of these issues by giving developers one shared platform to develop a wide variety of applications. It currently supports development in both VB.NET and C# for devices running Pocket PC and Pocket PC
  • 35. 16 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 2002, Microsoft Smartphone, and any device that runs Windows CE.NET, such as the new Windows-based PDAs. The Compact Framework utilizes much of the same programming model as .NET Windows Forms applications, which means that you can just as easily write applica- tions using the .NET Compact Framework as you can with the full-blown .NET Frame- work. The Compact Framework includes about 25 percent of the .NET Framework classes and is designed to run on a mobile device. When an application runs on a mobile device using the .NET Compact Framework, it gets compiled to native code for that device because the device has a version of the Common Language Runtime (CLR) run- ning locally. This is not the case with Embedded Visual Basic; the code is interpreted. One of the key features of the Compact Framework is that it was designed from the ground up to support web services. This is important to remember because it means that your networked mobile devices can communicate with many different sys- tems by using common web service protocols—which opens up lots of functionality to you as a mobile developer, no matter which platform you’re using. For example, if you have web services written on the Java platform, your .NET Compact Framework applications can take full advantage of them. Another key is that unlike most PDA programming models in the past, the .NET Compact Framework has a built-in security model. This model follows the same “evidence-based” security model as .NET desktop applications. One of the problems with other mobile technologies is that there is no defined security model. Developers Figure 2.1 The Stock Quote application
  • 36. NEW FEATURES OF VERSION 1.1 17 end up having to write their own methods for security, which can vary drastically from application to application. Let’s take a quick look at a simple .NET Compact Framework application. This application utilizes a web service that is hosted by Nexus6Studio.com and allows you to search for stock quotes by providing a company’s ticker symbol. In figure 2.1, our example application displays stock symbols. As you can see, all that is required from the user is a valid stock symbol to return data from the web service. Figure 2.2 demonstrates adding a web reference to the stock quote web service. As you can see by the browser window, the services provide us with two methods: GetQuickQuote and GetDetailQuote. Both methods require a ticker symbol as a single input parameter. The GetQuickQuote method returns the price only as a string object, and GetDetailQuote returns a custom data type in the form of a structure called DetailQuote. Once our references have been set, we can easily use the services (listing 2.1). 'VB.NET Private Sub cmdGetQuote_Click(ByVal sender As System.Object, ByVal e _ As System.EventArgs) Handles cmdGetQuote.Click Dim oWS As New Nexus6StudioStockQuoteWebService If optDetailedQuote.Checked Then Listing 2.1 Using the Nexus6Studio.com stock ticker web service Figure 2.2 Adding a web reference to the Stock Quote web service
  • 37. 18 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 Dim q As DetailQuote q = oWS.GetDetailQuote(txtTicker.Text.Trim.ToUpper) With q lblPriceVal.Text = .Price lblChangePtsVal.Text = .Change_Points lblChangePctVal.Text = .Change_Percent.Replace("""", _ String.Empty) lblOpenVal.Text = .Open lblHighVal.Text = .High lblLowVal.Text = .Low lblBidVal.Text = .Bid lblAskVal.Text = .Ask lblVolumeVal.Text = .Volume End With Else lblPriceVal.Text = _ oWS.GetQuickQuote(txtTicker.Text.Trim.ToUpper) lblChangePtsVal.Text = "N/A" lblChangePctVal.Text = "N/A" lblOpenVal.Text = "N/A" lblHighVal.Text = "N/A" lblLowVal.Text = "N/A" lblBidVal.Text = "N/A" lblAskVal.Text = "N/A" lblVolumeVal.Text = "N/A" End If End Sub //C# private void cmdGetQuote_Click(object sender, System.EventArgs e) { Nexus6StudioStockQuoteWebService oWS = new Nexus6StudioStockQuoteWebService(); if(optDetailedQuote.Checked == true) { DetailQuote q; q = oWS.GetDetailQuote(txtTicker.Text.Trim().ToUpper()); lblPriceVal.Text = q.Price; lblChangePtsVal.Text = q.Change_Points; lblChangePctVal.Text = q.Change_Percent.Replace(""", String.Empty); lblOpenVal.Text = q.Open; lblHighVal.Text = q.High; lblLowVal.Text = q.Low; lblBidVal.Text = q.Bid; lblAskVal.Text = q.Ask; lblVolumeVal.Text = q.Volume; } else { lblPriceVal.Text = oWS.GetQuickQuote(txtTicker.Text.Trim().ToUpper());
  • 38. NEW FEATURES OF VERSION 1.1 19 lblChangePtsVal.Text = "N/A"; lblChangePctVal.Text = "N/A"; lblOpenVal.Text = "N/A"; lblHighVal.Text = "N/A"; lblLowVal.Text = "N/A"; lblBidVal.Text = "N/A"; lblAskVal.Text = "N/A"; lblVolumeVal.Text = "N/A"; } } When the user enters a stock quote and clicks the Get Quote button, an instance of the web service is created. If the user clicks GetDetailQuote on the resulting screen, then the GetDetailQuote method is called and populates the labels with the returned data. If the user clicks GetQuickQuote, the GetQuickQuote method is called and populates the Price label with the price returned by the web service and fills all other labels with the value N/A. Overall, the .NET Compact Framework is built on the same concepts that you already know, so you gain the knowledge of building secure applications for mobile devices along with learning VB.NET and C# applications. 2.2.2 Effectively utilizing ADO.NET Microsoft has extended ADO.NET to include the Oracle and ODBC .NET data pro- viders. That means you can natively use ADO.NET to access Oracle databases and ODBC databases without having to perform a separate download and install to gain access to these features. In this section, you’ll learn about ADO.NET by looking at dif- ferent ways to connect to databases other than SQL Server. Connecting to Oracle If you are querying against an Oracle database, you want to use the Oracle .NET Data Provider because it gives you the best performance (much like the SqlClient for SQL Server). The Oracle provider is located in the System.Data.OracleClient namespace in the .NET Framework. Until this provider was available, developers had to use the OLEDB .NET Data Provider when accessing Oracle databases. Although that approach is acceptable for accessing any database, the Oracle .NET Data Provider yields much stronger performance, similar to the SQL Server .NET Data Provider. When you use the Oracle .NET Data Provider, you bypass the need to use OLEDB drivers in order to perform queries. This dramatically increases the performance of your application because you don’t have to go through a “middleman” (OLEDB) to access the database. The calls are sent directly into Oracle by using the Oracle Call Interface (OCI), which give you a “hook” into the database from your application. (The OCI is the technology used by the Oracle client software.) The .NET Data Provider for Oracle provides support for the new data types that were introduced in Oracle 9i, as
  • 39. 20 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 well as ref cursors. Ref cursors become useful when you are running stored procedures that return result sets. Your Oracle database must be 8i Release 3 (8.1.7) or later to be able to use the .NET Data Provider for Oracle. If your database meets the version requirements, it is easy to use the Oracle .NET Data Provider. Let’s take a look at a code sample (listing 2.2) and learn how to use the Oracle .NET Data Provider to connect to a database. 'VB.NET Imports System.Data.OracleClient Public Class OracleNet Sub BindDataGrid() Dim cnOracle As New OracleConnection( _ "Data Source=OracleDB;Integrated Security=SSPI") Dim cmdEmployees As New OracleCommand( _ "SELECT * FROM Employees", cnOracle) cmdEmployees.CommandType = CommandType.Text Dim ds As New DataSet() Dim adpEmployees As New OracleDataAdapter(cmdEmployees) adpEmployees.Fill(ds, "Employees") dgEmployees.DataSource = ds.Tables("Employees") End Sub End Class //C# using System.Data.OracleClient; using System.Data; public class OracleNet { void BindDataGrid() { OracleConnection cnOracle = new OracleConnection("Data Source=OracleDB;Integrated Security=SSPI"); OracleCommand cmdEmployees = new OracleCommand("SELECT * FROM Employees", cnOracle); cmdEmployees.CommandType = CommandType.Text; DataSet ds = new DataSet(); OracleDataAdapter adpEmployees = new OracleDataAdapter(cmdEmployees); adpEmployees.Fill(ds, "Employees"); dgEmployees.DataSource = ds.Tables["Employees"]; } } First, the BindDataGrid method in listing 2.2 creates an OracleConnection object and passes a connection string into the constructor. Then, the code creates an OracleCommand object, which executes a query that selects all rows and columns Listing 2.2 Connecting to Oracle
  • 40. NEW FEATURES OF VERSION 1.1 21 from the Employees table in the Oracle database. Next, the code creates an Oracle- DataAdapter object and passes the corresponding OracleCommand object, cmdEmployees, into the constructor. Finally, the code calls the Fill method of the OracleDataAdapter object, adpEmployees, to execute the query and pop- ulates a DataSet object, ds, with the result set of the query. Finally, the code binds the returned table to a DataGrid object, dgEmployees, to display it on a form. Connecting to Access As you can see in the previous example, connecting to Oracle using the Oracle .NET Data Provider is a simple process. As listing 2.3 shows, it is equally easy to connect to a database by using the ODBC .NET Data Provider that is included with the .NET Framework 1.1. 'VB.NET Imports System.Data.Odbc Public Class Class1 Sub BindDataGrid() Dim cnODBC As New OdbcConnection( _ "Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:somepathmydb.mdb;Uid=Admin;Pwd=") Dim cmdEmployees As New OdbcCommand( _ "SELECT * FROM Employees", cnODBC) cmdEmployees.CommandType = CommandType.Text Dim ds As New DataSet() Dim adpEmployees As New OdbcDataAdapter(cmdEmployees) adpEmployees.Fill(ds, "Employees") dgEmployees.DataSource = ds.Tables("Employees") End Sub End Class //C# using System.Data; using System.Data.Odbc; public class Class1 { void BindDataGrid() { OdbcConnection cnODBC = new OdbcConnection("Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:somepathmydb.mdb;Uid=Admin;Pwd="); OdbcCommand cmdEmployees = new OdbcCommand("SELECT * FROM Employees", cnODBC); cmdEmployees.CommandType = CommandType.Text; DataSet ds = new DataSet(); OdbcDataAdapter adpEmployees = new Listing 2.3 Connecting to Microsoft Access
  • 41. 22 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 OdbcDataAdapter(cmdEmployees); adpEmployees.Fill(ds, "Employees"); dgEmployees.DataSource = ds.Tables["Employees"]; } } Listing 2.3 is similar to the previous listing, except that we are connecting to Microsoft Access using the ODBC .NET Data Provider. Utilizing universal data link files One of the problems that I often encounter when I am on a consulting project is that my current client has a different database (i.e., the manufacturer, such as Microsoft or Oracle) from my previous client. And more times than not, it is usually a different database than SQL Server. So, off to the Internet I go to figure out how to write a con- nection string for the current database that I’m working with. Table 2.4 lists the con- nection strings that you can use to connect to various databases using the four .NET Data Providers. Table 2.4 Connection strings Provider Database Connection String SqlClient SQL Server 7 .0 and later Data Source=ServerName;Initial Catalog=database; Integrated Security=SSPI; OracleClient Oracle 8i Release 3 (8.1.7) and later Data Source=OracleInstance;Integrated Security=SSPI OleDb SQL Server Provider=SQLOLEDB;Data Source=ServerName; Initial Catalog=database;User ID=aUsername;Password=aPassword; Oracle Provider=OraOLEDB.Oracle;Data Source=OracleInstance; User ID=aUsername;Password=aPassword; Sybase Provider=Sybase ASE OLE DB Provider;Data Source=aDataSource; Database=database;User ID=aUsername;Password=aPassword; Access Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:pathaccessDB.mdb;User ID=Admin;Password=; IBM AS/400 Provider=IBMDA400.DataSource.1;Data Source=database; User ID=aUsername;Password=aPassword; Odbc SQL Server Driver={SQL Server};Server=ServerName;Database=database; UID=aUsername;PWD=aPassword; Oracle Driver={Microsoft ODBC for Oracle};Server=OracleInstance; UID=aUsername;PWD=aPassword; Sybase Driver={Sybase System 11};SRVR=ServerName;DB=Database; UID=aUsername;PWD=aPassword; Access Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:pathaccessDB.mdb;UID=Admin;PWD=; DSN DSN=dsnName;UID=aUsername;PWD=aPassword;
  • 42. NEW FEATURES OF VERSION 1.1 23 Though universal data link (UDL) files are not native to the .NET Framework 1.1, I feel that it is an important issue to cover in this section. A well-known fact is that it is easy to create a Data Source Name (DSN) to connect to an ODBC database. This can be done in the data sources (ODBC) tool that is built into Windows. However, if you want to connect to an OLEDB data source, then a DSN is useless. It is just as easy to create a connection to an OLEDB data source by using UDL files. You can create a UDL file by simply right-clicking on your desktop or in a directory, selecting New, and then choosing Text Document. When the new text document appears in your direc- tory, rename it and change the extension from .txt to .udl. For example, Pubs.udl would be a good filename for a UDL file that is configured to point at the Pubs data- base. Once you rename the file, double-click it to open the Data Link Properties dia- log box, shown in figure 2.3. The Provider tab lets you select an OLEDB provider for the database to which you would like to connect. The tab displays a list of OLEDB providers that are installed on your machine. For this example, select the Microsoft OLE DB Provider for SQL Server, as we’ve done in figure 2.3. Next, select the Connection tab, shown in figure 2.4. The Connection tab (figure 2.4) allows you to select a server where the database is located, logon information, and the database you want to connect to. It also lets you test the current connection configuration by clicking the Test Connection button. At this point, click the Advanced tab, shown in figure 2.5. On this tab, you specify network settings, the connection timeout, and access permissions for the connection. The Impersonation Level drop-down list allows you to specify how the server will impersonate the client; possible values are: Figure 2.3 The Data Link Properties dialog box, open to the Provider tab
  • 43. 24 CHAPTER 2 THE .NET FRAMEWORK, VERSION 1.1 • Anonymous—The client is anonymous to the server. • Delegate—The process impersonates the client’s security context. • Identity—The server can obtain the client’s identity. • Impersonate—The server impersonates the client’s security context. Figure 2.4 The Connection tab Figure 2.5 The Advanced tab
  • 44. Another Random Document on Scribd Without Any Related Topics
  • 45. Gordon paused to lean down and speak confidentially to the invalid. “We can’t make him wear a belt,” he said, “and he won’t wear a khaki coat, either. He’s very funny about some things; well, good-by.” Mr. Wade gave them a letter to be delivered to Dr. Brent, alias Red Deer, and bade them a hearty good-by, with many hints to be used in their search for the needle in the haystack. The three patrols stood together and gave them a great send-off. But not the full troop, either, for seated by the roadside over the hill, they came upon Frankie and his faithful follower, Giant George. “What did you think of that scheme yesterday?” said Frankie. “It was great,” answered Harry. “I thought up all those signs,” Frankie continued. “They were very clever, too,” Harry said. “I thought up that about the odd shoes, too.” “That was the best part; well, good-by, Frank.” They had gone perhaps a hundred yards when the piping voice of Giant George was heard in rebellious altercation with his leader, and presently a frantic shout from him brought them to a halt. “I thought up that about the odd garters!” he shouted. “Good for you, George!”
  • 46. CHAPTER XIII AN EXTRAORDINARY INVENTION (Patent not applied for) They cut up through the woods where Gordon had picked his way to the Albany camp, for he wanted to show Harry the chasm and the path he had taken. “Now, Kid,” said Harry, “you will be kind enough to keep your beautiful brown eyes straight ahead, or by the great eternal sphinx I’ll put a pair of blinders on you. No more pink arrows! Just look ahead and listen to me. We’ve got three things to do, and one of them is right in your line. First, we’ve got to strike Crown Point and find the elderly lady who lost this bag.” “How do you know she’s elderly, Harry?” “On account of the smelling salts. Then we’ve got to find the troop, and if all goes well I’m going to give Mr. E. C. Wade the surprise of his life. How would you like to be Ethan Allen?” “What!” said Gordon, the idea suddenly dawning on him. “Well, now,” Harry continued, “Ethan Allen was like you; he was the kind of a fellow who could find a way.” “That’s like you, Harry.” “Well, but he liked to talk and make fine speeches, too, so I think it’s up to you. Anyway, I’m going to put the idea up to Red Deer, if we can root him out, and see if we can’t plan an assault. We’ll reconnoiter the locality, send a couple of scouts in, then go over into Vermont, transport our men in dories right under Mr. Wade’s nose, gag his sentries (he’ll have some out, you can wager), and enter the fort, call upstairs and give him Allen’s speech about Jehovah and the Continental Congress. Exactly how we’ll take the fort is a thing I’ll have to think out and talk over with Red Deer. But so far, how does it strike you?”
  • 47. Gordon was radiant. “It’s great, Harry! It’s simply fine! And I read in a book—the school history—that after it was all over Ethan Allen and Seth Warner made a trip to Philadelphia and received the thanks of Congress; and we’ll do that too, Harry, we—” “I don’t just see how we could do that,” said Harry. “Yes, we could, Harry; there’s a way. My uncle belongs to a club where there’s a man who knows a senator, and he—” “Now just come down to earth,” said Harry. “Do you suppose Allen was figuring on the thanks of Congress before he did anything? You’re a nice kind of patriot!” They had reached the chasm and explored it together. Harry found a strip of wood which had evidently held the three logs together when they spanned the gully, and found that it contained several nails exactly like the telltale one whose impressions he had followed. He even found another one lying in the mud. “It’s seldom a man commits a crime,” he said, “without either taking or leaving something that he doesn’t mean to. Sometimes it isn’t large enough to convict him. Sometimes it’s so small that it escapes notice. But a hundred to one, he takes or leaves something. Come on, let’s get away from here. You did great work, Kid.” That was the last that Harry ever said, voluntarily, about the sordid crime. He seemed disgusted at all mention of it and anxious to forget it. Emerging on the road where Gordon had seen the pink arrow, they started north for their belated ascent of Dibble Mountain. Their purpose was to get an outlook from its summit and go down its northern slope into the little village of Crown Point. They had almost reached the point where the stream ran under the road in its journey to the lake, when they heard voices ahead, and presently came in sight of a country boy leaning over the railing of the bridge and talking to some one below. “Never heerd o’ no sech feller outside a book. I seen a book onct with a guy by the name o’ Dan’l Boone onto it, but I never heerd tell o’ no sech a feller in these parts; there’s a Dan’l Berry over to Hammondville. How’s that?”
  • 48. A voice answered from below, but Harry and Gordon could not hear what it said. “Oh, why didn’t ye say so?” the country boy called down. “Kind o’ play-actin’ folks, was they?” By this time the boys had reached the bridge. Underneath, rocking gently in the water, was the handsomest motor boat that Harry Arnold had ever seen. Its brass trimmings shone dazzling in the morning sunlight. Cushions of scarlet plush covered its seats, their vivid color thrown into relief by the color of the boat itself, which was as white as snow. Also as white as snow was the mustache of the gentleman who occupied it, and the eyes which met those of Gordon and Harry as they looked down were genial with just the suggestion of a humorous twinkle. He wore a linen suit, very much wrinkled, and very much wrinkled, also, was the kindly face, and rather scanty were the gray locks that showed under the little blue yatching cap which he wore. A young man in chauffeur’s attire sat near the engine with his hand on the steering-gear. “Good morning,” said the gentleman. “How far can I get with this thing?” “Not much farther, I’m afraid,” answered Harry. “How much does she draw?” “Now, you’ve got me,” said the gentleman, laughing. “How much does she draw, Pat?” Pat shook his head. “She draws about twenty dollars a week in the summer,” said the gentleman, “and if she were mine, I’d discharge her.” “What seems to be the trouble?” laughed Harry. “The trouble,” responded the gentleman, merrily, “is between herself and my son—it’s not my quarrel. She is occasionally taken with carburitis, which is a complaint of the carbureter. To-day she’s doing very nicely, thank you. Do either of you boys know where the Boy Scouts have their camp—how far up this stream? I’m trying to get to them.” “We just came from there,” Harry answered. “They’re about two miles up, but I’m afraid you’ll have to foot it. It’s pretty shallow and rocky from here on.”
  • 49. The gentleman put on his glasses. “Oh, yes,” said he, “I might have noticed. Is that a blue shirt you’ve got on? The sun is right in my eyes—you tall fellow, I mean?” “It’s supposed to be blue,” laughed Harry. “He’s got a khaki one,” added Gordon, “but he never wears it.” “You belong up there, I suppose?” “No, sir, we’ve been making them a visit. We’re a couple of tramps just now.” “Is that a leather wristlet you’ve got?” “Yes, sir.” “Well, just come—no, wait a minute—I’ll come up there.” “Stay where you are, sir,” answered Harry. “We’ll come down.” He led the way down as if he expected to be charged with a crime. He suspected what was coming. “Come in here, my boy—you too. My name is Robert E. Danforth. I have a place across the lake. You saved my boy’s life yesterday— don’t attempt to deny it! You’re the very boy I’m looking for. Did you give your name as Buffalo Bill? You did—don’t deny it! Who are you, anyway? Why didn’t you come up to the house so that we could thank you? Do you realize what you did?” Harry had hoped that he might hear nothing more of the incident, but there was nothing now for him to do but face the music. Mr. Robert E. Danforth, according to gossip, had begun life with nine cents, and he now had nine million dollars. It was not likely that such a man would permit the modesty of a boy scout to stand in the way of his purpose. And his purpose now was to make suitable acknowledgment to the boy who had saved his little son’s life. In the winter Mr. Danforth worked very hard; in the summer he played very hard, and this was his play season. He would hear of nothing but that the two boys should go back with him to Overlook, his magnificent estate on the Vermont shore. So the boat’s prow was turned downstream and the little craft went chugging out through the reedy basin and across the lake toward a beautiful boat-house surmounted by an octagonal cupola, in one of the open arches of which they could see a small figure. They were
  • 50. halfway across when suddenly a white object shot from the cupola and dropped into the water a few feet from the boat. “Get it, Pat,” said Mr. Danforth, and the boat was steered over to the floating object, which Harry reached for and secured. It was a little aeroplane, crude enough in construction, having a plane about twenty inches long, on which dried glue, somewhat sticky now from the plunge, appeared in untidy masses. But as Harry lifted it, the propeller, which was nothing but one of those celluloid fans which shoot into the air when twisted from between the hands, began to revolve with a steady, even motion, continuing for fully half a minute. Mr. Danforth smiled as Harry examined it. “He thinks he’s going to revolutionize juvenile aeronautics,” said the father. “Well, I don’t know but what he will!” said Harry. “What is this, anyway?” “It’s the alarm apparatus from a clock.” The mechanism was bound with thread under the center of the plane. The brass frame which encased a set of clockwork had been filed into and broken off, so that nothing was left but a little corner of frame holding a small clock spring, one little cogwheel, and the catch and release teeth which create and govern the vibration of the upright striking bar. The little metal knob, or striker, on the top of the bar had been twisted off and, since its weight modified the striking action, its removal created an excess of power which was here taken up by the propeller. This latter was rather clumsily connected with the mechanism by a light, flat-linked brass chain which ran around the cogwheel. The trouble with the whole affair was its weight, which, though small, might easily have been reduced still further. They had now reached the boat-house, where the man jumped out and hauled the craft in between two others, one a beautiful steam yacht. The other, about the size of an ordinary rowboat, was covered with canvas. The little boy whom Harry had rescued met them on the stairs, his eyes glistening with tears. “It’s the twenty-third time it wouldn’t go,” he said. “Never mind, my boy,” said his father, putting his arm affectionately over the little fellow’s shoulder. “Maybe it will go next
  • 51. time.” “Twenty-three’s a hoodoo number, anyway,” added Harry. “Why do you send it over the water?” “Because if it flies across the lake, I’ll win the cup. But it won’t—it never does.” “Well, Pat will row out and get it for you every single time,” said his father, soothingly. “It’ll get spoiled—it’s spoiled now—the ones you buy go.” He almost broke out crying, and Mr. Danforth looked as if the little fellow’s disappointment actually hurt him. “I was all this week and two days of last week making it—and it’s spoiled.” He set his lips tight in a manly effort to control his distress. Harry stepped forward, placing his arm over the boy’s shoulder as his father had done. “You remember me?” he said in his quiet way. “Well, now, you listen a minute. Never mind if your machine is spoiled, you’ve still got the idea and it’s a mighty good one, too. You can work it up again and make it still better.” He smiled encouragingly and patted the little fellow’s shoulder. The father was delighted. “Hear that, Pen? This is the boy who got you out of the water yesterday—come to see how you are—maybe he can give you some ideas. Take him up to the aviation tower and show him things—show him the cup.” He winked at Harry. “I want you boys to stay here till to-morrow,” he called after them as Penfield led the way upstairs, “as a favor to me.” “I’m afraid we’ll never find our friends unless we get about it,” Harry protested. “Well, one day won’t make any difference. I want a chance to talk to you. Come up to the house when you’ve seen his den.” Penfield led them into a little octagonal room, littered thick with shavings, pieces of silk, tangled masses of reed, and a fishing rod which had been laid under contribution for strips of bamboo. Magazine cuts of the various types of air craft, the Curtis, the Voisin, the Cody, and the Wright, were tacked on the wall. “That’s the Voisin,” said Penfield, excitedly, as Harry stood before the picture. “It looks like the Wright, but it isn’t, it’s got more
  • 52. longitudinal stability on account of the enclosed ends and partitions. But it can’t coast like the Wright. I like monoplanes best, don’t you? That’s the Bleriot. You can flex the tips of the planes, that’s one thing about it I like. Pat likes the Antoinette model, but I don’t. The Curtis is my favorite,—only, of course, that’s a biplane. You can’t make a toy biplane fly, it needs too much control. But the Curtis is my favorite. It’s the lightest of all, but that isn’t why I like it. And it has the best finish, but that isn’t why I like it, either. It’s the control; you lift and decline the fore planes by shifting the steering wheel. And the balance is controlled by moving your body sideways. Isn’t that a dandy idea? But I like the Wright brothers—my, I’d like to see them!” “Well, they began just like you,” said Harry. There was one thing he noticed in particular as he picked up the broken and unfinished models that lay about. The most common, everyday objects had been used for some practical purpose. A circular typewriter eraser acted as wheel to a cog chain. Metal paper clips were used to hold joints. The circular, hollow bar of a gas jet held together and served as ferrule and fore-weight to the three dowel sticks forming a motor-base. The boy seemed to have his own way of doing everything, and everything he had done was ingenious. On a rough bracket, six feet or so above the floor, stood a battered pewter stein. “That the cup?” Harry asked. “Yes, that’s it, but I can’t touch it—not till I’ve won it.” “Who offered it?” Gordon asked. “I did, but I make believe it was a club. I’m trying to win it—it’s a trophy. I can’t even touch it till my monoplane flies across the lake.” Gordon would have laughed, but he encountered Harry’s look, and refrained. “Well, now, let’s see,” Harry said, sitting down and taking the little model on his knees. “I think we’re just the fellows for you. You’ve heard of the Boy Scouts, I suppose. Well, we belong to the Scouts of Oakwood, New Jersey, and there’s an aero club in our troop—” “Oh, my father’s building a house there,” cried the boy.
  • 53. “Where—Oakwood?” “Yes, we’re going to live there this Fall when it’s finished. We’re not going to live in the city any more.” “Do you suppose he means the big house they’re putting up on the hill?” Harry asked of Gordon. “Yes, it’s on the hill,” Penfield spoke up, “and I’m going to sleep outdoors.” “Well, that’s news,” said Harry. “I wondered who was putting up that house.” “Yes, and may I join your aero club—if I make one that goes?” “You certainly may!” said Harry. “You can join the troop, and then if you are interested in aeroplanes you can join the little club six of the boys have formed. There’s going to be a big meet in Oakwood this Fall; any boy that lives in the county can enter his ’plane— provided he made it. I believe the Oakwood News is offering a cup, too, isn’t it, Gordon? I don’t know very much about aeros myself.” “He does too,” said Gordon. Penfield was delighted. Excitedly he explained his crude little model to Harry. And Harry saw that the novel motive power which he had used held vast possibilities. He wound up the spring and found that the power sustained the propeller in rapid motion for thirty-four seconds. “Twelve seconds is the best ever done with elastic band torsion,” said Penfield. It was evident that he had been studying the subject. “Well, then,” said Harry, in a brown study. “I don’t see why we should lose those twelve seconds. Let’s see, twelve and thirty-four make forty-six. Forty-six seconds in the air will beat any model airship ever made. Say that you lose six seconds for the transfer of power—there you have forty left.” “What do you mean?” asked both boys. “Why, see here. The way they run these things usually—those you buy as well as the home-made ones—is by a long, thin strand of elastic from the axis of the propeller to a stationary hook. Wind the propeller and it winds the elastic—there’s your power. Now, see this little jigger here?” He put his finger on the upright wire bar on which the striker of the alarm had been mounted. “This vibrates rapidly
  • 54. while the spring is unwinding. Now, suppose you bend the top of it into a hook, wind up your elastic, then wind up your spring. This striker bar will hold the wound spring stationary until the power of the elastic is exhausted. As soon as the elastic is run down, the spring goes to work. There are half a dozen ways to connect the spring movement with the propeller—the catch chain is one. You’ll have to work it out. I give you the tip—the name is also thrown in— it’s the celebrated Strikastic Multiple Motor, producing a sustained flight of about forty seconds. ‘Strike’ stands for striker; ‘astic’ for elastic.” “Or you might call it the Clockubber Transfer Motive System—that brings in clock and rubber,” said Gordon. “Or better still, the Penalarm Torsubber Champastic Double Motor—there you’ve got everything in—Penfield, Alarm, Torsion, Rubber, Champlain, Elastic and—and—wait a minute—” “No aeroplane could carry such a name as that,” said Harry, “it would keel right over. Now, old boy,” he said to Penfield, “if I were you, I’d take time and make this right, and I believe you’ll have a winner. Make your plane bigger—thirty inches anyway, and flex it. You take a wooden pie plate and see how much higher it goes than a flat disk. “Flex it this way” (he showed with pencil and paper); “then if I were you I’d have the sticks of your motor-base, or backbone, as you might call it, just wide enough apart to wedge this clockwork business between; it’ll stand rigid and you’ll get rid of a lot of friction. You might take away the brass frame altogether and line the wooden casing with aluminum. You’ve got to have the spring farther aft than this so as to have a good long span of elastic. I don’t know what will happen up in the air when the power is transferred. Your propeller will probably slow down a second or two; you’ve got to experiment with that. Your difficulty is going to be in utilizing the power supplied by the spring by some light, simple mechanism. Cogwheels eat up a lot of energy—but there’s a way, as my old college chum here would say, and it’s up to you.” The boy stood radiant as they rose to go. “Did you think of using the alarm apparatus?” Harry asked him.
  • 55. “Yes, but now I see what can be done with it—and—you’re a genius.” “No, you’re the genius,” Harry answered; “you’d have worked it up this way sooner or later. You see, your plane was too small for your motor; then, again, this isn’t a first-rate propeller, it hasn’t enough slant.” “I know how to make one,” Penfield broke in. “You cut strips of cigar-box wood, glue them on top of each other, put a nail in the middle, then before they begin to dry, twist them a little, as you do with a pack of cards. When the pile dries, whittle off the uneven edges, and you’ve got a dandy propeller. It’s easier than trying to make one out of one piece.” “How’d you learn that?” Harry asked. “Oh, I thought of it when I saw some one twist a pack of cards.” They went up a gravel walk which wound through the green lawn, and found Mr. and Mrs. Danforth on the porch. Penfield disappeared and Mrs. Danforth greeted the boys, thanking Harry profusely for his service to her son. They found it was true that Mr. Danforth was building a house in Oakwood and that the family were to go there early in the Fall. “We have done everything we could for Penfield,” said Mrs. Danforth. “We bought this place so that he might have the mountain air, and we are leaving New York for the same reason. Yet we can’t get him to go outdoors and play with other boys. He would much rather sit in the house and read. Last year the boys in Ticonderoga had a baseball eleven, the small boys, and asked him to play quarterstop—” “Shortstop,” corrected her husband. “But we couldn’t get him to, he simply wouldn’t. And it was the same with football. He would not go on the frying pan.” “Gridiron,” said Mr. Danforth. “Diamond,” said Mrs. Danforth. “No, ‘diamond’ is in baseball.” “Well, then, where was it they wanted him to play quarterdeck?” “Quarterdeck is on a ship; Roger said something about quarterback, but Pen couldn’t play quarter.”
  • 56. “Why don’t you have him join the scouts?” asked Gordon. “I wish you boys would take him in hand this Fall,” said Mr. Danforth. “He spends all his time indoors making aeroplanes and reading about them.” “Well, that’s a good thing,” said Harry. “But he ought to get outdoors, of course. I’ve been telling him about an aviation contest they’re getting up in Oakwood, and he thinks he’d like to enter. Suppose we get him to join the scouts after we all get home, and then—” “Do they shoot off guns?” asked Mrs. Danforth, looking fearfully at Harry’s rifle. “Sometimes, but not the younger ones. It would be a great thing for your boy.” The answer surprised him. “I think it would be splendid.” An hour later, as Mr. Danforth was showing the boys over the place, he stopped abruptly. “You’ll stay over night with us?” Harry thanked him but said it was impossible. He knew the house was full of guests; the tennis courts were crowded with young people, among whom he could distinctly see the valiant hero of the day before bobbing about, and he thought of his own and Gordon’s very limited wardrobe. Then, too, they were anxious to lose no more time. “Well, then,” said Mr. Danforth, “I won’t urge you, but you know you’re welcome. Now I want to make some little acknowledgment for what you did yesterday—something in the way of a trophy, as you might say.” He had evidently sized Harry up with his wonted business shrewdness, and he avoided the word “reward.” His tact did him small good, however. “I don’t think you could make any better acknowledgment than you have done,” said Harry, feeling a trifle uncomfortable, as he always did when any one praised him. He spoke in his customary careless tone, but his nervous little smile seemed to say that he would like to have done with all this. This uneasiness of the boy who was always so much the master of himself was amusing.
  • 57. “Of course, it would be absurd,” Mr. Danforth continued, “to ask you if you are fond of the water.” Gordon’s eyes opened wide and he listened with rapt attention. “The boat we came across in was recently brought up from New York. But before that my elder son, who is away at present, ordered one which we tried, but found too small for our parties. In fact, it’s nothing but a little motor-dory. It’s down by the boat-house now, and I want you to tumble your freight into it and take it along just to remember us by—or leave it here till you come back if you’d rather.” There was an awkward pause. Gordon stood in terrible suspense. “I couldn’t do that, Mr. Danforth,” said Harry. “I don’t know how to thank you, and if you knew how fond of the water I am, you’d see how the idea of a present of that kind nearly turns my head. You’ve —you’ve hit me in the weakest spot,” he said, kicking the gravel walk and smiling ruefully, “but I can’t take it—I—I—just can’t.” “Why can’t you?” “Because it’s one of our rules to accept nothing for service to a stranger. We have our own awards, honors, and of course we can try for those. That’s different. Saving life isn’t always hard, anyway; the little fellow isn’t heavy, and, well, I guess obeying rules is sometimes harder. Maybe that’s the good thing about rules.” His foot still kicked the gravel, nervously. “Now, look here, my boy, you listen to me. That’s all nonsense, and what’s more, I don’t believe you understand the rule.” “Yes, I do, Mr. Danforth, it’s part of the law.” “Well, see how lawyers differ about the law,” he went on cheerfully, “and besides, you can’t have a law that isn’t constitutional —you must know that. Now here’s a rule which infringes on personal liberty, which forbids me to dispose of a boat that I don’t want. That isn’t fair, now, is it?” “That’s right, Harry,” broke in Gordon, “we have no right to interfere with personal liberty—no one would say that was right. We’d have no right to even if we wanted to, Harry.” Harry laughed in spite of himself. “Last year,” Mr. Danforth went on, “I gave a thousand dollars to the library out in the little Western town where I was born. They
  • 58. didn’t refuse it. This year I gave five thousand dollars to help start a hospital. They took it all right.” “Well,” said Harry, “if you wanted to do something for the Scout organization, I couldn’t stop you, but—” Mr. Danforth seemed about to speak, then suddenly changed his mind, studying Harry closely. The boy was not aware of the scrutiny, for his eyes were on the ground. Neither did he know that he had put an idea into this kindly gentleman’s shrewd mind. “What, for instance?” Mr. Danforth asked. “Oh, I don’t know; I didn’t just mean to say that.” “Is there any reward, or honor, as you call it, for doing a service to the Boy Scouts?” “There is, yes, sir. But I think it’s only given in very rare cases. There was one boy up in Maine who stopped a forest fire which threatened a big summer pavilion that the organization owned. I think they made him the award, but that’s the only case I’ve heard of. I think the rule says, ‘rare and exceptional service,’ or something like that. My friend here knows the regulations better than I do. I think that’s the only case.” “What is it called?” “The gold cross,” said Harry. “Where is the headquarters of the organization?” “It’s in New York, sir,” said Gordon. “I see.” Penfield joined them, and they wandered down to the shore. “Let me show you the boat, anyway,” Mr. Danforth urged. “I’d rather not, sir,” said Harry, hesitatingly. “I—well, I’d just rather not.” Instinctively he held out his hand, and Mr. Danforth shook it cordially. “There’s no use asking you to think it over?” “No, sir, but I don’t know how to thank you—I wish I did. You’ll let Penfield join us in the Fall, won’t you?” “Of course, I want him to.” “He’s going to walk away with the prize cup,” Harry added. “Yes, and he’ll accept it, too,” was Mr. Danforth’s final shot, as the two scouts got into the boat in which Pat was to take them across
  • 59. the lake. “Good-by, Pen,” said Harry, shaking hands with the little fellow. “You work up that idea now, and make your planes large enough, and don’t forget to flex them the way I showed you—get some strips of whalebone. We’ll be home when you get to Oakwood, and we’ll sail in and win that trophy so easily it’ll be a shame to take it.” “He’s a mighty nice little fellow, and clever too,” Harry said, as they crossed the lake. Gordon disdained to reply. Neither did he speak as they left the boat and started across the quarter-mile stretch of flat country toward Dibble Mountain. “Where are we going, anyway?” he finally demanded sullenly. “Up Dibble Mountain to spy round the country—where’d you think?” was Harry’s cheery answer. “How’d I know?” “Why, that was the idea, wasn’t it?” “I don’t care where we go.” “What’s the matter, Kid?” “Nothing the matter with me. Goodness, I can speak, can’t I!” “Well, what are you grouching about, then?” “Who’s grouching?” “You are; don’t you want to hunt up the troop?” “Oh, certainly, if you care to.” “We’d be a couple of gumps to go back home now.” “Well, there’s more than one way of being a gump.” “Refusing a boat, for instance? What do I want of a boat? I’ve got you along, Kid, and that’s all I care about. I’d rather have you than twenty boats. Come now, brace up, old man.” “You didn’t have sense enough to be convinced by reason. That was a fine argument about the public library and the hospital.” “I know it, Kid. I don’t claim to have much sense—you’ll just have to put up with me.” “You won’t gain anything, either,” Gordon continued spitefully. “My father knows him; he belongs to a trust and he’ll manage to get around the law all right.” “He’s a pretty shrewd business man, I should say,” Harry commented.
  • 60. “You bet he is, and he’ll think up a way.” “He’s like you, Kid, eh?”
  • 61. CHAPTER XIV ON DIBBLE MOUNTAIN The belated quest of the needle in the haystack now went forward in real earnest. In the cool of that same afternoon they stood on the brow of Dibble Mountain. Gordon’s hands were dyed purple from the berries he had picked and eaten along the way, and a goodly smootch ornamented his cheek. Sometimes the ascent was so steep that they found the easiest way was to “shinny” up the slender trees along the mountain side, and step off on to the jutting cliffs. It was slow work. From a great bowlder they finally looked down upon the surrounding country, which now, for the first time, as Gordon said, actually did look like a map. To the east, and almost under them, as it seemed, was the lake, and beyond it the green hills of western Vermont. On its northern side the mountain sloped gradually, including Breed’s Hill and Sugar Hill in its easy descent, and beyond these lay the little village of Crown Point. Close on the west rose the great bulk of Buck Mountain, towering above them and closing out their view. Five miles southward lay Ticonderoga, and looking to the west of the village the boys followed an imaginary course northward, trying to pick out in the dense woods the location of the Albany camp. The several roads which they had traversed looked like gray pencilings. Between them and the lofty Buck Mountain ran a high, walled valley, almost a cañon indeed, known as Burgoyne’s Pass, for it was through this valley that the British general led his army for the surprise of Ticonderoga,—the army which, hungry and forlorn, was destined to surrender to the Americans at Saratoga. Far in the north, but near enough to see its outline clearly, rose Bald Knob, a veritable monarch amid its great neighbors. Here and there thin columns of smoke rose, suggesting pleasant habitations and reminding the hungry boys that it was supper time.
  • 62. “Well, what do you think of our seats up in the family circle, Kid? Pretty good view up here, hey?” “It’s A-No. 1! But I don’t see the troop, do you?” “Certainly, right over there.” “Not! That’s a church! Let’s take a squint through that field glass, will you? Placing the telescope to his eye,” Gordon continued, suiting the action to the word, “our young hero now proceeded to gaze round the landscape, when suddenly—” “The bully, who was standing near,” interrupted Harry, also suiting his action to the word, “gently took it from him.” “Ha! I will be even with you yet!” said Gordon, dramatically. “Kid, I think the best thing for us to do is to camp here for the night. If the moon comes out, we can see pretty nearly the whole section of country that I marked on the map—I mean we could see any smoke that rose. This is the very nearest mountain to the shore. We can overlook the low land immediately north and south. As for the west, that big chunk of earth is in the way, but they wouldn’t be to the west. If we have to go up Buck Mountain, we will. But to- night I think we’d better perch here, and when these folks about the country get through supper they’ll let their fires go out, and any smoke we see after that will be from a camp-fire. There’s no use going west of that ridge, is there?” “What ridge?” “Why, we’re in the Champlain Valley; this mountain happens to be standing almost alone, commanding north and south.” “Is it standing in the bottom of the valley, Harry?” “Yes.” “How about old shaggy-headed Buck, next door, here?” “That’s part of the ridge.” “I believe you’re honest, Harry, so I’ll take your word for all that.” “All right, we’ll stay here, then.” “But answer me one question, Harry, before I trust my fate to thee. Where is the other side of the valley?” “Over in Vermont. The Green Mountains.” Gordon looked about. “Over there?”
  • 63. “Yes, but I’m not considering that side. I’m only considering this side of the lake.” “You are splitting the valley down the middle like a piece of kindling wood?” “Correct.” “Harry, you would not deceive me?” “I’ll gag you in a minute.” “And this mountain is a kind of knot in the wood, Harry? Do all the splitting you like, but for goodness sake, be careful—” Harry placed his hand over Gordon’s mouth, and by a dexterous movement tumbled him on to the ground. “Get up now, and help pitch camp, and I’ll make you a rice pudding with figs in it. How does that strike you?” “I can stand it if you can.” “No sooner said than stung,” observed Harry. Their first business was to find water, and this they soon discovered—a crystal spring, ice cold, that bubbled temptingly up between the rocks. While Gordon kindled a fire, Henry felled a small sapling and binding it horizontally between two other saplings, in a sheltered spot, threw his balloon silk shelter over it, drawing it diagonally toward the earth on either side. Gordon kept up a running accompaniment as he busied himself with the fireplace. “‘Oh, we are merry mountaineers, And have no carking cares or fears.’ “What kind of a care is a carking care, Harry?” “Don’t know.” “One that’s made out of khaki, I guess—don’t you throw that! Roll that green log this way, will you, Harold? Many thanks. Placing the green log in a parallel position to the other one, our young hero now knelt stealthily—” “Our young hero will never see home again if he isn’t careful,” said Harry, as he tugged at the cover of a can. “When suddenly,” continued Gordon, “the bully—” But actions spoke louder than words. The bully let fly both camp cushions, one after the other, and under this rapid fusillade “our
  • 64. young hero” sank to the ground. “Coward! Coward!” he called. “Look here, Kid,” said Harry, standing over him and brandishing the can opener, “I’ve got you on the top of this lonely mountain. My contract provides that I shall accompany you in searching for camp. It does not include your old friend Alger, nor Harry Castleman, either. In just a minute—” Gordon rose contritely. “What next—Harold?” “Put some water to boil.” They sat with their backs against the trunk of a large tree, and Gordon admitted that fried bacon never tasted so good, and that nothing went so well with it as pilot biscuit. “I don’t see what they have bread and butter for, anyway,” said he. But his inventive genius would not long remain satisfied with the fare which Harry provided, and presently he was announcing luscious combinations. “I say, try this, Harry—it’s simply great!” He handed Harry two slices of bacon with a fig between them. When the rice pudding was served, words failed him. He ate it with silent and serene delight. They topped off with squares of chocolate, on one of which Gordon was on the point of pouring a little “fly-dope” by way of experiment. When they had finished the meal, Gordon suggested “going back the way they had come,” beginning with chocolate, thence to rice pudding, thence to bacon; but Harry vetoed this novel plan. It was with considerable suspense that they awaited the rising of the moon. As the twilight faded, the smoke which rose here and there in the distance disappeared till no stir was visible on the horizon. The boys knew that a cooking fire in the open, unless it were very close at hand, would hardly be discernible, but they set their faith in the campfire of huge logs, such as Red Deer had never tired of describing. About nine o’clock Gordon, who had gone to the spring for water, came rushing back, wildly pointing to a circling line of smoke in the southwest which was thrown into clear relief against the moonlit sky. “Look, Harry, there they are!” he cried. “Yes, I saw that,” said Harry. “You see that little silvery streak just beyond? That’s the stream. It’s the Albany camp. I’d like first rate to
  • 65. be there with them, too.” “We’ll see them again,” said Gordon, somewhat crestfallen. “You bet,” Harry answered, “when we surprise them in the old fort.” “We’ll give them a jocular demonstration, all right, hey, Harry?” “Ocular!” said Harry. They played mumbly-peg in the moonlight, and discussed the proposed attack upon the “British stronghold.” Gordon was for doing everything, even to the smallest detail, with historical fidelity. “You must be sure to call ‘What, ho!’ Harry, when Mr. Wade asks who it is, because that’s in the book, and you must roll your r’s the way they do up in Vermont. I wish we had an old rusty sword!” “What’ll we do with them when we’ve made them prisoners, Harry?” “That’ll be our chance to return their hospitality,” Harry answered. “They’ll be the guests of the Green Mountain Boys, and Mr. Wade will have to go away back and sit quietly down.” “Oh, it’ll be great!” said Gordon, with a positive groan of delight. “I wish it was the last two weeks of August now!” “If we do it.” “If we do it? Of course, we’ll do it!” It was ten o’clock or after when Gordon’s roaming vision was arrested by a thin, gray line rising out of the black woods far to the north. Harry got out his compass and found that it was a little west of north and, as nearly as he could judge, five or six miles distant. He studied it closely. “That’s it, sure,” said Gordon. “You might run up there and see,” Harry answered dryly. “I’ll wait till you get back.” He got out his map and tried to determine the locality. “Port Henry is eight or nine miles north of here, see?” he said. “It may possibly come from there, but it’s not coming out of a chimney, I’m almost certain. Of course, there’s no telling how far north it is, but it’s probably this side of the high land which begins with Bulwagga Mountain. I dare say it’s between Bulwagga and the shore. There’s a stream there, too—Grove Brook—and that would attract them.” He studied it long and carefully. “I don’t see any
  • 66. suggestion of lightness below it, do you? It must be at least five miles off.” “Harry, I have an idea!” “Good for you.” “You know Red Deer’s rule—eleven o’clock sharp. We all agreed to it. You remember what he said about not leaving any fire burning? Well, now, if they smother that at eleven o’clock—I can just see Conway jumping up like a little tin soldier and piling on green stuff as soon as Red Deer gives the word. You’ll see, Harry, something will happen to that at eleven o’clock!” Harry folded his map, took a piece of chocolate, and settled himself comfortably against the tree trunk. “We’ll wait and see,” he said. The thin, distant column wavered in the moonlight, its top dissolving in the air. Sometimes it was scarcely visible. As eleven o’clock drew near, they watched it with growing suspense. The smoke in the southwest had long since died away. For twenty minutes or so before the hour the boys fancied that the column was losing somewhat in volume. Eleven o’clock came—five—ten minutes after eleven and nothing happened. Gordon looked puzzled. “I—I guess, maybe, Red Deer’s watch is wrong,” he said. “Look!” shouted Harry, jumping to his feet. The thread of smoke had suddenly expanded into a dense mass. They could see it plainly now. “We’ve found them! We’ve found them!” shouted Gordon. “When our young hero gets over his fit,” said Harry, “I will gently remind him that we have not found them at all. There is something going on up in that direction—there seems to be a fire. That’s all we know.” But they watched the thickening mass intently. “Well,” said Harry, “we may as well obey the rule, Kid; let’s turn in. In the morning we’ll cut up through Crown Point village and camp on high ground to-morrow night.” “No, sir! We’ll go straight—” “Where?” “To that—to camp.” “Yes, but where?”
  • 67. “Right where that smoke is.” “There won’t be any smoke there to-morrow morning. Where do you propose to go? Can you point me out on the map just where that smoke is? Well, then, come down out of your airship and listen to reason. If to-morrow is very clear we may possibly be able to pick out the smoke of the cook fire—assuming that that’s our own camp. But I don’t think there’s much chance of our seeing it. That smoke has been coming from several good-sized logs—it’s a big fire. To- morrow we’ll drop into Crown Point and return this little reticule to its owner and then—” “And you’ll ask questions in Crown Point, Harry, and they’ll tell you just where our camp is, and you’ll spoil the whole business. No sirree, we’ve picked up the trail ourselves, and I’m not going to run the chance of our getting information.” “I’ll promise not to ask a soul, Kid.” “Then what will you do?” “We’ll get up north of Crown Point and camp to-morrow night on Bulwagga Mountain. If my idea is correct, we ought to see that smoke to-morrow night close underneath us. Then the next morning we can drop right in on them—if—” “There’s no if about it,” said Gordon. But he reluctantly agreed to this cautious advance, and they turned in for the night. Gordon sang Kipling’s “Scout Song,” chastising his companion by way of accompaniment:
  • 68. “These are our regulations: There’s just one law for the scout. And the first and the last. And the future and the past, And the present and the perfect is, Look out!” With every emphasized word a camp cushion came down upon Harry’s head. “And the first” (bang) “and the last” (bang). “You bet it’s the last!” said Harry, “Look out!” and he promptly returned the compliment with the other cushion. “And the first and the last, And the future and the past. I say, that’s a terrible song, isn’t it, Harry? Say it. Go on, say it once. You can never get it out of your head. There was a fellow over in England—a tenderfoot—and he learned it and it drove him crazy. Go on, say it, Harry.” “Who told you that?” “You say it once—please.” Harry said it, and lost two hours of his night’s sleep in consequence. For while Gordon slept peacefully, dreaming of what the next day was to bring forth, his friend lay looking out into the darkness and saying, over and over: “And the first and the last, And the future and the past, And the first and the last, And the future and the past, And the present and the perfect is, LOOK OUT!” He finally shouted the last two words in hopeless exasperation. “What’s the matter?” said Gordon, sitting suddenly up. “Look out for what?” “And the first and the last, And the future and the past,”
  • 69. moaned Harry, while a smile of delight stole over Gordon’s sleepy countenance. “Kipling’s a fiend, isn’t he, Harry?” “Kid, if you ever mention that song to me again, I’ll do something desperate!”
  • 70. CHAPTER XV THE OWNER OF THE RETICULE The sleeping propensity of a top is nothing to the way Harry and Gordon slumbered. You cannot sleep such sleep indoors. You need the starry sky, the dark surrounding trees, the lullaby of cricket and locust, the low, musical rustle of leaves. Then you can sleep, as Gordon put it, “till the cows come home.” It must have been the custom for the cows in that vicinity to come home at seven A. M., for at that hour the boys awoke, and Harry soon had water boiling for the coffee. Of course, every one’s way of making coffee is by far the best way. The scout way is to bring your water to a boil first, then drop your coffee in and stir like the mischief. At eight-thirty they had every single thing in their bags and were on their way down the northern slope of the mountain. You would not have known that any one had camped at the spot except for the ashes of the fire and the beaver’s head scratched on a rock. They followed a winding, woodland path, scarcely visible in places. “What’s this?” asked Gordon, picking up a small, flat, triangular stone which his alert eyes had discovered. It proved to be an Indian arrow-head about an inch and a half long and nearly an inch wide at one end, tapering to a blunt point at the other. Harry showed his companion how, wedged into the split end of a stick and bound firmly, it constituted the old-time arrow of the bloody Mohawk tribe, whose savage warwhoops had no doubt once been heard along this obscure mountain path. Gordon trudged along, kicking the earth in search of more of these murderous souvenirs. Although they searched carefully, they could find no more of them, but Harry came upon something which held a grewsome interest. At the base of an old oak tree where the earth was gray and powdery, he found the head of a tomahawk,
  • 71. eaten with rust and so encrusted with earth that he was able to break off the corners of it as if it had been made of plaster. “I guess some poor chap met his end here,” Harry said soberly. “How would you like to be tied against that old tree and have a pack of savages throw these things at you?” Gordon shuddered. “Do you suppose we’re on the old trail of the Mohawks, Harry?” They were, indeed, treading the very ground over which that treacherous, bloodthirsty tribe had once carried their victims to torture and massacre. The thought of it had a quieting effect on Gordon, and they pressed their way along silently for a little while. Then he began humming: “Though you didn’t or you wouldn’t, Or you hadn’t or you couldn’t—” “What’s that?” asked Harry. “It’s the rest of that ‘Scout Song,’ Harry,” said Gordon, looking slyly sideways at his friend. “You know what I told you, Kid! So help me—” “Where do we come out?” Gordon interrupted. “We’re headed for Crown Point Centre.” Within an hour they came upon an open road and soon reached the village. It was not necessary to inquire for the owner of the little reticule, for on a wooden post outside the post-office was a notice written in a delicate hand on a half sheet of note paper: LOST Lady’s small hand-bag on road near Ticonderoga. Finder will confer great favor by kindly leaving with postmaster or returning to Miss Antoinette Crosby, Buck Mansion. The word “great” was underlined several times, the word “kindly” was underlined twice, and the word “Miss” once.
  • 72. “How far is it to Buck Mansion?” Harry asked, sauntering into the post-office. The postmaster took a leisurely scrutiny of both boys. “What yer want to go up thar for?” “Just to see some one. About how far is it?” “Well, up here folks calls it three mile. City folks sometimes calls it five. One man that was up thar last summer calc’lated ’twas ten— said ’twas ten mile down and twenty mile back. He was a kind of a comic. But I can tell you right now they ain’t got a vacant room in the house.” “Thank you,” said Harry. “Come on, Kid, we’ll go up there. We don’t need to get up Bulwagga Mountain before night.” The distance to Buck Mansion was somewhere between one mile and ten, and the way led them through a fragrant country with houses at intervals along the road. To-day the distance was rather shorter than usual, or else the “scout pace” helped to make it seem so, for within an hour the boys reached a spacious white house, standing well back from the road. The lawn in front was covered with trees, where a number of hammocks hung. The fence skirting the road was broken in one place by a little summer-house containing a pump, and the half of a cocoanut shell hung near by way of a cup. The position of this little well-house on the very edge of the public road afforded a tempting resting-place for tired wayfarers. Through the trees the boys could see that a deer’s head with spreading antlers hung over the doorway of the house. On the deep porch easy-chairs stood about, and in a frame swing to one side of the lawn a solitary figure sat writing. With this exception, not a soul was to be seen, which seemed odd in a spot that afforded such tempting facilities for idleness and repose. “The deserted village,” said Harry, “but I guess this is the place, all right.” Just then voices reached the boys through the trees: “Shall I come to you?” “No, try to go out.” “She’s for that wicket.”
  • 73. “She can’t get through.” “I could send her down to you.” “She plays before I do.” “Well, I’m going to try to hit her anyway.” There was a second’s silence, then a whack, then “Missed! I told you so!” “Come on over there,” said Harry. On a smooth croquet ground an exciting war was going on. So intent was the group of ladies on the game that it was fully five minutes before any one spied the two scouts who leaned on the picket fence watching the play. Then one of them came toward the fence, her croquet mallet over her shoulder like a musket. “Excuse me for interrupting you,” said Harry, removing his hat, “but I didn’t like to come out on the ground. Is this Buck Mansion?” “Yes, indeed,” she said, eying the boys curiously. “Is there some one you wish to see?” “Is there a Miss Crosby here?” “Indeed, there is. Nettie!” she called. “Here are two young gentlemen to see you.” The figure in the swing rose quickly, spilling a writing tablet, a bag of candy, a fountain pen, and a magazine. As she straightened out her gown, which did not reach anywhere near the ground, the boys saw her to be a girl of not more than sixteen. They turned toward her. “Miss Crosby?” Harry asked. “Ye-es.” “I think this little hand-bag is yours.” “Oh, did you find it?” “Yes, and I ought to have returned it sooner. I’m afraid I found it within an hour of the time you lost it, but better late than never.” He handed her the bag. “Oh, thank you so very, very much. How did you find it?” “Oh, I was just amusing myself noticing where your auto broke down.” “It isn’t my auto.” “And I picked up the bag on the stone wall.”
  • 74. “Oh, thank you so very much for your trouble. The bag isn’t really worth anything, but—” She stopped short and looked at him suspiciously. “How did you know I was in an auto?” “You just said so—or said as much,” smiled Harry. “Yes, but you said it first.” “Well,” said Harry, driven to it, “I happened to be along the road above Ticonderoga that night, and I saw the auto tracks in the moonlight and the ground all rumpled, and, oh, one thing and another, and then the bag on the wall. So I put it in my pocket to return it if I could find the owner.” “You knew we broke down?” “I thought so.” “Oh, isn’t that just wonderful?” “That’s nothing,” said Gordon. “He does things like that every day —he does them by deduction.” “Deduction?” “Yes—putting two and two together and making four.” “That’s arithmetic,” said she. “For instance, he thought this bag belonged to an elderly lady,” Gordon continued. “Of course, once in a great while he’s wrong,” he added quickly, rather regretting that he had selected this particular illustration of Harry’s talent for deducing. “What made him think that? Why, it’s a pale blue—it matches— what made you think that?” she demanded of Harry. “On account of the smelling salts,” said Gordon. She opened the bag and closed it hastily. “I think you’re just horrid!” she said, looking at Harry. But she did not think he was horrid. Quite otherwise. “You see,” explained Harry, “I had to open it to see if it contained a name or address.” “Of course,” she said, “but it was just horrid to think I was an old maid! Do you always finds things out about people that way—what is it?” “Deduction,” Gordon spoke up. “All scouts have to learn to decide things that way—it’s dandy fun.”
  • 75. “I think it’s horrid. I suppose you’re just finding things out about me now. It makes me creepy! But you’re very kind,” she promptly added. “Tell me, honest and true, what are you deducing about me now?” “Well,” said Harry, “I deduce that you’ve been writing a letter and underlining lots of words.” She opened her mouth in astonishment. “You’re a perfect ghoul!” said she. “But I haven’t even asked you to sit down yet. Won’t you come over here and rest?” She led the way to the little well-house by the roadside, giving Gordon an opportunity to whisper to Harry: “Now, you see, Harry—if you only had your uniform on! Did you see how she looked at me? It wasn’t I she cared about, Harry—it was the scout uniform. The scout suit catches them every time. I know more about those things than you do, Harry, because I’ve had more experience. Now you’ve learned a lesson.” There was no chance for Harry to reply, for the young lady had reached the little shelter and stood waiting for them. She was an extremely pretty young lady, with a great mass of dark hair held together in the back by a huge bow, and she had a very snub nose and a way of puckering her brows into a kind of whimsical frown. A number of rebellious locks hung about her forehead, shaken loose by the habit she had of giving all her adjectives a racking emphasis, thus causing her head to be in a state of almost continual agitation. She wore a white sailor blouse, with blue trimming and a blue anchor worked in front. Also a blue braided cord with a tiny round mirror on the end, used in capturing and confining the loose locks after a particularly emphatic tirade. The other extremity of Miss Antoinette was on the whole more demure and reposeful, her small feet being encased in bewitching little pumps, which were hardly worth while at all since they were almost completely obscured by enormous silk bows. It took Gordon about one minute to forget his anxiety to keep secret the object of their wanderings, and presently Miss Antoinette was apprised of their intention of ascending Bulwagga that very day. She said it was all wonderful.
  • 76. Welcome to Our Bookstore - The Ultimate Destination for Book Lovers Are you passionate about books and eager to explore new worlds of knowledge? At our website, we offer a vast collection of books that cater to every interest and age group. From classic literature to specialized publications, self-help books, and children’s stories, we have it all! Each book is a gateway to new adventures, helping you expand your knowledge and nourish your soul Experience Convenient and Enjoyable Book Shopping Our website is more than just an online bookstore—it’s a bridge connecting readers to the timeless values of culture and wisdom. With a sleek and user-friendly interface and a smart search system, you can find your favorite books quickly and easily. Enjoy special promotions, fast home delivery, and a seamless shopping experience that saves you time and enhances your love for reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookgate.com