1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Professional Active Server Pages 3.0 Richard Anderson, Chris Blexrud, Andrea Chiarelli, Daniel ppt

1,3K 329 2

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Professional Active Server Pages 3.0
Tác giả Richard Anderson, Chris Blexrud, Andrea Chiarelli, Daniel Denault, Alex Homer, Dino Esposito, Brian Francis, Matthew Gibbs, Bill Kropog, Craig McQueen, George Reilly, Simon Robinson, John Schenken, Dean Sonderegger, Dave Sussman
Trường học Wrox Press Ltd.
Chuyên ngành Active Server Pages
Thể loại Sách hướng dẫn
Năm xuất bản 1999
Thành phố Birmingham
Định dạng
Số trang 1.268
Dung lượng 25,91 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

This book is about Active Server Pages 3.0, as included with Windows 2000.. Introduction In particular this involves the Windows operating system itself, including the new security featu

Trang 1

Professional Active Server

Pages 3.0

Richard Anderson, Chris Blexrud, Andrea Chiarelli, Daniel Denault, Alex Homer, Dino Esposito, Brian Francis, Matthew Gibbs, Bill Kropog, Craig McQueen, George Reilly, Simon Robinson, John Schenken, Dean Sonderegger,

Dave Sussman

Wrox Press Ltd 

FLY

Trang 2

Professional Active Server Pages 3.0

© 1999 Wrox Press

All rights reserved No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief

quotations embodied in critical articles or reviews

The author and publisher have made every effort in the preparation of this book to ensure the accuracy of the information However, the information contained in this book is sold without warranty, either express or implied Neither the authors, Wrox Press nor its dealers or distributors will be held liable for any damages

caused or alleged to be caused either directly or indirectly by this book

Published by Wrox Press Ltd Arden House, 1102 Warwick Rd, Birmingham, B27 6BH

Printed in USA ISBN 1-861002-6-10

Trang 3

Authors Project Manager

Richard Anderson Sophie Edwards Chris Blexrud

Andrea Chiarelli Technical Reviewers

Daniel Denault Matt Bullock

Alex Homer Chad DePue

Dino Esposito Andrew Enfield

Brian Francis Alexander Haneng Matthew Gibbs Robert Howard Bill Kropog Shawn Jackson Craig McQueen Jeff Johnson George Reilly Stephen Kaufman Simon Robinson Brad Kingsley John Schenken Ajoy Krishnamoorthy Dean Sonderegger Dave Navarro Dave Sussman Robert Oliver

Matthew Reynolds

Additional Material Ulrich Schwanitz

Matthew Bortniker Steven Smith

Charles Campbell Kevin Spencer

James M Conard Andrew Stopford

Richard Harrison William Storey

Keith Stanislaw Adwait Ullal

Kent Tegels

Design/Layout Managing Editor Tom Bartlett

Chris Hindley Mark Burdett

William Fallon

Editors Jonathan Jones

Craig A Berry John McNulty Dan Maharry

Lisa Stephenson Illustrations

Adrian Young William Fallon Jonathan Jones

Trang 4

is responsible for mentoring and managing C++ and VB developers Richard can be contacted via his private email account rja@arpsolutions.demon.co.uk

Andrea Chiarelli

Andrea Chiarelli is an independent consultant with experience in software design and training He holds a degree in Computer Science and a Master in Software Engineering, works for software companies and training centers in Tuscany (Italy) and is a regular contributor to Computer Programming, an Italian programming magazine His experience spans from database design to multimedia software developing In recent years he's specialized in designing Internet and Intranet systems developing Web-based applications and interfacing databases to the Web primarily using Active Server Pages technology

Trang 5

Brian Francis

Brian Francis is the Technical Evangelist for NCR's Retail Self Service Solutions From his office in Duluth, Georgia, Brian is responsible for enlightening NCR and their customers in the technologies and tools used for Self Service Applications Brian also uses the tools he evangelizes in developing solutions for NCR's customers He has worked extensively with Wrox Press as a technical reviewer and has also co-authored on a number of projects

Matthew Gibbs

Matthew is currently working on Internet technologies at Microsoft and pursuing a graduate degree in computer science from the University of Washington As always, he enjoys using C/C++, but has become a fan of the rapid development capabilities provided by ASP At present, his studies are focused on database management systems, their design and use In particular, he is interested in the potential for advancement

in data mining techniques and technologies

Alex Homer

Alex came to writing computer books through an unusual route, including tractor driver, warehouse manager, garden products buyer, glue sales specialist, and double-glazing salesman With this wide-ranging commercial and practical background, and a love of anything that could be taken to pieces, computers were

a natural progression Now, when not writing books for Wrox, he spends his spare time sticking together bits of code for his wife's software company (Stonebroom Software - http://www.stonebroom.com)

or just looking out of the window at the delightfully idyllic and rural surroundings of the Peak District in Derbyshire, England

Craig McQueen

Craig is a Principal Consultant at Sage Information Consultants, Inc His role at Sage is to guide clients in their adoption of Internet technologies into their existing business Recently, he led an e-commerce implementation of Site Server at a major consumer electronics company Previous to consulting, Craig led the development of two small retail Internet products: InContext WebAnalyzer and InContent FlashSite Craig has a Master of Science degree from the University of Toronto where he specialized in Human-Computer Interaction

George Reilly

George V Reilly has been a member of the IIS/ASP development team since shortly before ASP 1.0 shipped at the end of 1996 Nowadays he is responsible for IIS performance He has been doing his best to write tight code since he discovered the BBC Micro in his native Dublin, Ireland in 1982 In retrospect, he has a hard time believing that he found enough time to co-write "Beginning ATL COM Programming", Wrox Press, 1998

Trang 6

serious programming when doing his PhD in physics He would program in FORTRAN when his supervisor was watching (physics lecturers like FORTRAN) and C when he wasn't The experience of programming was enough to put him off computers for life, and he tried to pursue a career as a sports massage therapist instead until he realized how much money was in programming and wasn't in sports massage He then spent

a year writing some very good cardiac risk assessment software but he and his business partner never got round to selling it to anyone Finally, driven by a strange lack of money, he looked for a—whisper the word quietly—job Which somehow ended up—after a year of his working for Lucent Technologies in Welwyn Garden City—leading to him writing books about computers You can visit Simon's web site at

http://www.simonrobinson.com/

John Schenken

John Schenken is currently Software Test Lead on the Visual Basic Server Enterprise Team for Microsoft

He was previously Test Lead for the Microsoft Script Debugger that shipped with Windows NT Option pack and is still responsible for it in Windows 2000 He has a computer science degree from Texas A & M university He has programming experience involving MSMQ, SMTP, NT Event Log, NT Perf Counters, ASP, business objects and ADO (basically wide experience writing end-to-end web applications involving business objects)

Dean Sonderegger

Dean is responsible for the technology and development of products at Ultraprise Corporation based in Sterling, Virginia He's worked with Active Server Pages since its inception and specializes in internet-based commercial application development The majority of his spare time is spent chasing his two sons Crawford and Jordan, or with his lovely wife Karen

David Sussman

David has spent most of his professional life as a developer, starting with Unix and C, in the days when the Internet was only used for Usenet newsgroups He then switched to Microsoft development languages, and spent several years moaning about the lack of pointers in Visual Basic Like Alex, he lives in a quiet, rural village, this time in Oxfordshire He spends his spare time convincing himself that he'll get off his backside and get fit He never does

Trang 8

One of our colleagues firmly believes that the introduction of Microsoft's

Active Server Pages (ASP) technology, or Denali as it was called then, was one such important event He backs this up by remembering exactly what he was doing at the time He'd just finished work on a book about Web database

connectivity techniques, ending with the jewel-in-the-crown at that time —the Internet Database Connector (IDC) The rapid addition of an extra chapter

before going to press, to cover this exciting new ASP technology, was the order of the day In fact that single chapter was probably the reason for most of the book's sales, because suddenly every developer wanted to be

What Is This Book About?

This book is about Active Server Pages 3.0, as included with Windows 2000

However, because ASP is now a core part of so many Web-oriented features within Windows, this book covers a far wider area than just how ASP works ASP is maturing all the time to encompass more integration with other

Trang 9

Introduction

In particular this involves the Windows operating system itself, including the new security features of Windows 2000, and the Internet server

software that comes with Windows 2000 – Internet Information Server (IIS)

On top of this are the other less obvious services, which also have a direct or indirect effect on the way that ASP works These include COM+, the various Internet service administration tools, and – indirectly – the many other services and installed software packages that either provide additional functionality to ASP, or which have interfaces that are

available for use in ASP

In fact, this is really where ASP comes into its own, and why it has

become such an integral part of working with Windows on the Internet ASP introduced the concept of using ActiveX interfaces or discreet component objects (separate controls that provide a COM interface) within Web

scripts, rather than running external executable programs as had

previously been the norm in other Web scripting languages (such as Perl) This integration with COM and ActiveX means that ASP can effectively

access anything on the Web server, or a connected network, which provides

a suitable interface From this alone, a huge market has grown up for components and objects that implement or encapsulate specific functions More than that, almost all installed software and services in Windows either include a set of specific ActiveX components, or directly exposes a COM interface, to allow ASP to access it

So, as well as chapters all about the roots of ASP, the base object

structure, and how it's used, you'll also see chapters that demonstrate the many different ways that ASP integrates seamlessly with other software and services in Windows One of the most obvious of these is access to data in a relational database or other type of data store (such as Active Directory), and you'll see several chapters devoted to these topics

We'll also explore the intimate relationship between Internet Information Server and COM and the new COM+, and see how ASP has changed the way that

it hosts and executes external components to provide better performance and scalability This also affects the way that components are designed and built, and we'll be exploring this topic in some depth as well

Who Is This Book For?

When Active Server Pages was first introduced, we produced a book covering that initial version from the point of view of a beginner to the

technology Fair enough, because at that point everyone was a beginner However, the runaway success of ASP means that this is no longer the case There are many millions of knowledgeable and active ASP developers out there who want hard-core technical coverage of ASP in its new version Then, when version 2.0 of ASP was released, we produced a separate

beginner's guide, and this is also the case with version 3.0 This book is

the professional-level version, and is aimed at two categories of

developers Firstly, it is designed to satisfy the needs of those who are already well practiced in the skills of ASP and server-side Web

application development Secondly, it will be a useful and fast-track guide to those who are less familiar with ASP, but have a server-side Web application development background – perhaps in the use of Perl, IDC, etc For newcomers to Web applications and dynamic Web page creation, we

recommend you look at Beginning Active Server Pages 3.0 (ISBN 1-861003-38-2) first

Trang 10

Version 3.0 of ASP in itself is not an earth-shattering upgrade In fact, ASP is reaching the point where there isn't much more that can be done with it However, the wish lists of most developers should be fulfilled with the new version There are many subtle changes to the way that it works, in the scripting engines that are included, in the Web server (IIS) itself and in the administration tools There are also some fundamental changes in the IIS/COM(+) relationship, which it's important that you grasp If you didn't really do much with COM and MTS in version 2.0 of ASP (a lot of people managed to ignore them), then now is the time to get to grips with them and start building pages and components to integrate with

it

What Does This Book Cover?

Conceptually, this book is divided into several sections This allows us

to cover widely differing ASP-related topics in an orderly sequence, and helps you to grasp the basics of the way that ASP works before going on to learn about higher-level features that depend on these core topics

‰ Section 1 is all about ASP Basics It describes the changes to ASP in

version 3.0, the ASP Object Model, and all the basic concepts required for using ASP script and external components

‰ Section 2 covers ActiveX Data Objects (ADO) and data access issues in general – including XML ADO is now the standard communication technology for all Microsoft applications, and its use is almost uncontested in ASP

‰ Section 3 introduces the issues involved in building components for use with ASP, and understanding how COM and COM+ change the component

environment

‰ Section 4 is all about integrating ASP with BackOffice applications such as

Microsoft Message Queue Server, Collaborative Data Objects and

Microsoft Exchange, Active Directory, etc

‰ Section 5 moves on to look at how ASP is used in the enterprise It examines issues of security, performance, scalability, etc

‰ Section 6 contains a great deal of useful reference material in the form of

appendices and tables

You don't have to read the whole book from cover to cover, or in any

particular order However, if you are coming to ASP from another Web

development environment, you will certainly want to cover sections one and two in some depth to get a firm grasp on the fundamentals and see how they relate to other Web-development development languages and techniques

On the other hand, those battle-hardened ASP veterans amongst you may prefer to look through Chapter 1 to see what's new and what's changed in version 3.0, before skipping from chapter to chapter to see how these changes affect you Of course, if you prefer to lay in the bath and read

it from cover to cover, then please don't let us stop you But I bet your arms soon get tired

What Do I Need To Use This Book?

Trang 12

Hardware

A machine with Windows 2000 installed to act as a Web server Preferably this should be Windows 2000 Server or better However, Internet Information Server and most of the associated services (with some exceptions) are included with Windows 2000 Professional (which replaces Windows NT Workstation) For Windows 2000 Server, you should aim for a machine with at least a 233MHz processor, and at least 128MB of RAM (256MB is better) For Windows 2000 Professional, you can get away with 64MB of RAM, though 128MB makes it smoother and more relaxing to use

A client machine connected to the Windows 2000 machine via TCP/IP While you can develop directly on the Web server, it's usually better to use a separate client machine All you need is something capable of running a Web browser The browser we are using predominantly is Internet Explorer 5.0 (IE5), though you can use another if you prefer However, some examples that take

advantage of IE5-specific features will probably fail to work on other browsers The network between the machines should include TCP/IP amongst the active protocols In fact, you only need TCP/IP — t he rest can be

disabled or uninstalled when working with ASP

If you are working on a corporate network, be sure to check with your system

administrator before changing the network protocol installation or setup

Non-Microsoft Platforms

As Active Server Pages has gained popularity within the Web-development community, the limitation of running only on a Windows platform has been seen as a problem Two companies have moved to spread the coverage of ASP

on other platforms and operating systems:

‰ The best known of these is Chili!ASP (http://www.chilisoft.com) which is functionally equivalent to ASP It utilizes the same development tools and functionality as ASP but runs on Netscape, Lotus Go, as well as NT 4.0-based Web servers

‰ The second ASP look-alike is Halcyon Software's Instant ASP

(http://www.halcyonsoft.com), which runs on a whole range of Web

server, application server, and operating system platforms This

includes Windows NT, Sun, Novell, AIX, AS/400, S/390, Apple, OS/2, Linux, Apache, Netscape, Websphere, and more

We aren't covering these environments directly in this book, as we are concentrating on ASP 3.0 running on Internet Information Server version 5 and Windows 2000 Server However, the knowledge you gain will apply to the other ASP-like environments as well, though you will need to confirm the actual range of coverage and compatibility on your chosen platform and operating system from the relevant supplier

Trang 13

Introduction

Software

Almost all of the

software you'll need is

included in a full

installation of Windows

2000 Server After the

main OS installation has

completed, and you reboot

the server, Internet

Explorer fires up with a

page entitled Windows 2000

Configure Your Server:

You can use this page to install the extra services and applications that you want to run on the server You'll need to select the Advanced option and then Optional Components in the left-hand menu, then Start the Windows

Components Wizard in the right-hand window to install IIS and the other Web-related software such as the Indexing Services, Clustering Services, Message Queuing Services, etc If you want to install Active Directory, you must also first install and set up DNS from this page, then select the

Active Directory option There are Wizards that will step you through each of the processes, and they generally make the whole task very simple

There are other items of software that you may like to install as you use this book There are several server components that we include with the sample files, or which we provide links to so that you can download them from the original source The sample files you'll see used in this book can all be downloaded from our own Web sites at:

http://webdev.wrox.co.uk/books/2610

http://www.wrox.com/Store/Details.asp?Code=2610

Development Tools

Probably the most obvious development tool for working with ASP is

Microsoft's own Visual Studio package; or just Visual InterDev (one of the

components of Visual Studio) on its own Visual InterDev, especially in the latest version, provides a whole range of editing, debugging and code building tools There are also many Wizards to help you get the job done more quickly

As well as Visual InterDev, Visual Studio contains Visual Basic and Visual C++, both of which are ideal for building your own Active Server

Components for use in your Web applications You can also build Active Server Components using any other COM-enabled language such as other C++ development environments, Delphi, J++, PowerBuilder, etc

Other companies also provide tools to build ASP pages and complete Web applications, including Drumbeat (http://www.elementalsw.com), Fusion 3.0 (http://www.netobjects.com), HAHTSite (http://www.haht.com), Cold Fusion

Trang 14

If you are a hardened keyboard hacker, and don't like anything to get in the way of writing code your way, you might prefer to use a simple text editor to create ASP pages instead You can even build them using a pure HTML page creation tool (such as Microsoft FrontPage), and then insert your ASP script afterwards The old favorite ASP tool, Windows NotePad, will do quite nicely, though something that includes line numbers (to help

in locating errors) is more useful We've been using TextPad©

(http://www.textpad.com) for some time, and find it a great improvement over NotePad Not only do you get a multiple document interface with line numbers and macros, but many other useful options and add-ins as well There are other tools and add-ins that we use for specific tasks,

particularly load testing and performance measurement, and you'll find these described in several places throughout the book For a useful list

of the various tools that are available, take a look at the Tools page at the 15 Seconds Web site (http://www.15seconds.com/tool/default.htm)

Conventions

We use a number of different styles of text and layout in the book to help differentiate between the different kinds of information Here are

examples of the styles we use and an explanation of what they mean

Bullets appear indented, with each new bullet marked as follows:

Important Words are in a bold type font

❑ Words that appear on the screen, such as menu options, are in a similar font to the one used on screen, for example the File | New menu The levels of a cascading menu are separated by a pipe character (|)

Keys that you press on the keyboard, like Ctrl and Enter, are in italics

Code has several styles If it's a word that we're talking about in the text, such as a For Next loop or a file name like Default.asp, we'll use this font If it's a block of code that is new, important or relevant to the current discussion, it will be presented like this:

Response.Write "Professional ASP 3.0"

Response.Write " enjoy the book"

%>

The code with a white background is code we've already looked at, or that has little to do with the matter at hand

Advice, hints, background information, references and extra

details appear in an italicized, indented font like this

Trang 15

Introduction

These boxes hold important, not-to-be forgotten, mission-critical details that are

directly relevant to the surrounding text

Tell Us What You Think

We've tried to make this book as accurate and enjoyable as possible, but what really matters is what the book actually does for you Please let us know your views, either by returning the reply card in the back of the book, or by contacting us via e-mail at feedback@wrox.com

All the source code for all the examples in this book is available for download at the Wrox Press Web site at www.wrox.com or at

webdev.wrox.co.uk You'll find more information about COM at a related Web site, www.comdeveloper.com

We've made every effort to make sure that there are no errors in the text

or the code However, to err is human and as such we recognize the need to keep you informed of any mistakes as they're spotted and corrected Errata sheets are available for all our books at www.wrox.com If you find an error that hasn't already been reported, please let us know

Our Web site acts as a focus for other information and support, including the code from all our books, sample chapters, previews of forthcoming titles, and articles and opinion on related topics

Customer Support

This book introduces a totally comprehensive and unique support system Wrox now has a commitment to supporting you not just while you read the book, but once you start developing applications as well We provide you with a forum where you can put your questions to the authors, reviewers and fellow industry professionals You have the choice of how to receive this information; you can either enroll onto one of several mailing lists,

or you can just browse the online forums and newsgroups for an answer

Go to p2p.wrox.com You'll find three different lists, each tailored to a specific support issue:

‰ Errata

You find something wrong with the book, or you just think something has been badly or misleading explained then leave your message here You'll still receive our customary quick reply, but you'll also have the

advantage that every author will be able to see your problem at once and help deal with it

‰ Code Clinic

You've read the book, and you're sat at home or work developing your own application, it doesn't work in the way you think it should Post your code here for advice and supports from our authors and from people

in the same position as yourself

‰ How to?

Something you think the book should have talked about, something you'd just like to know more about, a completely baffling problem with no solution, then this is your forum If you're developing an application

at work then chances are there's someone out there who's already done the same as you, and has a solution to your problem here

Trang 16

Enroll now; it's all part of our free support system For more

instructions on how to enroll, please see the Appendix H at the back of this book

Trang 17

Table of Contents

Introduction 1

The Beginnings of HTML 10 The Beginnings of Dynamic Pages 11

All About Application Mappings 15 Processing an ASP File 17

Installing Internet Information Services 23

IIS Management Tools 26

Common Management Tasks 28

The Concept of Object Context 33

The Intrinsic ASP Objects 34

ASP 3.0 New Features Summary 36

Trang 18

What's New in VBScript 5.0 40

What's New In JScript 5.0 43

Summary 45

The Page Request Conversation 48

The ASP Request Object Members Summary 51

The ASP Response Object Members Summary 52

General Techniques for Accessing ASP Collections 55

Accessing and Updating the Cookies Collections 63

The Difference Between Forms and QueryStrings 65

Viewing the Contents of Requests and Responses 66

Self-Referencing Pages 74 Detecting the Browser Version 75 Detecting the Browser Language 76 Other Useful ServerVariables Values 77

Trang 19

Table of Contents

Managing Connections, Buffering and Redirection 78

Manipulating the HTTP Headers 81

Working with Client Certificates 87

Reading and Writing Binary Data 89 Creating Custom Log Messages 89

Summary 91

So What Exactly is State? 94 Why is State So Important? 94 How we Create State on the Web 95

What are ASP Applications? 97

What are ASP Sessions? 106

The ASP Application Object Members Summary 110

The ASP Session Object Members Summary 111

Using Application and Session Events 113

The ASP Application Object in Action 117

The ASP Session Object in Action 123

Summary 127

Trang 20

Chapter 4: Server Processes and the ASP Server Object129

The Internet Server Application Programming Interface 130

The Mysterious ASP #include Directive 132

Server Side Include Directives Summary 135

An Example of Server-Side Includes In Action 138

ASP Server Object Members Summary 143

Creating Instances of Other Objects 145

Executing Other Pages 149

Error Handling with the Server Object 155

Getting Path Information with the Server Object 162

Formatting Data with the Server Object 164

Summary 170

Chapter 5: The Scripting Runtime Library Objects 173

Different Types of Objects and Components 174 The VBScript and JScript Scripting Objects 175

Using the Server.CreateObject Method 176 Using the <OBJECT> Element 176

The Difference Between Server.CreateObject and <OBJECT> 178 Component Threading Model Issues 179 Referencing Object Type Libraries 180

Trang 21

Table of Contents

Creating Object Instances on the Client 181

Creating and Using Dictionary Objects 183

A Dictionary Object Example 186

The FileSystemObject Object Members Summary 192

Working with Drives 196

Methods for Creating TextStream Objects 209

The TextStream Object Members Summary 211

A TextStream Object Example 214

Summary 217

Using Server Components 222

Using the Sample Pages 225 The Content Linking Component 226

The Ad Rotator Component 231

FLY

Trang 22

The Redirection File 234

The Counters Component 236

The Browser Capabilities Component 239

The Content Rotator Component 244

The Page Counter Component 246

The Permission Checker Component 248

The MyInfo Component 251

The Tools Component 253

The Logging Utility Component 259

The BrowserHawk Component 264 The SA-FileUp Component 265

The RegEx Registry Access Component 266

Summary 268

Syntax or 'Compilation' Errors 272

Semantic or 'Runtime' Errors 277

Script Runtime Errors 283

Trang 23

Table of Contents

ASP and Server Side Include (SSI) Runtime Errors 284

Client-side Script Errors 286

Good Coding Practice 289

The ASP Default Error Handler 294 VBScript Error Handling 295

JScript Error Handling 298 Using IIS Error Pages 298

Custom Debugging Techniques 305

Microsoft Script Debugger 306

Getting Help and Support for ASP 310

The Connection Object 318 The Command Object 319 The Recordset Object 319

Collections 321

Trang 24

Using Include Files 328 Using Connection State 329

Connection Examples 330 Connection Pooling 331

Filtering Recordsets 341

Searching For Records 343

Chapter 9: Connections, Commands And Procedures 353

Trang 25

Table of Contents

Using Data Shaping 380

A Server Based Component 416 The DataSpace Object 418

Advantages of Using Server Side Components 420 Registering Server Side Components 420 Customized Handlers 421

Using ASP Pages to Page Through Recordsets 426

Using SQL Server to Perform Recordset Paging 434

Trang 26

Data Paging Summary 438

Summary 440

How does XML differ from HTML? 445

ADO Recordsets Stored as XML 461 ADO Recordset Namespace 462 ADO Recordset Schema 462

IE Data Islands and Binding 466

Saving Recordsets as XML 471

Opening Recordsets 476

The Indexing Service 489

Trang 27

Table of Contents

SNA Server and Legacy Data Access 524

Windows DNA Services 533

Trang 28

User Interface Components 543

Moving to Components 544 Application Design 545 Designing Components for the Web 545

Tying the Components Together 550

Building your Components 551

Defining the Problem 553

Application Design 555

COM is All Around you 567 The Three Faces of COM(+) 567

COM Development Tools 570

Trang 29

The Finer Points of Interfaces 574

Using IDispatch – Late Binding 578

A Central Repository for Component Information 579

The Component's Interface 586 Creating the Component 586

Summary 596

Interception Basics 600

Component/Object Lifetimes and State 607

Threading Model and Scope 618

Trang 30

Scope Alternatives 622

The ObjectContext Interface 624

Visual Basic COM+ Components 626

Creating COM+ Applications 637

Summary 647

Historically Speaking… 651

The HelloWorld WSC 651

The Descriptive Tier 653

The AspTable Component 660

Using the AspTable Object 667

Choosing the Right Tool 669 Script Components vs VBScript Classes 670

Summary 670

Trang 31

When Not to Use C++ 676 Transferring ASP skills to C++ 676

Transactions with IObjectContext 714 Object Pooling with IObjectControl 715

Using ADO with C++ 716

OLE DB Consumer Templates 722

Which to Use: ADO or OLE DB Consumer Templates? 727

Summary 727

FLY

Trang 32

Chapter 19: ASP and Transacted Web Applications 729

Maintaining Application Integrity 730

The Two-Phase Commit with MS DTC 733

The Transaction Support Attribute 735

Activities and Synchronizaton 738

Transaction Lifetimes 741

Transactional Access to Custom Resources 750

Transactional Active Server Pages 751 The ObjectContext Object in Transactional ASP 752 Transaction Events 753

The Implementation 756

Did it Really Work? 764

Summary 765

Trang 33

The MSMQTransactionDispenser Objects 791 The MSMQCoordinatedTransactionDispenser Object 791

Messaging COM Objects 793

Adding MSMQ to the Component 797 Processing Queued Orders 799

Summary 802

Chapter 21: Introducing ADSI and Active Directory 805

Objects and Properties in Directories 808

Trang 34

Replication 815

Trang 35

Table of Contents

Netscape Directory Server 815

The Exchange Server Directory and Site Server Membership Directory 816 Netware Directory Services 816

ADSI Objects and Directory Objects 820 Seeing the Properties of ADSI Objects 820

Browsing a Directory: Enumerating Children of a Container 822

What is CDO for NTS? 848

Referencing Type Libraries 851 The NewMail Object 852

Other CDONTS Objects 861 The Session Object 862

Trang 36

Common Properties 864

Trang 37

Table of Contents

The Session Object – Summary 872

The Inbox Application 884

Summary 893

Common/Shared Objects 897

The Session Object 910

InfoStores 915 Messages 916

Overview 923 Server Configuration 923

Login.asp 925 FrameSet.asp 926 FolderList.asp 928 MessageList.asp 929 ViewMessage.asp 935 SendMessage.asp 939

Trang 38

SendMail.asp 942 Logout.asp 946

Windows 2000 Security Checklist 955

Firewalls and Proxy Servers 963

Authentication Methods 970

Implementing Closed User Groups / Membership 975

Summary 986

Trang 39

Table of Contents

Asymmetric Key Encryption 990

What is a Certificate? 993 Certificate Authorities 994 Types of Certificates 995

Getting a Server Certificate 997

Getting Personal Certificates 1001

Getting Software Publisher Certificates 1004

Using a Server Certificate 1005 Using a Personal Certificate 1006 Using a Software Publisher Certificate 1006 Client Certificate Mapping 1007 The Life of a Certificate 1010

The Certificate Store 1011 IIS Certificate Management 1013 Internet Explorer Certificate Management 1014 Outlook Express Certificate Management 1015

Certificate Services 1018 Setting up a Certificate Authority 1019 Administering a Certificate Authority 1020 Interacting with your Certificate Authority 1020

Trang 40

Performance Tuning 1030

Fixing Performance Problems 1030

Session and Application State 1033

Secure Sockets Layer 1037 Process Isolation 1037 Caching and Dictionaries 1038 Database Performance 1039 Real-Enough Time: MSMQ 1040 Script vs Components 1041

Summary 1057

Is a Server Farm the Right Solution? 1061 Server Farm Basics 1063

Administration 1065

Hardware Load Balancing 1066

Administration 1068 Limitations 1068

TCP/IP Network Load Balancing 1069

Administration 1070

Ngày đăng: 26/01/2014, 15:20

TỪ KHÓA LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm