Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Microsoft Share Point Building Office 2003 Solutions 2nd Edition
PREMIUM
Số trang
417
Kích thước
3.8 MB
Định dạng
PDF
Lượt xem
1113

Microsoft Share Point Building Office 2003 Solutions 2nd Edition

Nội dung xem thử

Mô tả chi tiết

Scot P. Hillier

Microsoft SharePoint

Building Office 2003 Solutions,

Second Edition

5750_FM_final.qxd 11/3/05 9:29 PM Page i

Microsoft SharePoint: Building Office 2003 Solutions, Second Edition

Copyright © 2006 by Scot P. Hillier

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,

electronic or mechanical, including photocopying, recording, or by any information storage or retrieval

system, without the prior written permission of the copyright owner and the publisher.

ISBN (pbk): 1-59059-575-0

Printed and bound in the United States of America 987654321

Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence

of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark

owner, with no intention of infringement of the trademark.

Lead Editor: Jim Sumser

Technical Reviewer: Judith M. Myerson

Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore,

Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser

Project Manager: Kylie Johnston

Copy Edit Manager: Nicole LeClerc

Copy Editors: Rebecca Rider, Nicole LeClerc

Assistant Production Director: Kari Brooks-Copony

Production Editor: Laura Cheu

Compositor: Linda Weidemann, Wolf Creek Press

Proofreader: Lori Bring

Indexer: Tim Tate

Artist: Kinetic Publishing Services, LLC

Cover Designer: Kurt Krames

Manufacturing Director: Tom Debolski

Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,

New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or

visit http://www.springeronline.com.

For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,

CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com.

The information in this book is distributed on an “as is” basis, without warranty. Although every precaution

has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to

any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly

by the information contained in this work.

The source code for this book is available to readers at http://www.apress.com in the Source Code section.

5750_FM_final.qxd 11/3/05 9:29 PM Page ii

Contents at a Glance

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

■CHAPTER 1 SharePoint Business Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

■CHAPTER 2 SharePoint Products and Technologies Overview . . . . . . . . . . . . . . . 17

■CHAPTER 3 SharePoint Portal Server Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

■CHAPTER 4 SharePoint Content Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

■CHAPTER 5 Building Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

■CHAPTER 6 The Microsoft Single Sign-On Service . . . . . . . . . . . . . . . . . . . . . . . . . 161

■CHAPTER 7 Advanced Web Part Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

■CHAPTER 8 The Microsoft Office System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

■CHAPTER 9 Programming SharePoint Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

■CHAPTER 10 Visual Studio 2005 and the Microsoft Office System . . . . . . . . . . . 327

■CHAPTER 11 SharePoint Portal Server Administration . . . . . . . . . . . . . . . . . . . . . . . 357

■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

iii

5750_FM_final.qxd 11/3/05 9:29 PM Page iii

5750_FM_final.qxd 11/3/05 9:29 PM Page iv

Contents

About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

■CHAPTER 1 SharePoint Business Solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Segmenting Information Workers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Transactors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Professionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Executives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Information Worker Challenges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

System Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

The Information Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

The Process Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

The Collaboration Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

The Access Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

The Management Challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Understanding Business Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Augmenting Personal Productivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Increasing Team Productivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Supporting Remote Workers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Integrating with Partners and Customers . . . . . . . . . . . . . . . . . . . . . . 10

Analysis and Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Documenting the Business Vision. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Documenting Policies and Practices . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Managing Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Technical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Server Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Client Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

v

5750_FM_final.qxd 11/3/05 9:29 PM Page v

■CHAPTER 2 SharePoint Products and Technologies Overview . . . . . . . . 17

The Microsoft Office System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

SharePoint and the Office System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Windows SharePoint Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

SharePoint Portal Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Office 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Installation Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Stand-Alone Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Small Server Farm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Medium Server Farm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Large Server Farm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Exercise 2-1: Creating a Development Environment. . . . . . . . . . . . . . . . . . 29

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Installing Windows Server 2003 on SPSController. . . . . . . . . . . . . . . 30

Configuring Remote Desktop Administration on SPSController. . . . 35

Installing Windows Server 2003 on SPSPortal . . . . . . . . . . . . . . . . . . 36

Installing SQL Server 2000 on SPSPortal . . . . . . . . . . . . . . . . . . . . . . 38

Installing SPS on SPSPortal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Installing Visual Studio .NET 2003 on SPSPortal . . . . . . . . . . . . . . . . 45

Preparing SPSClient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

■CHAPTER 3 SharePoint Portal Server Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Understanding Portal Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Topics and Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

WSS Team Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Self-Service Site Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Managing Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Understanding Site Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Adding Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Active Directory Account Creation Mode . . . . . . . . . . . . . . . . . . . . . . . 58

Understanding User Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Document Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Backward-Compatible Document Libraries . . . . . . . . . . . . . . . . . . . . 64

Form Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Image Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

vi ■CONTENTS

5750_FM_final.qxd 11/3/05 9:29 PM Page vi

Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Announcements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Surveys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Exercise 3-1: SPS Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Cleanup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Designing the Area Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Adding Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Creating the Site Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Migrating Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

■CHAPTER 4 SharePoint Content Development. . . . . . . . . . . . . . . . . . . . . . . . . . 85

Customizing Portal Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Site Membership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Audiences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Understanding Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Personalization with My Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Using My Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Customizing My Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Customizing with Microsoft FrontPage. . . . . . . . . . . . . . . . . . . . . . . . 100

Designing a New Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Working with Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

Working with Data Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Creating and Consuming a Web Service in FrontPage . . . . . . . . . . 107

Using Web Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Understanding Ghosted Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Exercise 4-1: Building an Executive Dashboard. . . . . . . . . . . . . . . . . . . . . 110

Preparing Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Building the Team Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

■CONTENTS vii

5750_FM_final.qxd 11/3/05 9:29 PM Page vii

■CHAPTER 5 Building Web Parts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Web Part Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

The WebPart Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

The Web Part Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Web Part Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Rendering Web Parts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Deploying Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Understanding Strong Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Building the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Code Access Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Deployment Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

Using Web Part Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Adding Web Parts to a Page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Debugging Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Exercise 5-1: Building a Simple Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . 144

Creating the New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Modifying the Web Part Description File . . . . . . . . . . . . . . . . . . . . . . 145

Coding the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Deploying the Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Exercise 5-2: Adding Child Controls to Web Parts . . . . . . . . . . . . . . . . . . . 150

Creating the New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Modifying the Web Part Description File . . . . . . . . . . . . . . . . . . . . . . 150

Coding the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Deploying the Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

■CHAPTER 6 The Microsoft Single Sign-On Service . . . . . . . . . . . . . . . . . . . . 161

Setting Up SSO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Setting the Security Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Using SSO in a Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Programmatic Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

Viewing the Audit Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Exercise 6-1: Using Single Sign-On . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Creating the Application Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Entering the Credentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Creating the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Deploying the Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Assigning Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

viii ■CONTENTS

5750_FM_final.qxd 11/3/05 9:29 PM Page viii

■CHAPTER 7 Advanced Web Part Development. . . . . . . . . . . . . . . . . . . . . . . . . 187

Client-Side Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

Using ActiveX Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

Using Script Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

Building Connectable Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

Connection Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Connection Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Using Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

Custom Tool Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

Default Tool Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Creating a Tool Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Exercise 7-1: Using Terminal Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Setting Up Terminal Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Creating the New Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

Creating the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

Deploying the Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

Exercise 7-2: Connectable Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Implementing the Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Defining the Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Creating the Child Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

Coding the Web Part Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

Using the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

Exercise 7-3: Custom Tool Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Building the Basic Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

The Custom Tool Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

Using the Tool Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

■CHAPTER 8 The Microsoft Office System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

Office Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

Document Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

Document Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Meeting Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

Contacts and Calendars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

Linked Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

Developing Office Solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

XML Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Smart Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Research Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

■CONTENTS ix

5750_FM_final.qxd 11/3/05 9:29 PM Page ix

Exercise 8-1: Building a Smart Document . . . . . . . . . . . . . . . . . . . . . . . . . 255

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Setting Up the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Creating the XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

Creating the Control Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

Deploying the Smart Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

Exercise 8-2: Building a Research Service . . . . . . . . . . . . . . . . . . . . . . . . . 269

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Starting the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Creating the Registration Response . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Creating the Query Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

Using the Custom Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

■CHAPTER 9 Programming SharePoint Services . . . . . . . . . . . . . . . . . . . . . . . 277

Document Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

Capturing Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

Manipulating Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

Accessing Portal Site and User Information . . . . . . . . . . . . . . . . . . . . . . . . 287

Accessing Site Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

Accessing Lists and List Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

Accessing User Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

Understanding Data Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

Using SharePoint Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

Exercise 9-1: Creating a Workflow Engine . . . . . . . . . . . . . . . . . . . . . . . . . 294

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

Building the Workflow Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296

Debugging the Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

Exercise 9-2: Building a Site Collection Web Part . . . . . . . . . . . . . . . . . . . 303

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303

Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

Defining the Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

Creating the Child Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

Creating the Helper Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

Rendering the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

Using the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

x ■CONTENTS

5750_FM_final.qxd 11/3/05 9:29 PM Page x

Exercise 9-3: Building a Global Task Web Part . . . . . . . . . . . . . . . . . . . . . . 313

Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

Creating the Child Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

Changing the Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Rendering the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Using the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Exercise 9-4: Building an Identity Web Part . . . . . . . . . . . . . . . . . . . . . . . . 322

Creating the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

Creating the Child Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

Rendering the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

Updating the User Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

Using the Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

■CHAPTER 10 Visual Studio 2005 and the Microsoft Office System . . . . 327

The ASP.NET 2.0 Web Parts Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

Understanding the Web Parts Control Set . . . . . . . . . . . . . . . . . . . . . 328

Building Custom Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

Using Web Parts in a Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

Personalizing Web Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

Using Visual Studio Tools for Office . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

Understanding Project Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

Adding Smart Tags to Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

Exercise 10-1: Building a Web Part Page . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Creating the New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Adding Site Membership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Creating the Logo Web Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

Creating the Text Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

Creating the Link Web Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

Creating the Business Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

Testing the Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

Exercise 10-2: Building a Smart Document . . . . . . . . . . . . . . . . . . . . . . . . 349

Setting Up the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

Creating the XML Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

Creating the Invoice Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

Coding the Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

Testing the Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

■CONTENTS xi

5750_FM_final.qxd 11/3/05 9:29 PM Page xi

■CHAPTER 11 SharePoint Portal Server Administration . . . . . . . . . . . . . . . . . 357

Back Up and Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

Site Usage Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

Cleaning Up Unused Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

Managing the Search Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

Defining External Content Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

Scheduling Content Crawls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

Creating Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

Enabling Online Presence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365

Managing Quotas and Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366

Exercise 11-1: Establishing Secure Access . . . . . . . . . . . . . . . . . . . . . . . . 367

Creating an Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Enabling Secure Sockets Layer (SSL) . . . . . . . . . . . . . . . . . . . . . . . . 369

■INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

xii ■CONTENTS

5750_FM_final.qxd 11/3/05 9:29 PM Page xii

About the Author

■SCOT P. HILLIER is an independent consultant focused on SharePoint, the Microsoft Office Sys￾tem, and .NET technologies. Scot is the author of eight books on Microsoft technologies

written over the last ten years as well as numerous articles appearing in magazines and online.

In addition to writing, Scot can often be found presenting nationally to analysts, decision mak￾ers, and developers. Scot is a former U. S. Navy submarine officer and graduate of the Virginia

Military Institute. When not working, Scot can be found at home with his family, playing games

and taking walks. Scot can be reached at [email protected] and support for his books may

be found at www.sharepointstuff.com.

xiii

5750_FM_final.qxd 11/3/05 9:29 PM Page xiii

5750_FM_final.qxd 11/3/05 9:29 PM Page xiv

Tải ngay đi em, còn do dự, trời tối mất!