[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
the] Microsoft Windows Server System Series are written and reviewed by the world's [Books TeaminLiB leading technical authorities on Microsoft Windows Technologies, including principal members of Microsoft's Windows and Server Development Teams. The goal of the series is to provide reliable information that enables administrators, developers, and IT professionals to architect, build, deploy, and manage solutions using the Microsoft Windows Server System. The contents and code of each book are tested against, and comply with, commercially available code. Books published as part of the Microsoft Windows Server System Series are an invaluable resource for any IT professional or student working in today's Windows environment. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Copyright
"This is onefor ofMicrosoft those rare books that you will read to learn about the product and keep Praise Content Management Server 2002 rereading to find those tidbits that you missed before." Preface —Gary Bushey, SharePoint Server MVP Acknowledgments
Content Management Server (CMS) is fast becoming a vital content-management tool that About the Authors and developers handle the ever-increasing amount of content on their helps administrators Part I. However, CMS Fundamentals Web sites. an authoritative source of product information has been missing . . . until Chapter 1. Introduction to Content Management Server now. The CMS Story: Why You'll Want to Implement CMS in Your Environment
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Features of Content Management Server how to effectively unlock the power of CMS. Administrators and developers alike will learn how Summary to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Chapter 2. Installing Microsoft Content Management Server
Elements to Consider before athe CMSproduct Installation This thorough reference explains architecture, then shows you how to create and Summary edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example used throughout the book to illustrate how important CMS features are Chapter 3. is CMS Architecture implemented in real-world The History of CMS Web site development. Inside you'll find answers to such questions as: CMS Architecture—Overview History of a CMS Page Request CMS 6: Architecture—Component Discussion Chapter How do you customize workflow? Managing and Rendering Content
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Authoring Content usingCMS Visual Studio .NET? Development CMS Administration
Chapter 17: How do you establish user rights? Summary
Chapter 22: How do you best deploy CMS according to your organization's needs, size, 4. Planning a Content Management Server Engagement andChapter resources? Envisioning the Project
Chapter 32: How do you publish dynamic data? Planning the Project
the Project [ Team LiBDeveloping ] Stabilizing the Project Sample Planning Document Outline Summary
Part II. Content Authoring and Publishing Chapter 5. The Web Author Overview Browser-Based Publishing CMS Page Modes Creating a New Page Adding Content
•
Saving the Page
Table of Contents
Setting Up Page Properties Microsoft Content Management Server 2002: A Complete Guide Editing the Page ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Copying, Moving, and Deleting Pages Production Manager Summary Publisher: Addison Wesley Pub Date: October 31, 2003 Chapter 6. Publishing Workflow ISBN: 0-321-19444-6
Overview Pages: 1136 Submitting the Page Page Status Editor's Approval
"This is one of thoseApproval rare books that you will read to learn about the product and keep Moderator's rereading to find those tidbits that you missed before." Auto-approval —Gary Bushey, SharePoint Server MVP Page Revisions Summary
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Chapter 7. Authoring Connector Web sites. However, an authoritative source of product information has been missing . . . until What Is the Authoring Connector? now. Authoring Connector Components
Microsoft Content Server 2002: A Complete Guide is the first book that explains Using the Management Authoring Connector how to effectively the power of CMS. Administrators and developers alike will learn how Setting Upunlock Publishing Tasks to enhanceSummary their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and Part III. Creating Site Framework edit content and use the workflow. Topic coverage includes CMS administration and security, ChapterAPI, 8. Creating a New CMS Site the Publishing deployment options, site configuration, and template development. A Overviewis used throughout the book to illustrate how important CMS features are running example implemented in real-world Web site Database development. Inside you'll find answers to such questions Creating and Configuring a New as: Creating a New Virtual Web Site Using the Database Configuration Application Configuring an IIS Site as a CMS-Enabled Site Chapter 6: How do you customize workflow? Adding Virtual Directories Manually
Chapter 10: How doSite youbydevelop Accessing the CMS a Root URLfor Microsoft Content Management Server (CMS) 2002 usingCreating Visual aStudio .NET? CMS Site with Shared Resources Summary
Chapter 17: How do you establish user rights? Chapter 9. Setting Up Site Structure Chapter 22: How do you best deploy CMS according to your organization's needs, size, Navigation and Channels and resources? Using the Site Manager
Chapter 32: How do you publish dynamic data? Summary
[ Team LiB ]
Chapter 10. Developing for CMS Using Visual Studio .NET Overview How Is a CMS Project Different from Regular Web Projects? Creating a New CMS Project Template Gallery Items Creating a TGI Adding Placeholder Definitions to Your TGI Adding Custom Properties Summary Chapter 11. Template-Based Page Processing Overview
•
Page Processing in Presentation Mode
Table of Contents
Page Processing in Authoring Mode Microsoft Content Management Server 2002: A Complete Guide Summary ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Chapter 12. Designing Templates Overview Publisher: Addison Wesley What Is a 31, Template? Pub Date: October 2003 Basic Template Types ISBN: 0-321-19444-6 Planning Pages: 1136 Your Templates Creating a Template File Debugging Your Templates Summary
"This is one of those rare books that you will read to learn about the product and keep rereadingChapter to find tidbits that you missed before." 13.those Working with Placeholders in Visual Studio .NET —Gary Bushey, SharePoint Server MVP Overview Placeholder Types
Content Management Server (CMS) is fast becoming a vital content-management tool that Effective Placeholder Use helps administrators and developers handle the ever-increasing amount of content on their Web sites.Summary However, an authoritative source of product information has been missing . . . until now. Chapter 14. Creating Dynamic Navigation
Microsoft Content Overview Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how What Is Navigation in CMS? to enhanceDesign theirConsiderations Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Creating Navigation Elements Summary This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, ChapterAPI, 15. Connected Postings the Publishing deployment options, site configuration, and template development. A Overviewis used throughout the book to illustrate how important CMS features are running example implemented real-world Web site development. Inside you'll find answers to such questions WhatinAre Connected Postings? as: Creating Connected Postings Workflow Implications of Connected Postings Summary Chapter 6: How do you customize workflow?
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Part IV.Visual Site Administration and Security using Studio .NET? Chapter 16. Working with Containers
Chapter 17: How do you establish user rights? Overview Working with Channels
Chapter 22: How do you best deploy CMS according to your organization's needs, size, Working with Template Galleries and resources? Working with Resource Galleries
Chapter 32: How do you publish dynamic data? Killing a Lock
Revisions [ Team LiBPurging ] Purging the CMS Database Summary Chapter 17. Setting Up User Rights User Roles Rights Groups Summary Chapter 18. Using the Server Configuration Application Launching the SCA General Settings Configuring Cache
•
Setting Up Web Entry Points
Table of Contents
Adding Domains Microsoft Content Management Server 2002: A Complete Guide Configuring Security Settings ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Summary Chapter 19. Wesley Managing User Access Publisher: Addison CMS Authentication Pub Date: October 31, 2003 and Authorization Process IIS Security ISBN: 0-321-19444-6 ASP.NET Pages: 1136 Security CMS Authentication and Authorization Summary Chapter 20. Securing a CMS Site "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits CMS Installation Security that you missed before." —Gary Bushey, SharePoint Server MVP Authentication and Authorization Intranet Sites
Content Management Server (CMS) is fast becoming a vital content-management tool that Internet Sites helps administrators and developers handle the ever-increasing amount of content on their Sites Web sites.Extranet However, an authoritative source of product information has been missing . . . until Summary now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how toPart effectively unlock the power of CMS. Administrators and developers alike will learn how V. Site Deployment to enhance their21.Web scalability, flexibility, and extensibility by using CMS features and Chapter Site servers' Deployment Manager API to manage content on the Microsoft platform. Overview Using Site Deployment Manager
This thorough reference explains the product architecture, then shows you how to create and Automating Package Processing edit content and use the workflow. Topic coverage includes CMS administration and security, Summary the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Chapter Deployment Scenarios implemented in 22. real-world Web site development. Inside you'll find answers to such questions as: Overview Environments and Deployment Deployment Scenarios
Chapter 6: How do you customize workflow? Deployment Guidelines
Summary Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Chapter 17: How do you establish user rights? Part VI. Publishing API Chapter 23. Introducing PAPI
Chapter 22: How do you best deploy CMS according to your organization's needs, size, Who Will Need PAPI and resources? .NET-Based versus COM-Based APIs
Context the Entry Pointpublish to PAPI dynamic data? Chapter 32:asHow do you Principal Objects
[ Team LiBPAPI ] Object Model Relationship between Principal Objects Base Classes Exploring Namespaces Summary Chapter 24. Obtaining Context CMS Context CmsHttpContext CmsApplicationContext Context Publishing Modes Summary
•
Chapter 25. Traversing Channels
Table of Contents
Checking Channel User Rights Microsoft Content Management Server 2002: A Complete Guide Creating and Deleting Objects in a Channel ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Working with Channel Members Working with Channel Objects Constructing Dynamic Navigation and Displaying Breadcrumbs Publisher: Addison Wesley Summary Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Chapter Pages: 113626. Managing Postings Checking Posting User Rights
Managing Postings Working with Posting Members
"This is one of those books that you will read to learn about the product and keep Working with rare Posting Child Objects rereading to find those tidbits that you missed before." Summary —Gary Bushey, SharePoint Server MVP Chapter 27. Manipulating Placeholders
Content Management Server (CMS) is fast becoming a vital content-management tool that Placeholder Context helps administrators and developers handle the ever-increasing amount of content on their and Deleting Placeholders and PlaceholderDefinitions Web sites.Creating However, an authoritative source of product information has been missing . . . until Working with Placeholder Members now. Working with PlaceholderDefinition Members
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Working with Placeholder Child Objects how to effectively unlock the power of CMS. Administrators and developers alike will learn how Custom Placeholders to enhanceSummary their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Chapter 28. Searching for CMS Assets This thorough reference explains the product architecture, then shows you how to create and Exploring Searches edit content and use the workflow. Topic coverage includes CMS administration and security, Searching a Single Assetoptions, site configuration, and template development. A the Publishing API,for deployment running example used throughout the book to illustrate how important CMS features are Searchingisfor a Collection of Assets implemented in real-world Web site development. Inside you'll find answers to such questions Efficient Searching for CMS Assets as: Summary
Chapter 6: How do you customize workflow? Part VII. Extending CMS
Chapter 29. How Developing Custom Controls CMS Chapter 10: do you develop forfor Microsoft Content Management Server (CMS) 2002 usingOverview Visual Studio .NET? User Controls
Chapter 17: How do you establish user rights? Composite Controls Summary Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 30. Customizing the Web Author Console
Chapter 32: How do you publish dynamic data? Overview
[ Team LiBAnatomy ]
of the Web Author .NET Console
Working with the Default Console Control Subclassing to Create a New Action Control Customizing the Web Author Toolbar Customizing the ASP Web Author Summary Chapter 31. Extending the Publishing Workflow Overview What Is Extending the Workflow? A Review of the Publishing Events Creating Event Handlers Best Practices for Extending Workflow
•
Summary
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide Chapter 32. Publishing Dynamic Data in CMS ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Overview
Why Would You Want to Integrate? Sample Integrations Publisher: Addison Wesley Summary Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Chapter Pages: 113633. Web Services Common Uses
Setup for Coding CMS Web Services Building a Web Service
"This is one of thosea rare books that you will read to learn about the product and keep Consuming Web Service rereading to findthe those Testing Web tidbits Service that you missed before." —Gary Bushey, SharePoint Server MVP Summary Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Part VIII. CMS Performance Web sites. However, an authoritative source of product information has been missing . . . until Chapter 34. Performance Planning now. Designing High-Performance CMS Sites
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Developing High-Performance CMS Sites how to effectively the power CMS. Administrators and developers alike will learn how Deploying unlock High-Performance CMSof Sites to enhanceNetwork their Web servers' scalability, flexibility, and extensibility by using CMS features and Latency API to manage content on the Microsoft platform. IIS Performance SQL Server Performance This thorough reference explains the product architecture, then shows you how to create and Security and Performance edit content and use the workflow. Topic coverage includes CMS administration and security, Summary the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in 35. real-world Web siteand development. Inside you'll find answers to such questions Chapter Performance Testing Capacity Planning as: Performance Goals Performance Testing Web Usage Statistics Chapter 6: How do you customize workflow? Transaction Cost Analysis
Chapter 10: How do you develop Troubleshooting Performance Issues for Microsoft Content Management Server (CMS) 2002 usingSummary Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 36. Tips and Techniques Overview Chapter 22: How do you best deploy CMS according to your organization's needs, size, Building a Site Map with Recursive Navigation and resources? Impersonation
Chapter 32: How do you publish dynamic data? Anonymous Content Contribution
an Alternate Version of a Posting [ Team LiBCreating ] How Do I Debug a CMS Project? Why Am I Prompted for Logon Credentials When I Have Windows Authentication Enabled? Reducing the Number of Clicks to Attachments Creating Navigation with Existing .NET Server Controls Summary
Part IX. Moving Forward with CMS Chapter 37. Upgrading or Migrating Your Site to Content Management Server 2002 Migrating Your Existing Site to CMS 2002 Content Inventory Functionality Inventory
•
Information Architecture Review and Template Design
Table of Contents
Workflow Microsoft Content Management Server 2002: A Complete Guide Role Definition ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Content Import Technical and Content Contributor Training Upgrading from CMS 2001 to 2002 Publisher: Addison Wesley Backing Up31, Your Existing Site Pub Date: October 2003 Uninstalling CMS 2001 ISBN: 0-321-19444-6 Finding Pages: 1136 and Reviewing Your Templates Running in Mixed Mode Summary
"This is one of those rare books that you will read to learn about the product and keep rereading to Appendixes find those tidbits that you missed before." Part X. —Gary Bushey, Server MVP Appendix SharePoint A. HTTP Reference Overview
Content Management Server (CMS) is fast becoming a vital content-management tool that HTTP Request helps administrators and developers handle the ever-increasing amount of content on their Response Web sites.HTTP However, an authoritative source of product information has been missing . . . until General Header Fields now. Entity Header Fields
Microsoft Content Summary Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their B. Web servers' flexibility, and extensibility by using CMS features and Appendix Publishing API scalability, Reference API to manage content on the Microsoft platform. CmsHttpContext Parentage CmsApplicationContext Parentage This thorough reference explains the product architecture, then shows you how to create and Channel Parentage edit content and use the workflow. Topic coverage includes CMS administration and security, Posting Parentage the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Placeholder Parentage implemented in real-world site development. Inside you'll find answers to such questions PlaceholderDefinition Web Parentage as:
[ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Copyright Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out • of Contents or programs contained herein. of the use ofTable the information Microsoft Content Management Server 2002: A Complete Guide
The offers discounts on ,this when ordered in quantity By Billpublisher English, Olga Londer , Shawn Shell Toddbook Bleeker , Stephen Cawood
for bulk purchases and
special sales. For more information, please contact: U.S. Corporate and Government Sales Publisher: Addison Wesley (800) 382-3419 Pub Date: October 31, 2003
[email protected] ISBN: 0-321-19444-6
For
Pages: 1136 sales outside
of the U.S., please contact:
International Sales (317) 581-3793
[email protected] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Visit Addison-Wesley on theServer Web: www.awprofessional.com —Gary Bushey, SharePoint MVP Library ofManagement Congress Cataloging-in-Publication Data Content Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Microsoft Content management server 2002 : a complete guide / now. Bill English...[et al.]. p. cm.Content Management Server 2002: A Complete Guide is the first book that explains Microsoft Includes bibliographical references index. how to effectively unlock the power ofand CMS. Administrators and developers alike will learn how 0-321-19444-6 (pbk. :scalability, alk. paper)flexibility, and extensibility by using CMS features and toISBN enhance their Web servers' 1.to Microsoft Server (Electronic resource) 2. Web API manageContent contentManagement on the Microsoft platform. sites—Design—Computer programs. 3. Web sites—Management—Computer programs. 4. Database I. English, Bill, 1961– This thorough reference management. explains the product architecture, then shows you how to create and TK5105.8885.M52M4497 2004 edit content and use the workflow. Topic coverage includes CMS administration and security, 005.2'76—dc22 the Publishing API, deployment options, site configuration, and template development. A 2003019169 running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Copyright © 2004 by Pearson Education, Inc. as: All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, anydo form, by any means, electronic, mechanical, photocopying, recording, Chapter 6:inHow youor customize workflow? or otherwise, without the prior consent of the publisher. Printed in the United States of Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 America. Published simultaneously in Canada. using Visual Studio .NET? For information on obtaining permission for use of material from this work, please submit a Chapter 17: written request to:How do you establish user rights? Chapter 22: How do Pearson Education, Inc.you best deploy CMS according to your organization's needs, size, and resources? Rights and Contracts Department 75 Arlington Street, Suite 300 Chapter How do you publish dynamic data? Boston, MA32: 02116 Fax: (617) 848-7047
[ Team LiB ] Text printed on recycled paper
1 2 3 4 5 6 7 8 9 10—CRS—0706050403 First printing, October 2003
Dedication To Kathy, David, and Anna—I love you three more than I could ever fully express. —W.F.E. To Gregory, Table Michael, and Dina of Contents
•
Microsoft Content Management Server 2002: A Complete Guide
—O.M.L.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
To Lauren, my alpha and omega. Publisher: Addison Wesley —S.A.S. Pub Date: October 31, 2003
To my ISBN: Lord 0-321-19444-6 Jesus Christ and my lovely wife, Kathryn Alicia Bleeker. In memory of our firstborn son, Landen Jamison Bleeker, and to all of our precious living children: Landis Jarin Bleeker, Pages: 1136 Lake Justus Bleeker, Lissa Jeneé Bleeker, Logan Joshua Bleeker, Lawson Jens Bleeker, And Lexa Joelle Bleeker —T.C.B. "This is one of those rare books that you will read to learn about the product and keep rereading to findThanks those tidbits thatsupport. you missed before." To my parents. for all the —Gary Bushey, SharePoint Server MVP —S.G.C. Content Management Server (CMS) is fast becoming a vital content-management tool that [ Team LiB ] helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Praise for Microsoft Content Management Server 2002
•
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before. Need to know how to setup CMS? Microsoft Content Management Server 2002: A Complete Guide will tell you. Need to know how the information is being processed before the user views it? Microsoft Content Management Server 2002: A Complete Guide will tell you. A great book no matter what your experience level is with Content Management Server." Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
—Gary Bushey, SharePoint Portal Server MVP
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
"A concise and accurate guide to Microsoft's enterprise development tool for contentcentric applications. An invaluable resource for any developer who wants to get the best Publisher: Wesley out of Addison Microsoft Content Management Server." Pub Date: October 31, 2003
—Ed Lead Program Manager, Microsoft Corporation ISBN:Robinson, 0-321-19444-6 Pages: 1136
"Content management is a complex, multifaceted application area, and Microsoft's CMS Server is a complex product. This book sets out everything you could possibly need or want to know about CMS. The title could easily be The CMS Resource Kit since it will be an essential addition to the library of any IT professional or developer working on content "This management is one of those rare books that you will read to learn about the product and keep and Microsoft's CMS." rereading to find those tidbits that you missed before." —Gary Bushey, Lee, SharePoint Server MVP QA —Thomas Chief Technologist, Content Management Server (CMS) is fast becoming a vital content-management tool that [ Team LiB ] helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Preface Microsoft Content Management Server 2002 is intended to be an outstanding reference on this emerging product. This book takes an in-depth look at CMS 2002 and outlines all areas of this product: from architecture to content authoring and publishing. In addition, we have chapters that detail how to create a site framework, administer a site, secure the site, and deploy the site in a production environment. There are several chapters on the Publishing API and how to extend CMS in your environment. While most of this book is written for the developer in your organization, there are key chapters • Table of Contents that will assist your infrastructure team in installing and monitoring a CMS 2002 production Microsoft server. Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In the first part of the book, we cover introductory information and the fundamentals of CMS 2002. This part has a short introduction to CMS 2002, discusses how to install CMS 2002, and thenPublisher: outlines the architecture for CMS 2002 in Chapter 3.Chapter 4 gives a sample outline on Addison Wesley howPub to Date: plan October for a CMS 2002 implementation. 31, 2003 ISBN: 0-321-19444-6
The second part of the book covers content authoring and publishing activities. We start this Pages: 1136 part by discussing the Web Author; then we move on to discussing publishing workflow in CMS 2002 and the Authoring Connector. This part is chock-full of examples and instructions on how to complete these tasks. "This is one of of those rare books that will read to learn about the product The third part the book focuses onyou creating the site framework. We'll show and youkeep how to create rereading findand those that you missed before." a new CMStosite howtidbits to structure the channel, template galleries, and resource galleries —Gary Bushey, SharePoint MVP hierarchies in your site. We Server also have inserted an excellent chapter on how to develop for CMS using Visual Studio .NET, with special attention paid to how a CMS project is different from a Content Management Server is fast becoming a vital tool thata generic project. This part also(CMS) includes several chapters thatcontent-management focus on templates, including helps administrators and developers handle the amount of content on their chapter on template-based page processing, oneever-increasing on creating templates, and other chapters Web sites. However, authoritative source of CMS product information haswe'll beendiscuss missingworking . . . until that discuss planning,an creating, and debugging templates. Finally, now. with placeholders in Visual Studio .NET, creating dynamic navigation elements, and connected postings. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively thefocuses power of Administratorsand andsecurity. developers alikewe willdiscuss learn how The fourth part of unlock this book onCMS. site administration Hence, how to work enhance Web servers' scalability, flexibility, extensibility by using CMS features and withtheir containers, how to set up user security,and how to use the Server Configuration API to manage the Microsoft Application, andcontent how to on secure access toplatform. your CMS site. This thorough reference explains the product you how toManager create and In Part V, we focus on site deployment issues,architecture, such as usingthen the shows Site Deployment and edit content and use the workflow. scenarios. Topic coverage includes CMS administration and security, discussing various site deployment the Publishing API, deployment options, site configuration, and template development. A running is used throughout the book toand illustrate how of important CMSInfeatures are Part VI isexample for the folks who love the nitty-gritty the details CMS 2002. this part, we implemented in real-world Web site development. Inside you'll find answers to such questions cover PAPI, obtaining contexts, traversing channels, managing postings, manipulating postings, as: and finding CMS assets.
In Part VII, we discuss how to extend the functionality of CMS 2002. We cover topics like Chapter 6: How do youcustomizing customize workflow? developing custom controls, the Web Author console in Visual Studio .NET, extending the publishing workflow, publishing dynamic data in CMS, and building a Web service Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 for CMS. using Visual Studio .NET? Part VIII is for those who administer a CMS 2002 server but don't code in the CMS Chapter 17: How do you establish user rights? environment. In this part, we cover capacity planning and performance monitoring issues, to help you run your servers more smoothly and efficiently. We also provide tips on Chapter 22: How do you best deploy CMS according to your organization's needs, size, troubleshooting and resources? Part IX has migration information for those of you who need to migrate from CMS 2001 to CMS 2002.Chapter 32: How do you publish dynamic data?
code for the examples in this book is available for download at [Complete Team LiBsource ] www.awprofessional.com/titles/0321194446. No technical book has ever been written that can answer all the questions for every reader who picks it up. But this book will be able to answer most of your questions and show you how to install, manage, troubleshoot, extend, configure, and develop for CMS 2002. Also, when it comes to purchasing a book, most readers evaluate the strength of a book, in part, based on who the authors are. Rarely has such a strong author team been assembled to write a book on a specific product. One of our authors works on the CMS team for Microsoft. Three other authors are very experienced developers, including one who is responsible for a nationwide CMS rollout on the CMS 2002 platform. By adding to that the direct support and enthusiasm of the CMS team at Microsoft, and three technical editors, we believe this book will be the benchmark work on CMS 2002. We trust thatTable you ofwill find this book to be an excellent reference as you work toward a full CMS • Contents deployment in your organization. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Acknowledgments There are five names on the front of this book, but there are many more people who are responsible for creating the book you are now holding. There were several people, who, behind the scenes, made this book possible. First, we'd like to thank Sondra Scott, Senior Acquisitions Editor for Addison-Wesley Professional. She went well beyond the call of duty to ensure that all the contracts were worked out to meet everyone's needs while keeping this book on track and on focus. Sondra, without you, this book would not have materialized. We also would like to thank Debby English, copy editor, and Kathy Glidden, project manager, who went through rather rough manuscript with a fine-toothed comb and made the • Table ofaContents sentences flow well and caught a 2002: number of minor errors, all while keeping us on schedule. Microsoft Content Management Server A Complete Guide Both of you did a great job and we are indebted to you. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
We would also like to thank those that helped ensure this manuscript is as free of technical errors as possible: Gary Bushey (SharePoint MVP, Microsoft Corporation), Scott Brown Publisher: Addison Wesley (Microsoft UK Corporation), and Thomas Lee (QA, London). Thank you all for your work and Pub Date:to October 31, 2003 dedication this book and for giving us additional insight into how to make this book better! ISBN: 0-321-19444-6
Bill English: It is not often that such an outstanding group of authors come together to Pages: 1136 produce a great work, but this is what has happened. As I was reading through the chapters, I was struck over and over again with the quality of writing from the authors on this team and found myself repeatedly impressed with their effort, attention to detail, and the professionalism that they demonstrated. is rare to you be inwill such great company, to Olga, "This is one of those rareIt books that read to learn aboutand the so product andSteve, keep Todd, and Shawn: You guys are great! Thank you for working on this project and for adding rereading to find those tidbits that you missed before." significant valueSharePoint to the original vision and concept for this book. You all have been great to —Gary Bushey, Server MVP work with and I hope we can do more together in the future. Content Management Server (CMS) is fast becoming a vital content-management tool that On a personal note, I'd like to thank Neil Salkind at StudioB for supporting project and for helps administrators and developers handle the ever-increasing amount of this content on their helping with the contractual issues. As usual, Neil, you did your outstanding work and I Web sites. However, an authoritative source of product information has been missing . . . until appreciate your efforts. I also want to thank Kathy, my wife, who continues to support and love now. me when I'm writing books. As usual, you're a great person to whom to be married. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Finally, I'd like to thank Christ,ofwho gave me the opportunity to write alike this book and how how to effectively unlockJesus the power CMS. Administrators and developers will learn without whom I would be lost forever. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Olga Londer: My very personal thanks go to the author team—Bill, Shawn, Steve, and Todd. I havethorough thoroughly enjoyedexplains workingthe withproduct all of you, and I sincerely hope we have This reference architecture, then shows youwill how to create and opportunities to work together in the future. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A I would also like to thank all at AQ for supporting me throughout the writing of this book. running example is used throughout the book to illustrate how important CMS features are Without the kind help and support of all my colleagues at QA this book would have never been implemented in real-world Web site development. Inside you'll find answers to such questions written. Special thanks go to Justin Turner and Thomas Lee for their endless encouragement, as: understanding, and help.
I'm grateful Henry Winkler and Davidworkflow? Frearson of Microsoft CMS team for reviewing my Chapterto6: How do you customize chapters and suggesting valuable additions and alterations. It was Henry who provided an identity matrix10: for How Chapter 19,develop "Managing Access"—thank you! Chapter do you for User Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Last, but not least, I would like to thank my husband, who stoically coped with my nearly constant work17: in the evenings and over user the weekends, always maintained his good humor, and Chapter How do you establish rights? never complained. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Shawn I'd like to start by thanking the other authors. Bill, Steve, Olga, and Todd—you andShell: resources? were all fantastic to work with and I enjoyed our partnership. I don't believe I could have worked with a32: better Chapter Howgroup. do you publish dynamic data?
also] like to thank folks in the following organizations: [I would Team LiB At Dell, first and foremost, I would like to thank Sue Hanley. You have been nothing but encouraging, constructively critical, and someone who is always willing to listen (when you're not checking e-mail 6); I couldn't have picked a better manager or mentor. I would like to thank Neil Isford, whose support of this project helped make my participation possible. I would like to thank Paul Kolinsky, who initially hired me and made my time at Dell possible. In addition, I would like to thank all of my friends across DPS. You guys are a great group of people to work with and I'm lucky to have had the opportunity to be a part of such a fantastic team. At Microsoft, I would like to thank all of my friends, spread across various groups. Specifically (listed in no particular order): Anne Weiler, Mike Van Snellenberg, Jean Pierre Poissant, Steve Cawood (of course), Ben Heng, Pat Miller, Jan Shanahan, Arpan Shah, Jim Lorenz, Ro Dhanda, Laura Nance, and Ivan Smigoc. I've known some of you since the NCompass days, others only since the acquisition. I appreciate your help, professionalism, and the occasional tasty tidbit of • Table of Contents knowledge (andManagement pre-releaseServer code...hint Microsoft Content 2002: Ahint...). Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Outside of Microsoft and Dell, I would like to thank the following people....Although no longer at Microsoft, I would like to thank Paul Loughlin. Without you, I probably would never have gotten to know NCompass or Resolution. Thanks, man! I would also like to thank Brian Fildes and John Publisher: Addison Wesley Crane. You both served as guiding figures early in my career and you taught me a great many Pub Date: October 31, 2003 things; I feel my successes are, in part, due to your tutelage. ISBN: 0-321-19444-6 Pages: 1136 personal note,
On a I would like to thank my wife, who has been a constant source of support, encouragement, and understanding. While she wasn't thrilled about my very late nights in the office, her love and support never wavered. I would also like to thank my parents for providing me with a solid foundation to achieve whatever I set my mind to. "This is one of those rare books that you will read to learn about the product and keep Note: For those you who haven't figured outbefore." where BOTS Consulting got its rereading to findofthose tidbits that you missed name...BillOlgaToddSteveShawn —Gary Bushey, SharePoint Server(two MVPS's at the end would have been a few too many consonants). Content Management Server (CMS) is fast becoming a vital content-management tool that Todd administrators Bleeker: A resounding "thank handle you" tothe myever-increasing outstanding co-authors, talented helps and developers amount ofthe content on people their at Addison-Wesley Professional, StudioB,source IPCS Consulting, and Microsoft. also appreciate Web sites. However, an authoritative of product information hasI been missing . . the . until strong support I received from my wife and kids (see my dedication); my mom and dad, Millie now. and Gary Bleeker; my inlaws, Marcy and Ron Olson; and my entire extended family. Finally, I'm grateful for theManagement extended technical discussion my younger Troy, andthat I had over ice Microsoft Content Server 2002: A Complete Guidebrother, is the first book explains cream one Sunday afternoon. BZ (bravo zulu) and Godspeed to all y'all. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Steve Cawood: This book could not have been written without the help of the Microsoft API to manage content on the Microsoft platform. Content Management Server product group. I would like to thank the whole team. In addition to this, I wouldreference like to specifically thank the following people for shows their help: Jan Shanahan, This thorough explains the product architecture, then you how to create and David Frearson, Pat Miller, Charles Morris, Kristian van der Hoek, Christa Peters, John edit content and use the workflow. Topic coverage includes CMS administration and security, Keinanen, Stefan Henryoptions, Winkler,site Mike Taghizadeh,and Chris White, Luke Nyswonger, the Publishing API,Goßner, deployment configuration, template development. A Mark Poernbacher, Arpan Shah, Tarun Banga, Glen to Buhlmann, Elenga, and Rasool Rayani. running example is used throughout the book illustrate Sigrid how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions I would also like to thank Christa for her tireless encouragement and support. as: [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
About the Authors An author, trainer, and consultant specializing in knowledge management and collaboration technologies, Bill English (MCSE, MCT, CTT+, MVP, GSEC) is the owner of Networknowledge (www.networknowledge.com), a consulting and training business dedicated to planning, architecting, and securing information for companies of all sizes. He has authored/coauthored eight books, including the The • Table of Contents Administrator's Guide to SharePoint Portal Server 2001 . Bill Microsoft Content Management Server 2002: A Complete Guide has been given the prestigious Most Valuable Professional ByBill English, Olga Londer, Shawn Shell , Toddfrom Bleeker , Stephenfor Cawood (MVP) award Microsoft his work on the SharePoint Portal Server platform. Bill is also the owner of a very popular Web site dedicated to SharePoint Portal Server Publisher: Addison Wesley (www.sharepointknowledge.com). Bill lives in Nowthen, Minnesota, with his wife and two children. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Olga Londer, MCSE/MCT, is a principal technologist at QA, the UK's biggest independent IT training company. Olga has been involved with Web development, infrastructure, and authoring since 1992, and has seen and worked with all "This is one of those rare booksproducts that you in will read to learn about thewrote product leading this area. In 1993, Olga the and firstkeep rereading to find those tidbits that you missed Internet training coursebefore." in the UK. She has authored most of —Gary Bushey, SharePoint MVP QA'sServer courses on Web development, design, and support, including "Building an Effective Website," "Intranet Content Management Server (CMS) is fast becoming a vital content-management tool that Technologies and Services," "E-commerce Masterclass," and helps administrators and developers handle the ever-increasing amount of content on their many others. As a consultant, Olga has been a technical lead Web sites. However, an authoritative source of product information has been missing . . . until for numerous projects for blue-chip clients. Her current now. responsibilities include teaching, consulting, and technical leadership for the Internet/e-commerce curriculum at QA. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Olga holds an M.S. in applied math and computer science, and how to effectively unlock the power of CMS. Administrators and developers alike will learn how has over 15 years of experience in IT consulting and training. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
Shawn Shell is an industry-recognized expert in the area of content management and on Microsoft's Content Management Server. He leads Dell Professional Services' Content Management practice, a nationally focused competency practice that leverages the group's expertise in content management solutions to help clients achieve business objectives. Shawn has been with Dell for more than three years, following an 11-year career at Warner-Lambert Company. Shawn joined Warner-Lambert Company (now Pfizer) in 1989 as a help desk analyst. Throughout his career, he held various positions within divisional and corporate information technology groups, from running the Legal Division's help desk to managing a divisional data center and participating in a cross-divisional team to develop WarnerLambert's standard desktop. In 1999, Shawn became the • Table of Contents Manager of Internet/Intranet Technologies, responsible for Microsoft Content Management Server 2002: A Complete Warner-Lambert.com, theGuide global intranet, and various product-specific sites ,like Trident.COM. In addition to his time ByBill English, Olga Londer, Shawn Shell, Todd Bleeker Stephen Cawood at Warner-Lambert Company, Shawn has been a part-time lecturer at Rutgers University's Department of Computer Publisher: Addison WesleyScience and an instructor at the Rutgers Internet Institute. [ Team LiB ]
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
With over a decade of Microsoft-centric software development in his wake, Todd C. Bleeker, Ph.D., is regarded as an innovative, resourceful, and competitive IT executive with an intense desire to excel. Early in his career, Todd built shrewd customer service solutions for P&G, pioneered new "This is one of those rare books thatto you will read tothe learn about the product and keep technologies revolutionize transportation logistics rereading to find those systems tidbits that missed shaped before."the disease management tools for you Fingerhut, —Gary Bushey, SharePoint Server MVP Healthcare), and drove the human capital for UHG (United Pages: 1136
procurement vision to an internationalized, commercial-grade, Content Management Server is for fastItiliti becoming a vital content-management tool that global (CMS) solution (now PeopleClick). Currently the CTO helps administrators and developers handle the ever-increasing amount of content on their for International Project Consulting Services, Inc. Web sites. However, an(http://ipcs.net), authoritative source of product information has been missing . . . until Todd manages offshore software now. development operations in New Delhi, India, while actively participating in various roles on stateside and Canadian Microsoft Content Management Server 2002: A Complete Guide is the first book that explains projects. For instance, Todd recently architected the software how to effectively unlock the power of CMS. Administrators and developers alike will learn how that Air Canada uses to track its roughly $30 million of annual to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and in-flight cash sales. From a content management perspective, API to manage content on the Microsoft platform. Todd helped the State of Minnesota webify and manage over pages of systems documentation; implemented This thorough reference40,000 explains the product architecture, then shows you howon to create and behalf of Microsoft Consulting Services an MCMS solutionand for security, edit content and use the workflow. Topic coverage includes CMS administration Bank of Montreal, AnytimeLoan.com, and Bancsoft; and the Publishing API, deployment options, site configuration, and template development. A presented on the Webbook Services and MCMS TechEd 2003. In his are running example is used throughout to illustrate howat important CMS features spare time, loves to soak up you'll whatever technology implemented in real-world Web siteTodd development. Inside find answers to such questions Microsoft is churning out and spend countless hours in as: Minnesota with his wife, Kathryn, and six "high energy" children: Landis, Lake, Lissa, Logan, Lawson, and Lexa. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Stephen Cawood is a Microsoft employee and has been working with Microsoft Content Management Server for over four years. Stephen joined the MCMS product team as a Web developer and has recently transitioned to the role of program manager. He is currently focused on MCMS security. Over the last few years, Stephen has spoken at the University of Washington Graduate Studies Department and at conferences such as the MCMS Technical Airlift and Microsoft TechEd.
[ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part I: CMS Fundamentals Chapter 1. Introduction to Content Management Server Chapter 2. Installing Microsoft Content Management Server Chapter 3. CMS Architecture Chapter 4. Planning a Content Management Server Engagement [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 1. Introduction to Content Management Server Microsoft Content Management Server (CMS) is the future of building Web sites. CMS represents a dramatic departure from conventional methods of building and conceptualizing Web sites. CMS offers significant improvement in how Web sites are built and maintained, in terms of both economies of scale and time savings. Moreover, CMS offers a compelling story that you will learn about as you read this book. There Table of Contents are strong reasons to implement CMS in your environment—especially if you manage a large Microsoft Content Management Server 2002: A Complete Guide number of Web servers with content that often changes. These reasons include scalability, ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood flexibility, and extensibility of your Web site. •
Hence, in this chapter, we will outline the features of CMS and offer reasons for implementing Wesley CMSPublisher: in yourAddison environment. CMS is an exciting product, so let's get going! Pub Date: October 31, 2003 ISBN: 0-321-19444-6
[ Team LiB ]1136 Pages:
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
The CMS Story: Why You'll Want to Implement CMS in Your Environment When Web sites were being initially developed and published on the Internet, the designers of these sites were driven primarily by the need for the sites to be attractive and to hold the viewers' interest. They were right, of course, but we soon learned that sites had to be more than attractive. They also needed to be easy to navigate and offer timely, accurate information that was relevant to the site visitor. This was difficult to achieve because information was static on Web sites. In fact, many sites Table of Contents were little more than glorified company brochures. The information presented in these sites Microsoft Content Management Server 2002: A Complete Guide was the same for every visitor, making personalization of the site impossible. Hence, we were ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood faced with trying to build sites that contained information that would be relevant to a wide audience and yet meet the needs of multiple, distinct audiences. •
Publisher: Addison Wesley In addition, updating static information was expensive because of the coding efforts of creating Date: And October 31, 2003 workflows that were used to update existing data in these sites were eachPub page. common ISBN: 0-321-19444-6 cumbersome and not able to quickly react to changing conditions. Pages: 1136
The upshot of all these factors was that the promise of the Internet becoming the delivery vector for commerce did not meet expectations. What we learned was that if we were going to use Web applications and the Internet for commerce in any serious manner, these problems we've outlined here needed to be addressed and solved from both a development and an "This is one of those rare books that you will read to learn about the product and keep infrastructure viewpoint. What was needed was a new way to conceptualize and deliver content rereading to find those tidbits that you missed before." on Web sites. —Gary Bushey, SharePoint Server MVP What CMS represents is a new way of conceptualizing Web sites. Instead of being primarily Content Management Server (CMS) is fast becoming a vital content-management tool that concerned about the design of the Web site, we are now most concerned about the content of helps administrators and developers handle the ever-increasing amount of content on their the Web site. In other words, by using CMS, we can develop and deliver content-driven Web Web sites. However, an authoritative source of product information has been missing . . . until sites instead of design-driven sites. This is a fundamental shift in how we think about Web now. sites. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Content-driven Web sites address the challenge of frequent changes to the site content by how to effectively unlock the power of CMS. Administrators and developers alike will learn how separating the design of the site from the content of the site. This approach enables the design to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and and the content to be created and managed separately. More to the point, your Web designers API to manage content on the Microsoft platform. and graphics people can concentrate on what they do best: developing great site designs from both thorough a navigational and aexplains visual perspective. the other hand, your business canand This reference the product On architecture, then shows you how people to create concentrate on what they do best: developing great content for your customers and other edit content and use the workflow. Topic coverage includes CMS administration and security, interested parties. is no need for your business usersand to learn about the site design, the Publishing API, There deployment options, site configuration, template development. A and the reverse is true too: Your site developers have no need to learn about the business content running example is used throughout the book to illustrate how important CMS features are that will appear on your site. implemented in real-world Web site development. Inside you'll find answers to such questions as: The advantages to this separation are multiple: Chapter 6: How do you customize workflow? Workflow is simplified because business users can create, approve, and manage content without needing one of site Content design. Management Server (CMS) 2002 Chapter 10: Howtodounderstand you develop forwhit Microsoft using Visual Studio .NET? Site designs can be customized for every type of content. Chapter 17: How do you establish user rights? Content can be changed quickly to meet changing business needs and goals. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Workflows can be customized for different parts of the site, avoiding a one-size-fits-all and resources? workflow. Chapter 32: How do you publish dynamic data? Obviously, content-driven Web sites are more difficult to secure than design-driven Web sites.
a traditional Web site, you had to concern yourself with who had access to the site over [With Team LiB ] the Internet and from within your own organization. With a content-driven Web site, you'll need to be concerned about giving different levels of permissions to those within your organization who will have different roles in developing and delivering content on your Web site. Rights can be granted or denied to users based on the role that user has for the site. Content-driven Web sites will require more administrative effort, but this effort is more than offset by the efficiencies gained through the use of CMS. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Features of Content Management Server CMS offers a rich set of features that form a compelling reason to purchase this product. These fall into two broad categories: design features and content features. The design features of CMS include the ability to create templates that define the layout of the pages for your Web site. These templates will contain placeholders for content that is created by your business users. The content features of CMS include the use of two tools to which we'll refer from time to time in this book:Table the Web Author tool and the Authoring Connector tool. These tools allow business • of Contents users to create and manage content efficiently and effectively. Using the Web Author tool, Microsoft Content Management Server 2002: A Complete Guide users can: ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Create, modify, and delete pages Publisher: Addison Wesley
Copy move pages Pub Date:and October 31, 2003 ISBN: 0-321-19444-6
Create connected pages that share source content with other pages but display that Pages: 1136 information in different ways Submit pages for review and approval "This is one of Connector those rare can books will read to learn about productto and The Authoring bethat usedyou to submit a Microsoft Wordthe document thekeep Web site rereading to find those tidbitswith that ayou missed task before." and associate that document particular that has been created in the Web site. When —Gary Bushey, SharePoint Server MVP will perform the required functions, abstracting the the author selects a task, the task itself author from the workflow required to correctly publish the document to the Web site. Hence, it Content (CMS) fast becoming a vital content-management that becomesManagement as simple as Server using Word toiscreate the document and then submitting thetool document helps and developers handle the ever-increasing amount as of desired. content on their under administrators a chosen task to ensure the document is approved and published Web sites. However, an authoritative source of product information has been missing . . . until now. Other features of CMS include the ability to schedule content publication for a future point in time. Pages can be expired or set to remain on the site indefinitely. Moreover, before content is Microsoft Content Management Server 2002: A Complete Guideexactly is the first that explains actually published, authors will have the opportunity to review how book that information will how to effectively power CMS.the Administrators and developers alike will learn how appear on the Webunlock page,the giving the of author ability to ensure that the information is both to enhance and theirvisually Web servers' technically correct.scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. CMS is integrated in Visual Studio .NET (VS.NET). The integrated development environment This thorough reference product architecture, shows you how to and allows you to create and explains maintainthe CMS templates in VS. In then addition, full support forcreate template edit contentisand use the workflow. Topic coverage includes CMS administration and security, debugging included in the VS debugger. Finally, template files can be managed and secured the Publishing API, deployment options,source site configuration, template development. using Visual Source Safe or third-party control tools.and This allows your developersA to running example is used throughout the book to illustrate how important CMS arefor maintain template integrity in a multideveloper environment. In addition, CMS features also allows implemented in real-world Web site development. Inside you'll find answers to such questions third-party integration by using the .NET framework, Web services, and support for Extensible as: Markup Language (XML).
CMS also allows for a rapid deployment of a large Web site. In addition, CMS offers flexibility in Chapter 6: How you customize workflow?to meet changing needs and demands. And quickly changing data do across a large deployment because content can be kept up-to-date, visitors will find the site more informative and useful, Chapter 10: How do you develop for experience. Microsoft Content Management Server (CMS) 2002 leading to an increased positive end-user using Visual Studio .NET? At a detailed level, Table 1-1 offers an overview of the new features that can be found in CMS 2002.Chapter 17: How do you establish user rights? Chapter How do you bestfeatures deploy CMS according to your organization's needs, In short, CMS 22: offers three overall that form the foundation for an excellent e- size, and resources? commerce site: Chapter 32: How do you publish dynamic data?
A comprehensive system for Web site content management [ Team LiB ] A dynamic, up-to-date content delivery system Rapid, efficient time-to-market for e-commerce sites In addition to these features, you'll find that CMS stores content as objects, enabling reuse of content throughout your site. Because of the template-driven nature of presenting content, you'll also be able to target which content appears based on audience membership, device, and/or individual account information. You'll install CMS on top of Internet Information Services (IIS) 6.0 or later. For developers, you'll install CMS on top of Visual Studio .NET. CMS dynamically generates Web pages from content objects and templates. But there are other components that ship with CMS 2002 that increase productivity for business and technical • Table of Contents users. These components speed up site development, simplify integration and interoperability, Microsoft Content Management Server 2002: A Complete Guide and provide rapid deployment. These components are: ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Table 1-1. New Features in CMS 2002
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
New Feature
Explanation
.NET-based Publishing API
The CMS 2002 Publishing API is .NET based, meaning that CMS 2002 objects can be called from any Common Language Runtime "This is one of those rare books that you will read to learn about the product and keep (CLR). rereading to find those tidbits that you missed before." Improved authentication Authentication can be customized and can use either the —Gary Bushey, SharePoint Server MVP model ASP.NET authentication model or accounts in Active Directory. Content Management Server (CMS) is fast becoming a vital content-management tool that Improved caching and Cachinghandle can bethe implemented via rule-based each helps administrators and developers ever-increasing amount ofcommands content onon their performance page. Web sites. However, an authoritative source of product information has been missing . . . until now. Improved event model CMS provides event classes that make it easier to extend the CMS workflow model. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of use CMS. developers will to learn how Improved multilingual You can theAdministrators .NET featuresand to add multiple alike cultures your tosupport enhance their Web servers'initial scalability, flexibility, and extensibility by using CMS features deployment. After the templates are created, you won't and API to manage content on theneed Microsoft platform. to worry about them. This then youorhow to create Webthorough services reference support explains You the canproduct use XMLarchitecture, Web services thatshows provide consume Weband edit content and use the workflow. Topic CMS administration and security, services for coverage your CMSincludes site. the Publishing API, deployment options, site configuration, and template development. A XML support The newthe XML placeholders support XML content, Schema running example is used throughout book to illustrate how important CMS XML features are Definitions (XSD), and Extensible Stylesheet Transformations implemented in real-world Web site development. Inside you'll find answers to such questions (XSLT). as:
Integration with Visual Placeholders are implemented as ASP.NET controls, code can be Studio .NET 6: How do you customize stored in files so that source control tools are used in large Chapter workflow? deployments, and debugging is easier too. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Simplified publishing Site managers can publish information more easily directly from using Visual Studio .NET? process Word into the Web site. Chapter 17: How do you establish user rights? Separation of authoring Authoring of content is left to the business user, while site and Chapter site management tasksaccording are left to and/or developers. 22: How do youmanagement best deploy CMS toadministrators your organization's needs, size, tasksand resources? Chapter 32: How do you publish dynamic data? Web Author: This tool enables authors and editors to create, edit, and publish Web
content. [ Team LiB ] A site can be updated quickly because multiple users can work on different parts of the Web site at the same time. The Web Author is a browser-based tool that requires no additional client software. Authoring Connector: This tool enables content creators to author and edit documents in Microsoft Word XP and to submit them for approval and publication to a CMS Web site. Site Manager: This tool enables CMS administrators to create a site structure, including channels, templates, and resource galleries, and to assign rights and roles to content creators, developers, and users. Site Deployment Manager: This tool enables CMS administrators to update the Web site using an export and import package transfer method. Site Deployment Manager is invoked through the Site Manager. Developers can also schedule deployment of content using ASP scripts. •
Table of Contents
Database Configuration (DCA): Microsoft Content Management ServerApplication 2002: A Complete Guide This
tool selects and populates a SQL database, specifies the virtual Web site, and selects a system account and initial ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood administrator for a new installation. Once installation is complete, the Database Configuration Application is used to configure the database on an ongoing basis. Publisher: Addison Wesley
Server Configuration Application (SCA): This tool is used to view and change the for the CMS 2002 Server.
Pub Date: October 31, 2003 configuration values ISBN: 0-321-19444-6
Publishing Pages: 1136 Application Programming Interface (API): This API enables developers to build highly customized, dynamic Web sites that integrate easily with other applications. There are a number of possible deployment scenarios. Each scenario will depend on the site "This is one of those rare books that you will read to learn about the product and keep requirements, the size of your organization, and the resources available at the time the site is rereading to find those tidbits that you missed before." deployed. —Gary Bushey, SharePoint Server MVP CMS is highly flexible and can be used in any number of situations to enhance Web site design, Content Management Server (CMS) is fast becoming a vital content-management tool that deployment, and timeliness. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of and product information missing . . until In this book, we'll discuss each feature of CMS illustrate how to has use been the tools and .the now. product to deploy sites more quickly and more efficiently than ever has been possible. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains [ Team LiB ] how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary CMS 2002 is Microsoft's most advanced Web site building and deployment tool. It achieves economies of scale by reusing code and templates and improves efficiency by allowing content workers to directly publish their work to the Web site. CMS 2002 can reduce costs and improve customer relations while allowing you to build an outstanding Web site that is rich in features, design, and up-to-date content. In the next chapter, we'll discuss how to install CMS 2002. •
[ Team LiB ]
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 2. Installing Microsoft Content Management Server Installing Microsoft Content Management Server (CMS) is a pretty straightforward process. In this chapter, you'll find information on how to install CMS, elements that should be considered before you install CMS, and some troubleshooting issues too. Because this book is primarily a developer-oriented book, we'll not dive into all the nooks and crannies of a CMS installation. However, if you need introductory information on how to install CMS, then this chapter is for you. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Elements to Consider before a CMS Installation The minimum hardware and software requirements vary, depending on the type of server you're planning to install. For instance, if you are planning to install CMS for your developers, then the following laundry list applies: Windows 2000 Professional, Server, or Advanced Server with Service Pack 2 or later Internet Explorer 6.0 or later •
Table of Contents Internet Information Services (IIS) 5.0 with these components: Common Files, IIS services snap-in, and the World Wide Web Server
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
IIS Security Hotfix MS02-018 SQL Server Service Publisher: Addisonwith Wesley
Pack 2 or later
Pub Date: October 31, 2003
.NET Framework with Service Pack 2 or later ISBN: 0-321-19444-6
Pages: 1136 Visual Studio
.NET
Internet Explorer WebControls 1.0 or later It is also recommended youthat have installed thetoData Access 2.7 RTM "This is one of those rarethat books you will read learn aboutComponents the product and keepRefresh, and the Windows High Security Template and the CMS template for the IIS Lockdown Tool. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP For a production environment, you should ensure that your server meets these minimum hardwareManagement requirements: Content Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Pentium III processor or higher now.
1GB of RAM or more Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock theor power 2GB of free disk space moreof CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toCD-ROM managedrive content on the Microsoft platform. This thorough referencecard explains the product architecture, then shows you how to create and Working network edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment options, site configuration, and template development. A 800x600 API, monitor resolution running example is used throughout the book to illustrate how important CMS features are implemented real-world Web site development. Inside you'll find answers to such questions Mouse orinpointing device as: For a production server, you should also ensure that you have this minimum software ready for the installation: Chapter 6: How do you customize workflow? Chapter How do you forServer Microsoft Server (CMS) 2002 Windows10: 2000 Server or develop Advanced withContent Service Management Pack 2 or later using Visual Studio .NET? Internet Explorer 6.0 or later Chapter 17: How do you establish user rights? IIS 5.0 with these components: Common Files, IIS services snap-in, and the World Wide Chapter 22: How do you best deploy CMS according to your organization's needs, size, Web Server and resources? IIS Security Hotfix MS02-018 Chapter 32: How do you publish dynamic data? SQL Server 2000 Client Utilities with Service Pack 2 or later
[ Team LiBFramework ] .NET with Service Pack 2 or later
Internet Explorer WebControls 1.0 For a Site Manager box, you'll only need Windows 2000 Professional with Service Pack 2 or later. If you are running Windows 2003, you'll need to install CMS and then Service Pack 1 for CMS. With SP1 for CMS, you'll find that Windows 2003 domains are supported. There are some known issues surrounding a CMS/SP1 installation on Windows Server 2003. First, the CMS console may not run properly if your Internet Explorer zone is set to High Security. This setting will interfere with the downloading of the JavaScript file that supports the Switch to Edit Site link. To work around this problem, either lower your security setting or add the CMS site to your trusted sites in Internet Explorer. •
Table of Contents
Microsoft Management Server 2002: A Complete Guide Second, Content if you stop the AESecurityService and then attempt
to access your CMS console, the restart. You'll need to start this service manually, and then the console should appear just fine.
console will,Olga not appear and the AESecurity Service will not automatically By Bill English Londer, Shawn Shell , Todd Bleeker , Stephen Cawood
Third, VisualAddison Studio.NET Publisher: Wesley presents some problems when it is installed on Windows 2003 Server because of the way it stores .tmp files; IIS 6.0 blocks all file types that are not explicitly Pub Date: October 31, 2003 mapped, and the .tmp file type is not explicitly mapped by default. The workaround for this ISBN: 0-321-19444-6 problem is to either use Visual Studio .NET 2003 when working with Windows 2003 or map the Pages: 1136 .tmp file extension as a text/plain file type in the MIME type box in IIS. Generally speaking, the process of installing CMS contains four steps: creating the Windows user accounts, creating the database, installing the CMS components, and configuring the "This is one of those rare books that you will read to learn about the product and keep database. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Creating the Necessary Windows User Accounts
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their CMS sites. uses aHowever, system account to accesssource resources on the information network andhas to work the .Active Web an authoritative of product been with missing . . until Directory (AD) directory service. For example, the system account will need permissions to now. browse the AD in order to enumerate objects in the director. In addition, the account (essentially) performs impersonation all users connecting to the Web site so that Microsoft Content Management Serverfor 2002: A Complete Guide is the first book that the explains administrator isn't unlock forced the to list eachofuser account on each resource for permissions access how to effectively power CMS. Administrators and developers alike will to learn how theenhance resource. to their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The system account will need read/write permissions on the SQL database. In addition, ensure that thorough this account is not the same the as the local architecture, administratorthen account andyou that it istonot the IIS This reference explains product shows how create and anonymous edit content account. and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A In reality, you'll need to create two accounts, one. Thehow firstimportant will be theCMS CMSfeatures system are running example is used throughout the book not to illustrate account. The other will be the The find system account will be used to implemented in real-world WebCMS site administrator development.account. Inside you'll answers to such questions read and write data to the database. The administrator account will need to be the first as: administrator to access the CMS Web application. This account can use Site Manager to add other users as needed. Chapter 6: How do you customize workflow? After you have created the necessary accounts in the local server's account database, you'll do you developThe for only Microsoft Content 2002 want Chapter to install10: the How required software. software that Management we'll illustrateServer here is(CMS) the CMS using Visual Studio .NET? installation. Chapter 17: How you establish user rights? One thing to note aboutdothe CMS setup routine is that it is context sensitive in the sense that it will evaluate the environment into which CMS is being installed and notify you with a pop-up 22: How doproblems. you best deploy CMS to your organization's size, box ofChapter any configuration This type of according self-checking of the server beforeneeds, running setup resources? savesand us from ourselves. Setup will not allow us to set up CMS in a poorly or wrongly configured environment. Hence, if you get a screen saying that you need a certain piece of Chapter 32: How you publish data? software installed whiledo you're runningdynamic setup, then pay attention! You'll need to resolve that
before [issue Team LiB ] setup will be able to continue past that point in the setup routine.
Running the CMS Setup Program To install CMS, place the CMS CD-ROM in your CD-ROM drive and allow autoplay to start the process. On the initial splash screen, select Install Components. On the next screen, select Install MCMS Components. Setup will then run through a series of internal checks while it displays a Preparing to Install screen to ensure your server meets the requirements for a CMS installation. If your server passes the tests, you'll be presented with the Welcome to the Installation for Microsoft Content Management Server screen. At this point, you'll want to click Next to continue. The ensuing screen will ask you to read and agree to the licensing agreement. After agreeing to the licensingTable agreement, you'll click Next and be presented with the Custom Setup screen • of Contents (Figure 2-1). Notice that your screen appearGuide different from ours in this illustration if you Microsoft Content Management Server 2002:may A Complete have installed Visual Studio .NET on your server. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 2-1. Custom Setup screen in the CMS setup routine Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented inmade real-world site development. Inside you'll find click answers such questions After you have your Web selections on the Custom Setup screen, Nextto and enter the as: product key code on the Customer Information screen. Then click Next to bring up the Disk
Cache Folder screen (Figure 2-2). The size selected here will default to 2GB (2,048MB). The minimum is 50MB and the maximum is 7,429MB. After making your selection, click Next. Chapter 6: How do you customize workflow?
Cache Folder configuration ChapterFigure 10: How2-2. do youDisk develop for Microsoft Content Managementscreen Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: At this juncture, you'll only need to install the developer tools if you are a server Visual Studio .NET "Thisinstalling is one of CMS thoseon rare booksthat thatalready you willhas read to learn about theinstalled. product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP The nextManagement screen will ask you to start isthe installation will content-management let you choose whether you want Content Server (CMS) fast becomingand a vital tool that to launch the Database Configuration Application (DCA) after setup has completed. The DCA helps administrators and developers handle the ever-increasing amount of content on their allows you However, to make configuration changes and to your has SQLbeen databases. Web sites. an authoritative source of modifications product information missingWe'll . . . until discuss the DCA in more detail under the Creating the Database section in this chapter. now. After you Content click Next, the installation will2002: start.AYou'll see a Guide status is bar indicating Microsoft Management Server Complete the first booksetup's that explains progress. When setup ends, you'll be presented with a Finish screen if you didn't choose tohow how to effectively unlock the power of CMS. Administrators and developers alike will learn start the DCA automatically or scalability, the DCA welcome screen if you did choose to start DCA and to enhance their Web servers' flexibility, and extensibility by using CMSthe features automatically. API to manage content on the Microsoft platform. If you encounter installation problems, you can look at the then CMSInstall (byand This thorough reference explains the product architecture, shows log youfile, howlocated to create default) in the program files\Microsoft Content Management Server\LogFiles directory. It will edit content and use the workflow. Topic coverage includes CMS administration and security, open with Notepad or any other options, text editor, you can read error messages in theA log file the Publishing API, deployment site and configuration, andthe template development. and thenexample troubleshoot as throughout necessary. the book to illustrate how important CMS features are running is used implemented in real-world Web site development. Inside you'll find answers to such questions as:
Creating the Database Chapter 6: How do you customize workflow? After you have installed the required software, if you selected to have the DCA run, then the DCA will start 10: automatically. is anfor opening splash screen to this application, which 2002 you Chapter How do youThere develop Microsoft Content Management Server (CMS) can just click through to the next screen. This screen will ask you if you want to operate in using Visual Studio .NET? ASP.NET mode or mixed mode (Figure 2-3). The difference here is that ASP.NET mode will Chapter How do you establish rights? restrict CMS to17: hosting read-only sites inuser ASP.NET as opposed to earlier versions of Active Server Pages (ASP). In mixed mode, read-only sites can be hosted in either version of ASP code.Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Figure 2-3. Selecting the CMS mode
Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Once you've made your selection, you can click Next. The following screen will ask you which existing Web sites on your server should host the CMS server installation. In our running example here, we'll select the Default Web site (Figure 2-4). You can also choose whether the site will be read-only or read/write. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, Server MVP site to host the CMS server installation Figure 2-4.SharePoint Selecting a Web Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, The next will ask you which Web site should be the SCA Web entry point. Select the and screen resources? Administration Web Site at this point and click Next. Note that if you select the Default Web site or any Web site that is do operating over dynamic port 80, data? you will receive a warning message that says, Chapter 32: How you publish essentially, don't use this site. Then click Next.
[The Team LiB ] screen will ask you for a user name and password account that will be used for following the CMS system account. Enter the correct user name and password, and then click Next.
The DCA application will then stop all IIS services and present you with the screen from which you can select the database that you'd like CMS to use. If this screen comes up with a "[none]" selection, as illustrated in Figure 2-5, click the Select Database button, and you'll receive a list of all the SQL servers in your environment. From there, you can select which server and database you'd like this CMS installation to use. You'll want to use the Options button (which is dimmed in Figure 2-6 because we already selected it to illustrate the Options features) to select the exact database on that server, along with the language.
Figure 2-5. Database selection screen •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Figure 2-6. Options screen that allows us to select a SQL database on API to manage content on the Microsoft platform.
a different server
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
NOTE: Best practice is to create the empty SQL database before installing CMS on Pages: 1136 your server. If you wait until this point to create the SQL database, you'll need to bounce out of the installation program, create the database, and then come back and perform these actions again. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP If the database is empty, you'll be asked if you'd like CMS to populate the database. Click Yes on that pop-up, and the database population will begin. After the schema is built in the new Content Management Server (CMS) is fast becoming a vital content-management tool that database and the changes are committed, you'll be asked whether you'd like to restrict Site helps administrators and developers handle the ever-increasing amount of content on their Stager access to the local machine. The default is to say Yes. Make your selection there and Web sites. However, an authoritative source of product information has been missing . . . until then click Next. You'll then receive a pop-up box indicating that SQL services need to be now. running on the remote SQL box. This DCA ends by defaulting to starting the SCA when you click Finish. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how If you choose to start the SCA, you'll be presented with the General tab in the Server to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Configuration Application. This application is discussed in detail in Chapter 18. The DCA is also API to manage content on the Microsoft platform. discussed in Chapter 8. This thorough reference explains the product architecture, then shows you how to create and At this point, you'll have CMS installed and ready to build your Web site. There are some other edit content and use the workflow. Topic coverage includes CMS administration and security, installation issues that we'll discuss now in the following sections. These issues include installing the Publishing API, deployment options, site configuration, and template development. A CMS on multiple computers. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Installing SQL and CMS on the Same Server
Chapter 6: How do you customize workflow? The SQL server can reside on the same physical box as CMS. In our preceding example, we demonstrated howHow to install CMS on one and Content place theManagement SQL database on a (CMS) different Chapter 10: do you develop forserver Microsoft Server 2002 server. The reason this illustration was selected was that we felt in most environments the SQL using Visual Studio .NET? server and the CMS server would be two different servers. Chapter 17: How do you establish user rights? However, this is not required. If you want to install CMS and SQL on the same server, you can. And, in fact, you use databases to host your CMS installation. needs, size, Chapter 22:can How dothe youlocal bestSQL deploy CMS according to your organization's and resources? So, the only difference in how CMS would be installed is that on the database selection screen (referChapter to Figure 2-5), selectdynamic a local database 32: Howyou do would you publish data? instead of a remote database. After that, the installation should proceed as normal.
[ Team LiB ]
Installing Site Manager and/or Site Stager There is not much to installing either of these packages. Essentially, you'll want to run the CMS setup routine and then make your selections during this setup routine on the Custom Setup screen (Figure 2-7). Incidentally, this is where you can select to uninstall a package as well.
Figure 2-7. Selecting Site Manager on the Custom Setup screen in the CMS setup routine
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Installing the Authoring Connector to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The Authoring Connector (AC) is used to allow users to publish information directly from Word. The Authoring Connectorexplains runs from thearchitecture, Word application is ayou wizard-based utility. This thorough reference thewithin product then and shows how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, The Publishing AC is installed the client options, computer, not the server. Any with rights to contribute to the API, on deployment site configuration, and user template development. A the content on a CMS sitethroughout can install the andbook use the AC. There areimportant essentiallyCMS twofeatures steps involved running example is used to illustrate how are in installing the on a client machine: implemented in AC real-world Web site development. Inside you'll find answers to such questions as:
Install the component. Chapter 6:AC How do you customize workflow? Enable the component in the Word application. Chapter 10:AC How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? In order to install the AC, you must meet these prerequisites: Chapter 17: How do you establish user rights?
The operating system must be Windows 2000 based or Windows XP based. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and You'llresources? need to be running at least Service Pack 2 if Windows 2000 based. Chapter do you publish You must32: be How running Word XP. dynamic data?
You must be running Internet Explorer 5.0 or later. [ Team LiB ] To install the Authoring Connector, you'll need to first install Word 2002. Without this installed, the AC setup routine will not even begin. The first three screens in the setup wizard are the Welcoming screen, the Company Information screen, and the location screen where you can tell setup where you want the AC installed. These are generic screens that don't need to be illustrated here. The fourth screen will ask you which CMS server you'd like to connect to. Enter the CMS server name and click Next. Then click Next again and the installation will start. The installation is short, and you'll finish the wizard by clicking Finish on the Finish Setup screen. Enabling the AC in Word 2002 is not terribly intuitive. First, you'll need to navigate to the Tools menu and select Options. On the Security tab (Figure 2-8), you'll click the Macro Security button. This will bring up the Security dialog box. On the Trusted Sources tab, ensure that the "Trust all installed • Table ofadd-ins Contentsand templates" check box is selected (Figure 2-9). Microsoft Content Management Server 2002: A Complete Guide
Figure 2-8. Security tab in the Options area of Word 2002
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
Figure 2-9. Trusted Sources tab in Word 2002
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
This series of steps will enable the AC in Word 2002. These options should already be selected for you because of the AC installation on your client computer. However, it is a good idea to go through these steps and ensure that you have the proper configurations assigned as we just described. "This is one of those rare books that you will read to learn about the product and keep rereading to find those 2002? tidbits Well, that you missed before." What changes in Word on the File menu, you'll find a Send to MCMS menu option —Gary Bushey, SharePoint Server MVP that will allow you to send a document directly to CMS from Word 2002. This menu option is illustrated in Figure 2-10. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Figure 2-10. Send to MCMS menu option Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
NOTE: [ Team LiB ]You can learn how to create a page in Word 2002 and publish it to a CMS Web site by referencing Chapter 7.
Enabling Guest Rights on Your CMS Web Site In order for guest users or subscribers to view your site, you'll need to enable this feature in CMS 2002. To do this, navigate to the Security tab in the MCMS Configuration Application (Figure 2-11).
Figure 2-11. Security tab in the MCMS Configuration Application •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. From the Security tab, click the Configure button and then select Yes from the Allow Guests on Site drop-down menu (Figure 2-12). thearchitecture, account thatthen guests will you be automatically This thorough reference explains the Enter product shows how to createlogged and in as, and then click OK. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A runningFigure example 2-12. is used throughout book to illustrate access how important CMS features are Enablingthe guest account in the Security implemented in real-world Web siteConfiguration development. Inside you'll find answers to such questions area as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
Installing the CMS Documentation Only ISBN: 0-321-19444-6 Pages: 1136
If you need to install the CMS documentation that ships with CMS 2002, then you'll simply need to copy the .chm files from the installation CD to your local hard drive. There is no separate installation program for installing the CMS documentation by itself. The .chm file will run on its own without running any installation routine. The .chm files can be found in the documentation "This is one of those rare books that you will read to learn about the product and keep folder on the server CD-ROM. These documents are also available from Microsoft's Web site at rereading to find those tidbits that you missed before." http://www.microsoft.com/cmserver/default.aspx?url=/CMServer/techinfo/productdoc/. —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Uninstallng CMS Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft has made uninstalling simple. If you ever need to uninstall CMS 2002, then you can
use the Add/Remove Programs utility in the Control Panel. Alternatively, you can run the CMS Microsoft Content Management Server 2002: A Complete Guide is the first book that explains setup program and select to run none of the features on your server. This too will uninstall CMS how to effectively unlock the power of CMS. Administrators and developers alike will learn how from your server. When you select to uninstall CMS, you will not affect the CMS database or to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and the files on the file system. API to manage content on the Microsoft platform. This procedure is the same for the AC and the Site Manager too. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Upgrading from CMS 2001 the book to illustrate how important CMS features are running example is used throughout implemented in real-world Web site development. Inside you'll find answers to such questions as: Please reference Chapter 37 on how to upgrade from CMS 2001 to CMS 2002. That chapter is devoted to this function. However, there are a couple of things to note here: Chapter 6: How do you customize workflow? Your CMS 2001 database will be upgraded by the DCA when the CMS 2002 setup is run. Chapter 10:you'll Howwant do you for Microsoft Management 2002 Therefore, to develop ensure that you selectContent to run the DCA after Server setup is(CMS) complete. using Visual Studio .NET? The DCA will upgrade the schema of the CMS 2001 database to accept the new objects in Chapter 17: How do you establish user rights? CMS 2002. Chapter doayou best deploy totemplate your organization's needs, size, The DCA22: will How create template file forCMS eachaccording CMS 2001 and will delete historical and resources? revisions of templates. Chapter How do you publish data? Templates that mirrors the CMS 2001 DCA will 32: create a directory calleddynamic IIS-NR named
template [ Team LiB ] gallery hierarchy. Placeholders are also converted to use the correct placeholder definition. Resources that were embedded in the templates are moved to the file system. Hence, if you have any templates in CMS 2001 that will rely on embedded information, they may not work properly in CMS 2002.
Installing CMS 2002 with SP1 on a Windows 2003 Server To install CMS 2002 with SP1 on a Windows 2003 Server, you'll need to perform the installation as we described earlier in this chapter. However, it is important to note that you should not launch the DCA until after you have installed SP1. Therefore, once CMS is installed, do not select the Launch Database Configuration Application check box. Let the installation finish, then install SP1 for CMS, and then run the DCA. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
Remember that Windows 2003 installs without IIS, so you'll need to install IIS 6.0 with the components ASP.NET, ASP, and server side includes before you install CMS or SP1.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In Windows 2003, the maximum amount of allowed data upload is configurable in IIS. Publisher: Addison Wesley However, the default number is too low for CMS resources. You'll need to raise this limit to at Pub Date: October 31, 2003 least 50MB. For information on how to do this, please see the SP1 documentation. XML code ISBN: will need to 0-321-19444-6 be added to the metabase.xml file, and then services will need to be restarted. Pages: 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we have highlighted how to install CMS 2002. We have seen that installation is not difficult, but if there are misconfigurations on your server, setup will notice this and inform you of the problem before continuing the routine. Installing CMS server, in the larger scheme of things, is probably the least of your problems. Understanding the architecture of CMS and knowing how to plan for a CMS implementation is crucial if you are going to be successful in your implementation. In the next chapter, we'll discuss the architecture of CMS. Then, in Chapter 4, we'll discuss the planning issues surrounding • Table of Contents a CMS implementation. Both chapters are crucial, so it's time we go on to Content learning about andServer understanding the architecture of CMS 2002. Microsoft Management 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 3. CMS Architecture When Microsoft Content Management Server (CMS) was envisioned, it was designed to do something that was not popular. At that time, most people felt that dynamically assembling Web pages was not a good strategy—especially on a public-facing Web site. The main reason for this was the potential performance implication. Sites that consisted of static pages did not have to spend server resources generating HTML. But this is precisely what CMS was designed to do. Today it is clear that this practice has become extremely popular. Many sites are moving toward serving up pages of dynamic content. People expect personalized sites that offer them real-time information. They expect dynamic Web sites. Technologies such as CMS make this • Table of Contents possible. Microsoft Content Management Server 2002: A Complete Guide
Furthermore, theLonder design of CMS traditionally static concepts By Bill English, Olga , Shawn Shellexposes , Todd Bleeker , Stephen Cawood
as programmable objects. For example, CMS developers can programmatically access properties of a CMS page. This enables them to build content-centric applications on top of CMS. Publisher: Addison Wesley
In this chapter, we31, will discuss the architecture of CMS. Although the discussion might be a bit Pub Date: October 2003 "low level," knowing how a program is put together will help you take full advantage of its ISBN: 0-321-19444-6 potential. Pages: 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
The History of CMS Content Management Server was originally developed in Canada at NCompass Labs Inc. as ActiveEnterprise. The prefix "Active" was a reference to NCompass's work in the creation of the ActiveX technology. The software was later renamed Resolution. Some components within CMS continue to use the naming conventions of "AE" and "RE". Microsoft Corporation acquired NCompass Labs in 2001 and renamed the software Microsoft Content Management Server. Shortly after the acquisition, Microsoft released CMS 2001. CMS 2001 was essentially a point release of NCompass Resolution 4.0. •
[ Team LiB ]
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Architecture—Overview Figure 3-1 shows a high-level representation of the CMS architecture. It is clear that there are a number of components and technologies involved. These components work together to create the functionality present in CMS. There are four basic elements involved in the CMS architecture: A database for storing information •
A Web server for presenting pages Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The CMS software
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Connectors to integrate functionality from other sources Publisher: Addison Wesley
Figure 3-1. CMS architecture
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions It is not surprising that CMS uses SQL Server 2000 as its data store. CMS pages are presented as: using the Internet Information Services (IIS) Web server. In addition, CMS integrates with IIS to produce other functionality. Examples of this are described later in this chapter. The CMS 6: isHow do you serverChapter software installed oncustomize a system workflow? running Windows 2000 Server and IIS 5.0. CMS 2002 SP1 will support Windows 2003 Server and IIS 6.0. The CMS server software also enables Chapter 10: Howusers do you Microsoft Content Server (CMS) 2002 connectors that allow to develop populatefor CMS template pages Management with content generated by other using Visual Studio .NET? applications—for example, Microsoft SharePoint or custom Web services applications. Chapter 17: How in domind you establish rights? has an important role that is enmeshed It is important to bear that eachuser component with the roles of the other components. Some components may be used more often than Chapter 22: How do you best deploy CMS according to your organization's needs, size, others, but few could be removed altogether. In the following sections, we will take a granular and resources? look at each component. We will learn about the component's functionality, the services it performs, and how it integrates into the overall CMS picture. There is much to learn, so let's Chapter 32: How do you publish dynamic data? get going.
[ Team LiB ] [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
History of a CMS Page Request To clarify an important part of the CMS server architecture, let's trace the path of a CMS page request (Figure 3-2). First, the client requests a CMS URL. This request goes to IIS and passes through the Internet Server Application Programming Interface (ISAPI) filters loaded on the server. The CMS ISAPI filter examines the URL to see if it maps to a posting in the CMS server. If there is a matching posting, the URL is modified to point to the ASPX template file for the posting. The new URL also includes a query string that specifies the posting to render. For example, the URL homepage.htm might point to a posting that uses a template file called home.aspx. The URL would be modified to be /home.aspx?NRNODEGUID="xxxxx," where "xxxxx" is the Globally Unique Identifier (GUID) of homepage.htm. This URL is returned to IIS, • Table of Contents and it runs the specified ASPX page to A render theGuide posting. In the live site mode, CMS can Microsoft Content Management Server 2002: Complete translate this GUID-based URL to a more readable hierarchical URL (e.g., ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood http://www.botsconsulting.com/home.htm).
Figure 3-2. The path of a CMS page request
Publisher: Addison Wesley
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter How do you for Microsoft Content Management (CMS) 2002 To create the 10: page's HTML, IISdevelop runs the specific ASPX page template. ThisServer page may contain Visual Studio .NET? serverusing controls and a code-behind page that interacts with the CMS system. If the needed information has not been requested before, the CMS server requests the required content and Chapter 17: dodatabase. you establish rights? resources from theHow CMS If theuser page has been requested before, the many CMS caching strategies limit trips to the database. This dynamic page assembly process is one of the Chapterfeatures 22: HowofdoCMS. you Each best deploy according yourand organization's needs, size, fundamental time anCMS author edits ato page goes through the CMS and resources? workflow, the changes are saved by the CMS system. The next time the pieces are requested, the updated HTML will be served to the user. By combining the CMS caching features with Chapter 32:caching, How doityou publish to dynamic data? ASP.NET output is possible serve up ASP.NET pages much faster than with regular
pages. [ASP Team LiB ]Considering that CMS 2001 only supported ASP, this provides a significant improvement over CMS 2001 performance. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Architecture—Component Discussion These are the CMS components: CMS server CMS database Web Author •
Table of Contents Web Author .NET
Microsoft Content Management Server 2002: A Complete Guide
Authoring ByBill English , Olga Connector Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Templates and placeholder server controls Publisher: Addison Wesley
Placeholder objects
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Site Manager Pages: 1136
Visual Studio .NET client Publishing API "This is one of those rare books that you will read to learn about the product and keep Site Deployment/SDAPI rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Sample data Content Management Server (CMS) is fast becoming a vital content-management tool that Database Configuration Application (DCA) helps administrators and developers handle the ever-increasing amount of content on their Web sites. an authoritative ServerHowever, Configuration Application source (SCA) of product information has been missing . . . until now. Content Connector (provided with the Microsoft Solution for Internet Business, or MSIB) Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlockcan thebe power of CMS.according Administrators developers alike will learn how Essentially all the parts categorized to fourand distinct purposes: to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Managing and rendering content This thorough reference explains the product architecture, then shows you how to create and Authoring edit content andcontent use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Developing templates running example CMS is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Managing CMS servers
[ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Managing and Rendering Content Internet Information Server Layer The IIS server is at the top level of a CMS deployment. Just as Microsoft SQL Server 2000 is fundamental to the CMS server tier, Microsoft IIS is essential to the CMS front end. CMS is not a Web server; IIS is the application that serves up the pages to a Web browser. CMS installs two ISAPI filters: Resolution filter and Resolution HTML Packager. The first ISAPI Table of Contents filter recognizes when a request for a CMS page is made and rewrites the URL to point to the Microsoft Content Management Server 2002: A Complete Guide actual template file. The Resolution filter is the main filter responsible for detecting CMS URLs By Billtargeting English, Olga Londer , Shawn Shell, Todd Bleeker , Stephen Packager Cawood and the correct template files. The REHtml filter is only used for one purpose. It aids the historical revision comparison feature by packaging HTML so that it is safe for JavaScript code. The filter puts the HTML into JavaScript variables that the browser then Publisher: Addison Wesley sends to an ASP page on the CMS server. This page then checks the differences between the Date:of October 2003 twoPub pieces HTML31,and uses this information for the compare historical revisions feature. •
ISBN: 0-321-19444-6 Pages: 1136
CMS Server Layer The CMS server layer is one of the original CMS components. When CMS was conceived, the "This one of those rarewith books that you willamount read toof learn the product and keep serverislayer was tasked a tremendous the about processing load. Before the rereading to find those tidbits that you missed before." Publishing API (PAPI), the Authoring Connector, or even the Web Author came along, the —Gary Bushey, SharePoint ServerAtMVP server did almost all of the work. that time, the Site Manager was the only interface to the server layer. Both authors and administrators used the Site Manager to do their jobs. However, Content Management Server (CMS) is fast becoming a vital content-management tool that as CMS has evolved, the work has been distributed over a number of components. Authoring, helps administrators and developers handle the ever-increasing amount of content on their for example, has been removed entirely from the Site Manager. Web sites. However, an authoritative source of product information has been missing . . . until now. The CMS server is one of the only components that write changes directly to the CMS database. The private server object called AEServer is used for such interactions. There are some CMS Microsoft Content Management Server 2002: A Complete Guide is the first book that explains features that are only exposed from within the AEServer API. For example, CMS user rights how to effectively unlock the power of CMS. Administrators and developers alike will learn how management is only available through the Site Manager; it is not exposed through the PAPI. At to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and this time, there is no plan to expose AEServer to CMS customers. However, the CMS group at API to manage content on the Microsoft platform. Microsoft is considering how they could expose the same functionality through the PAPI. This thorough reference explains the product architecture, then shows you how to create and There are few components that interact directly with the CMS server. The Site Manager client is edit content and use the workflow. Topic coverage includes CMS administration and security, one of these interfaces. The Site Manager is used by CMS users to perform actions such as the Publishing API, deployment options, site configuration, and template development. A creating or assigning rights to resource galleries and other CMS containers. Developed before running example is used throughout the book to illustrate how important CMS features are the introduction of the PAPI, the Site Manager communicates directly with the CMS server. implemented in real-world Web site development. Inside you'll find answers to such questions Originally, the Site Manager was the only exposed interface to the CMS server. Partially for this as: reason, it is also one of the components that can be used remotely over HTTP. Two other components that interact directly with the CMS server are the SCA and the DCA. These components later in this chapter. Chapterare 6: described How do you customize workflow?
The CMS server also do responsible for managing theContent various Management CMS caches. Server The following Chapter 10:is How you develop for Microsoft (CMS) 2002 sections willVisual explain the purpose using Studio .NET? of these caches. Chapter 17: How do you establish user rights?
CMSChapter Server Caches 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? Caching Background
of ]the architecture of CMS, caching plays a very important role. For example, .NET [Because Team LiB output caching can improve performance by 100 to 200 times. The CMS server also uses memory caches to enhance system performance. Instead of retrieving the information from the database every time the information is required, CMS temporarily stores the most frequently used data in the server memory caches. The CMS server maintains memory caches and a disk cache for resources. Together, these caches allow the server to readily access data and files that are stored in the database. Examples of this data include CMS template metadata and placeholder content. Here is a description of the various types of caching that CMS uses.
.NET Output Caching •
Table of Contents
.NET output caching can cache the rendered HTML of Web Microsoft Content Management Server 2002: A Complete Guide
pages. When a cache hit occurs, the entire rendered page can be served to the client. It is possible that no CMS template code ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood would be invoked. This offers a large performance increase because very little needs to be done to fulfill the request. Other than some rights checking, all CMS has to do is return the cached HTML. Publisher: Addison Wesley
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Placeholder Definition Caching Pages: 1136
This cache exists only in managed code. When a template is accessed, the particular version of the placeholder definitions contained within it is used as an index to the inflated placeholder definitions. Because the definitions are inflated using XmlSerialization, there is a performance "This is one of are those rareMultiplying books thatthat youhit willover readevery to learn about the and is keep hit when they used. placeholder ofproduct every page rereading to find those tidbits you missed before."do not change very often. This makes unacceptable. Fortunately, thethat placeholder definitions —Gary SharePoint MVP them a Bushey, prime candidate for Server caching. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Fragment Cachingan authoritative source of product information has been missing . . . until Web sites. However, now. Fragment caching involves gathering chunks of HTML and storing the content for later use. In Microsoft Content Management Server 2002: A Complete Guide can is the first book In that ASP, this is the only form of caching that the template designer implement. theexplains case of how to effectively unlock the power of CMS. Administrators alikewith will learn content blocks—that are used in many pages—it still has its and usesdevelopers in conjunction .NET how to enhance theirFor Web servers'all scalability, flexibility, and extensibility by code, using and CMSthis features and output caching. example, pages may share the same navigation code may API to manage content on the Microsoft platform. be expensive to generate. If the cache hit is low on a large number of the pages, the output cache may not have a lot of use. In this scenario, the template designer could generate the This thorough reference the product architecture, then shows you how to create and navigation code once for explains the entire site and cache this fragment. All subsequent page edit contentwould and use Topicnavigation coverage HTML. includes CMS administration and security, renderings usethe theworkflow. pregenerated the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions String Caching as:
Quite a few strings are repeated often in CMS. For example, every page has a list of placeholders. areyou 10,000 pages workflow? loaded into memory based on the same template with Chapter If 6:there How do customize 10 placeholders, the 10 strings are replicated 10,000 times in memory. Thus, it makes a lot of Howstrings do youand develop Microsoft Content Management (CMS) 2002 senseChapter to cache10: these reuse for them via shallow copying. In orderServer to increase the using Visual Studio effectiveness of the cache.NET? and to decrease the time spent in critical sections searching and updating the cache, each type of object that string caching is used on contains a specific string Chapter 17: How do you establish rights?and layout properties have their own string cache. For example, placeholders, node user properties, caches. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Hierarchy Caching Chapter 32: How do you publish dynamic data?
a collection object that contains the list of child GUIDs for a given node. The collection [There TeamisLiB ] cache keeps track of these objects, as well as a backward list that maps every node to its parent collection. This allows for quick lookups when you are moving nodes, so that you can remove a node from the old parent and add it to the new parent easily. Similar to the node cache, the collection cache is represented by an LRK Hash table that maps the GUID to a collection class. This collection class is simply a list of GUIDs of child nodes. The child nodes themselves are not present in this collection. The collection only contains references to them. Since CMS is running in a multithread process, cache access conflicts could compromise the integrity of the server. To prevent this, a special resource synchronization mechanism called "WNT critical section" is used to prevent conflicting access among different threads. Since CMS runs within the IIS process, CMS does not manage these threads. IIS schedules different HTTP requests to be processed by different threads.
• Table Cache of Contents Disk-Resident Microsoft Content Management Server 2002: A Complete Guide By Bill English , Olga Londera, Shawn Shell Todd Bleeker,or Stephen When a user uploads file into a ,placeholder adds Cawood a file to
the CMS resource gallery, these files are stored within the CMS database. Examples of these resources are image files, Microsoft Word documents, and Microsoft PowerPoint presentations. These resources tend to be big Publisher: Addison Wesley (100K or more), and it may be slow to retrieve them from the database every time a user Pub to Date: October 31, 2003 wants access them. ISBN: 0-321-19444-6
The job of the disk-resident cache is to store the most often used resources on the server file Pages: 1136 system. Since local file access is much faster than reading an object file from a database, the retrieval of information is greatly improved. This disk-resident cache also provides a temporary holding place for all URL-accessible files. In "This is one of those rare books that you will read to learn about the product and keep order for IIS to access the resources, these files must be stored on the local file system and rereading to find those tidbits that you missed before." referenced by an IIS virtual directory. These files are not deleted once the HTTP request is —Gary Bushey, SharePoint Server MVP complete; they are stored on the file system so that they are ready to be downloaded by future users. This disk-resident cache is emptied every time the system starts. It is important to note Content Management Server (CMS) is fast becoming a vital content-management tool that that CMS templates are persistent files, so they are not cached by the disk-resident cache. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Node Cache
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock the power CMS.are Administrators and developers willare learn how Onceto the CMS server is running, andofusers accessing the system, node alike objects to enhance their Web servers' scalability, flexibility, and extensibility using CMS features and instantiated in the server. These objects include concepts such as theby CMS channels, postings, API to manage content on the Microsoft platform. template gallery items, and resource gallery items. These objects are then filled with information from the relational database. Some of these node objects, known as the shared This thorough explains product architecture, then shows you howtheir to create and objects, stay inreference IIS server processthe memory space. These shared objects retain edit content so and usethey the can workflow. Topic coverage andthe security, information that possibly be reused by includes the nextCMS user administration request. Because the Publishing deployment options, every site configuration, and template database does API, not have to be accessed time, information retrieval development. is accelerated.A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web these site development. Inside you'll find answers such questions In order to maintain and locate objects and their relationship with the to database, a special as: static control object is used. This object is called the node cache. The node cache stays in memory and holds references to the most often used nodes. This increases performance because it keeps more objects in memory and minimizes the calls to the SQL server. The size Chapter 6: How do you customize workflow? of the node cache is set in the SCA (Figure 3-3). Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Figure using Visual Studio3-3. .NET?The SCA cache configuration settings Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Date: October 31, 2003 ThePub node cache periodically checks for changes in the database. This check happens every six ISBN: seconds and0-321-19444-6 on every edit request. Only nodes that have been modified are removed from the cache.Pages: 1136
Node Collection Cache "This is one of those rare books that you will read to learn about the product and keep rereading to find those that you missed before." between child nodes and their parent A node collection objecttidbits is used to store the relationship —Gary Bushey, SharePoint Server MVP node. It contains the parent node GUID and the list of GUIDs associated with the child nodes. As with the node cache, after the node collection object is instantiated, it can be initialized from Content Management Server (CMS) These is fast node becoming a vital content-management tool process that information stored in the database. collection objects remain in the server helps administrators and developers of content onIn their memory as long as there is sufficienthandle space. the Thisever-increasing allows them to amount be accessed quickly. order Web sites. However, anthese authoritative source objects, of product information beenobject missing . . . until to maintain and locate node collection a special statichas control is used. This now. is called the shared node collection cache. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how User Nodetheir Cache to enhance Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Currently, CMS users must be either NT users or Active Directory users. In order to find This thorough reference explains the product thenisshows youThe how to create and information about a particular user quickly, a architecture, user node cache created. user node cache edit content the workflow. includes CMS andinsecurity, consists of a and mapuse between the userTopic namecoverage and the database ID ofadministration the AEUser table the the Publishing options, configuration, and template development. A ID. database. The API, map deployment enables a user namesite to be quickly translated to the proper database running example is used throughout the book to illustrate how important CMS features are Before a CMS in asset is readWeb or accessed, the user'sInside rights you'll are verified by the to CMS server. A implemented real-world site development. find answers such questions page node contains a reference to a list of rights groups, and each rights group contains its as: members. Using the map, the server can quickly determine the database ID of the user and determine what rights the user has to the appropriate page node. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
High-Level Caches using Visual Studio .NET?
ThereChapter are a series of caches inside CMS user that are used to speed up certain operations. High17: How do you establish rights? level caches are contained entirely within the CMS system. They are not accessible via any API. Chapterof 22: Howcaches do youisbest deploy CMS according to your needs, size, The purpose these to store frequently used items thatorganization's are computationally and resources? expensive. One example of this is the URL transformations that are done for the ISAPI filter. The same URL is transformed into the same new URL, so it does not need to be calculated 32:would How do you publish dynamic data? everyChapter time. This normally involve traversing the channel hierarchy, grabbing and inflating all the items, comparing their names, drilling down to the next level, and grabbing the
[appropriate Team LiB ]template. Since the information does not normally change, we can simply store an entry in a cache that maps the friendly URL to the file system URL.
Unlike the node cache, these caches are not able to just toss out one item when a node changes in the database. The reason for this is that if you happen to rename your root CMS channel, every URL in the entire system will be different. This is the one problem with the highlevel caches; they are based on an aggregation of data. On the plus side, changes to the system are generally few compared with the number of page hits. There are also high-level caches for the rights of the guest user, placeholder content inflation, resource lookup, URL generation, and the fragment cache that can be used with ASP templates.
The Sandbox •
Table of Contents
The sandbox is where transient uncommitted data is held and operated on. It is quite similar to the master cache in that it contains a collection cache, a series of interfaces to allow for By Bill English, Olga Londer, Shawn , Todd Bleeker , Stephen Cawoodnode cache retrieved from the manipulation of nodes, and aShell node cache. This is a smaller master cache. Microsoft Content Management Server 2002: A Complete Guide
Addison ThePublisher: node cache in Wesley a sandbox is owned entirely by the sandbox for the duration of the request. It cannot beOctober accessed by any other session, which allows it to be free of thread Pub Date: 31, 2003 synchronization. Whenever a node in the sandbox cache is modified, it is cloned, the original is ISBN: 0-321-19444-6 removed, and the clone is kept to be operated on. This again makes sure that object Pages: 1136 synchronization is maintained. The collection cache in the sandbox is very similar to the node cache in that it is the same object as the master cache, but it is cloned before being operated on.
"This of thosehas rarebeen books that you will to learn about thetoproduct and keep Whenisa one transaction committed, the read sandbox passes itself the master cache to rereading to find those tidbits you missed before." examine and synchronize withthat the master cache's internal state. At this point, modified objects —Gary Bushey, MVP and derived behavior (high-level cache and so on) is are moved over,SharePoint collections Server are updated,
enacted. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until CMS Database now. Microsoft Content Management Server 2002: A Complete Guide isThe thearchitecture first book that explains At the base level there is a Microsoft SQL Server 2000 database. of CMS relies how to effectively unlock theServer power2000. of CMS. Administrators and layer, developers alike how heavily upon Microsoft SQL Without the database it would notwill belearn possible to enhancethe their Web servers' scalability, flexibility, and extensibility by using CMS features and to provide key features of CMS. API to manage content on the Microsoft platform. The CMS server executes complex procedures against the database. These actions cannot be This reference explains the productthe architecture, you how create and easilythorough reproduced by manually manipulating data store.then For shows this reason, the to database edit content and use the workflow. Topic are coverage includes CMS administration schema is not published, and customers discouraged from direct interaction and withsecurity, the CMS the Publishing deployment site configuration, and with template development. database. CMSAPI, is designed suchoptions, that almost all the interaction the CMS database isA running is used throughout book illustrate how important CMS features handled example by the CMS server layer. By the using theto CMS API, customers can be assured thatare their implemented in real-world Web site development. Inside you'll find answers to such questions interface to the database has been fully tested. as: The database schema consists of 40 tables. CMS data is stored in various formats within these tables. Opening the AEUser table, for example, plainly shows the users and groups that have How dorights you customize workflow? been Chapter added to6: the CMS model (Figure 3-4). Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
Figure 3-4. Studio AEUser table shown in SQL Server Enterprise Manager using Visual .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[However, Team LiBfinding ] information stored in a particular placeholder is more difficult. The reason for this is that CMS was designed to be used through the PAPI, not via direct access to the database. Placeholder data is often stored in binary large object (BLOB) format and cannot be easily found or read. Resources within placeholders are stored in the "blob" table, but placeholder data is stored in the NodePlaceholderContent table. It is difficult to find placeholder data, because CMS assembles various pieces of content from this table.
Although it is possible to create a cluster of CMS servers, CMS only supports an "active passive" SQL Server cluster. The reason for this is that the CMS 2002 database is restricted to one Microsoft SQL Server 2000 machine. In contrast to Commerce Server 2002, it is not possible to split CMS tables between different Microsoft SQL Server 2000 boxes. Also, the CMS server will recognize if tables have been added or deleted. Altering the database schema in either of these ways will render the CMS database invalid for new installs or upgrades. When the CMS server is in read-only mode, roughly 90% of interaction with the database is Table of Contents through stored Structured Query Language (SQL) procedures. An example of this is a read-only Microsoft Content Management Server 2002: A Complete Guide CMS server caching CMS pages. When the server is writing—such as creating new CMS ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood pages—approximately half of the database queries are ad hoc server queries and the other half are stored procedures. •
Publisher: Addison Wesley As mentioned earlier, the schema for the CMS data store is not published, and direct requests Pub database Date: October 31,not 2003 to the are supported by Microsoft. However, many people are curious about the ISBN: 0-321-19444-6 architecture of the data store. Here is some information that will allow you to perform readonly tasks the CMS data store. One of the more interesting tables in the CMS database is Pages:on 1136 the Node table. This table contains the core information about the CMS system.
Table 3-1 shows some examples of node types that are stored within the CMS Node table. "This one of those rare books that you will read toqueries learn about thethe product and keep Under Using is this information, you can do simple read-only against CMS database. rereading to find those tidbits that you missed before." no circumstances should write operations be performed directly against the database. The PAPI —Gary Bushey, SharePoint Server MVPto the CMS database. Note that since the schema has is the appropriate interface for writing
not been released, these queries may not work on future releases of CMS. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Table 3-1. CMS Node Types
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' using CMS features and Node Type scalability, flexibility, and extensibility Type by of Object API to manage content on the Microsoft platform. 1 Server This thorough reference explains the product architecture, then shows you how to create and 4 content and use the workflow. Topic coverage Channel edit includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A 16 Page or posting running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll 64 Resource galleryfind answers to such questions as: 256 Resource gallery item Chapter 6: How do you customize workflow? 16384 Template gallery
65536 Template Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? These are examples of read-only SQL queries that can be run against the CMS database: Chapter 17: How do you establish user rights? Chapter How do you deploy CMS according to your organization's needs, size, Find the 22: page/posting by best name: and resources? Select * From Node Where type=16 AND name='Page Name' Chapter 32: How do you publish dynamic data? Find the page and posting GUID from the page name:
[ Team LiB ] Select posting.nodeguid posting,page.nodeguid page From Node page inner join node posting on page.nodeguid = posting. followguid and page.name='Page Name' AND page.type=16 and page.isshortcut=0
Find the posting from the page followguid: Select * From Node Where followguid = '{87B29228-3CFC-426A-8DD0-7B5E33CXXXXX}' Find information about the posting (add your own GUID): Select * From Node Where nodeguid = '{0369528B-943B-40A0-8B57-C5E3578XXXXX}' [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Authoring Content Web Author Many CMS users will only use the Web Author interface. In fact, many probably think that the Web Author is CMS. Since the CMS 2002 release, all authoring happens through this thin client interface. The Web Author is built using ASP, JavaScript, and the PAPI. A few elements, such as the toolbar and the HTML placeholder control, are ActiveX components. The Web Author consists of aTable number of user interfaces and code that interacts with the PAPI. Because the Web • of Contents Author isContent a thin Management client interface, can be used remotely Microsoft Serverit2002: A Complete Guide over HTTP. It is also possible to use HTTPS with the Web Author interface. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The Web Author default install location is C:\Program Files\Microsoft Content Management Server\Server\IIS_NR\System\WBC. The directory is called WBC because the Web Author was Publisher: Addison Wesley originally called the Web Browser Client. Pub Date: October 31, 2003
Inside the directory are the following folders: ISBN:WBC 0-321-19444-6 Pages: 1136
Customizable: This folder contains the Web Author files that are still supported after customer modifications. For example, the Hooks directory contains scripts that allow ASP access to some Web Author events. "This is one of those rare books that you will read to learn about the product and keep rereading to findMost those that you missed Internals: of tidbits the Web Author code isbefore." under this directory. For example, the user —Gary Bushey, SharePoint Server MVP interfaces for the Web Author console are located in the WBCFuncPages directory. The legal statement (InternalsDirectoryLegal.txt) provided in these directories clearly states Content Server (CMS) to is be fastmodified. becoming a vital content-management tool that thatManagement these files are not meant helps administrators and developers handle the ever-increasing amount of content on their Web sites. However,This an authoritative source of product been missing . . until SiteInterface: directory contains only one file,information Placeholdershas Support.inc. The. file is now. simply a warning that this former interface has been deprecated. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Web Author .NET to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The .NET version of the Web Author has been designed to offer the same functionality as the This thoroughversion. reference explains the two product architecture, thensimilar. shows you how this to create and nonmanaged Therefore, applications are very Without similarity, edit content use the workflow. Topic includes CMS administration and security, people mightand have become frustrated by coverage two different user experiences. The Web Author .NET the Publishing API, deployment options, siteJavaScript configuration, development. A interface and dialogs were developed using and and .NETtemplate server controls. running example is used throughout the book to illustrate how important CMS features are implemented in real-world siteAuthor development. you'll Files\Microsoft find answers toContent such questions The default install location Web for Web .NET is Inside C:\Program as: Management Server\Server\bin. Unlike the ASP version of the Web Author, the managed version is compiled. This is the way that .NET works, but for CMS customers, there are positive and negative arguments about the compiled version of Web Author. Some people argue that Chapter How do are youhurt customize customers and6:partners by the workflow? fact that they are not able to view all of the code. However, other people feel that the compiled version of the code has advantages. Two common Chapter 10: How you develop fornot Microsoft (CMS) 2002 positive arguments aredo that hackers are able to Content comb theManagement code lookingServer for weaknesses and using Visual Studio .NET? that customers can be sure that their Web Author code has not been inadvertently altered. 17: How do the you Web establish user rights? On anChapter ASP.NET CMS site, Author .NET handles all the authoring duties. It is not necessary to install the ASP version of the Web Author if the site will not be using it. Web Chapter 22: How do you best deploy CMS according to your organization's needs, size, Author .NET also supports HTTPS. The architecture of the Web Author .NET is discussed in and resources? detail in Chapter 30. Chapter 32: How do you publish dynamic data?
[Authoring Team LiB ]
Connector
The Authoring Connector is a new interface for CMS. Introduced in CMS 2002, this feature promises to be popular with CMS authors. The Authoring Connector component enables content creation and editing directly through Microsoft Word XP. The Authoring Connector consists of a client-side component and a server-side component. Client side: A Word add-on featuring a user interface wizard. This wizard allows CMS authors to easily specify the location for their content to be published. Server side: ASPX files and ASP.NET server controls that write to CMS via their interaction with the PAPI. The Authoring Connector client uses the Word API to convert Word documents into HTML. The
• Table of Contents HTML and any inline images are then submitted to a designated placeholder within a CMS page. Microsoft Content Management Server 2002: A Complete Guide
After that submission, a link to the newly created Web page is stored in the properties of the or replace the page at a later date. The next time the same Word document is submitted, Authoring Connector recognizes the reference to the page and allows the user to update the corresponding page.
By Bill English , Olga Londer , Shawn Shell , Toddfor Bleeker Stephento Cawood Word document. This makes it easier the ,author update
Publisher: Addison Wesley
ThePub default location the Authoring Connector is C:\Program Files\Microsoft Content Date: October 31,for 2003 Management Server\Authoring Connector. There are a number of subfolders installed in this ISBN: 0-321-19444-6 client-side location. Each numbered folder corresponds to a Locate Identifier (LCID) and Pages: 1136 contains the localized version of the client-side portion of the Authoring Connector application. This allows CMS authors from all over the world to use their localized versions of Microsoft Word XP to create and edit content on CMS servers. "This is one ofisthose rare the books that you willportion read to product and keep Although this currently only localized oflearn CMS,about other the components have been rereading tobe find those tidbits you missed before." designed to localizable. For that example, the Web Author, the Web Author .NET, and the Visual —Gary Bushey, SharePoint Server MVP to be localizable. Based on this, various people have Studio integration have all been designed produced their own localized versions of the Web Author. Also, a white paper on the subject of Content Server (CMS) isfrom fast becoming vitalsite content-management tool that localizingManagement the Web Author is available the MSDN aWeb (http://msdn.microsoft.com). helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
CMS Placeholders
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock the power of CMS. Administrators andyears. developers alike will learn CMS to placeholders have evolved substantially over the last few Placeholders are the how parts to enhance their Web servers' scalability, flexibility, and extensibility using CMS features of a CMS Web page that contain editable content. Placeholders come by in various types, with and API to manage on the platform. special featurescontent associated withMicrosoft each type. This thorough reference explains the product architecture, then shows you how to create and Examples of placeholder types are: edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Image: Can is only contain images running example used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: HTML: Can contain HTML
XML: Contains XML Chapter 6: How do you customize workflow? Placeholders consist of three parts: Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Placeholder object: The underlying object that controls the behavior of the interface to the placeholder Custom placeholder objects can be created. For example, if you Chapter 17: content. How do you establish user rights? wanted a placeholder that contained a method such as GetPieceOfContent, you might want to create a custom Chapter 22: How do you placeholder. best deploy CMS according to your organization's needs, size, and resources? Placeholder definition: The description of the placeholder that is set from within Visual Studio .NET. Placeholder must be bound Chapter 32: How do you objects publish dynamic data? to a placeholder definition before they can be used. The placeholder definition can be thought of as controlling the behavior of a
placeholder—for example, the XSD that an XML placeholder should validate against. [ Team LiB ] Placeholder server control: The .NET server controls that CMS users actually interact with. Custom placeholder controls can be created to control the rendering of the placeholder object in different modes. The new model for placeholder controls is to use .NET server controls. Placeholder server controls are designed to allow an ASPX template to be bound to placeholder object data. The controls also render the placeholder data in various modes. The model for custom placeholder controls allows developers to choose the controls used for modes such as presentation and authoring. Most of the logic behind these services is provided by the BasePlaceholderControl object. Custom placeholder server controls built on top of this object only need to specify the logic for data reading, data writing, and rendering. The rendering implementation of placeholder server controls is not restricted. This leaves the logic for rendering authoring or presentation display up to the CMS developer. Rendering is • Table ofthe Contents generallyContent handled by aggregating otherA controls specifically for this purpose. These Microsoft Management Server 2002: Completedesigned Guide controls could be ASP.NET controls (e.g., a TextBox or Literal), or they could be more complex ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood custom controls. The BasePlaceholderControl provides the implementation for loading data into placeholders and saving data from placeholders into the CMS database. Publisher: Addison Wesley
The placeholder server control is not responsible for committing data to the database. It is Pub Date: October 31, 2003 notified by the BasePlaceholderControl when it should be loading content from the bound ISBN: 0-321-19444-6 placeholder object and when it should be saving content. Therefore, the placeholder is only Pages: 1136storage mechanism. It appears as though the placeholder server control reads used as a data and writes the data. But within the implementation of the placeholder server control, it is the PAPI that is responsible for committing data to the CMS database. Beforeisthe layerrare wasbooks added, placeholders were thatproduct rendered from "This one.NET of those that you will read to COM learn objects about the andcontents keep the CMS database. Thistidbits interface hidden by the deprecated Template Designer rereading to find those thatwas youpreviously missed before." interface. In other words, CMS developers did not need to write any code to get their —Gary Bushey, SharePoint Server MVP placeholders to work; the code was automatically added to the template by the Template Designer.Management In CMS 2002, the template been amoved from the CMS database tothat the Content Server (CMS) isfiles fast have becoming vital content-management tool server file system. This means that the CMS server no longer manages this placeholder code. helps administrators and developers handle the ever-increasing amount of content on their To create ASP sitean with CMS 2002,source CMS developers to manage their Web sites.an However, authoritative of productneed information has this beenconnection missing . .in. until templates. The ASP version of the placeholder controls might be removed in the next release of now. CMS. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Whentoyou are creating custom placeholder controls, the contained the how how effectively unlock the power of CMS.server Administrators and logic developers alikewithin will learn controls is only from within an ASPX file. Ifand youextensibility happen to need this logic to enhance theiravailable Web servers' scalability, flexibility, by using CMS outside featuresa and server control, you mayon need duplicate your effort. One example of this would be if you were API to manage content theto Microsoft platform. using the control through a Web service. A better solution in this scenario is to put that logic into athorough custom placeholder and then a server control then to interact In to this way,and the This reference explains thecreate product architecture, showswith you it. how create placeholder will beworkflow. available Topic via thecoverage PAPI directly, for CMS use in Web servicesand or more edit content object and use the includes administration security, programmatic access like code behind insite templates. the Publishing API, deployment options, configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions [ Team LiB ] as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Development Publishing API The CMS Publishing API was introduced in NCompass Resolution 3.0. Originally, the PAPI was referred to as the Resolution Object Model (ROM). Before the introduction of the PAPI, Resolution developers used the Template Builder API (TBA). But the TBA only offered a small fraction of the functionality that the PAPI offers today. For example, the properties for pages were read-only. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
Originally, the PAPI was written as a COM-compliant application. The COM interface alone offers used by CMS developers. For example, most CMS developers use the PAPI to create their site navigation. This allows them to take advantage of the dynamic nature of a CMS site. Furthermore, the ASP Web Author Publisher: Addison Wesley component was written on top of this COM layer.
By Billover English , Olga Londer, Shawn Shell, Todd Bleeker Cawood well 400 methods and properties. Today,Stephen the PAPI is widely
Pub Date: October 31, 2003
In CMSISBN: 2002, an ASP.NET managed layer is provided on top of the original PAPI. The 0-321-19444-6 application allows CMS developers to develop ASP.NET WinForm applications on top of Pages: context 1136 the CMS managed layer. Components that use the managed layer of the PAPI include the Authoring Connector, the CMS integration with Commerce Server 2002 (Content Connector), and the new Web Author .NET. "This is one of those rare books that you will read to learn about the product and keep Examples of PAPI applications include: rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Web Author: An ASP application used for CMS page authoring through a Web browser. Content Management Server (CMS) is fast becoming a vital content-management tool that helps Web administrators andAn developers handle the used ever-increasing amount of content on their Author .NET: ASP.NET application for authoring through a Web browser. Web sites. However, an authoritative source of product information has been missing . . . until now. Authoring Connector: An ASP.NET application used for authoring with Microsoft Word XP. Microsoft Content Server 2002: A Complete Guide is the first book that explains Visual StudioManagement .NET client: An ASP.NET application used for developing CMS sites. This how to effectivelyuses unlock of CMS. Administrators and developers alike will learn how application the the newpower CMS application context. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and ASP.NET (and Visual Basic) application that allows for integration API toContent manageConnector: content onAn the Microsoft platform. with Microsoft Commerce Server 2002. This component is provided with the Microsoft This thorough reference explains the product architecture, then shows you how to create and Solution for Internet Business. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Autosession implemented in real-world Web site development. Inside you'll find answers to such questions as: The base object within the COM PAPI is called Autosession3. The Authenticate.inc file creates a variable called Autosession and assigns the PAPI Autosession3 object to it. All other objects, such as Posting Channel, on this main object. In other words, it is necessary to Chapter 6:or How do youdepend customize workflow? create an Autosession object if you wish to use the CMS COM PAPI. You do this by referencing the Resolution.inc file within your ASP page. This fileContent then calls Authenticate.inc, the 2002 Chapter 10: How do you develop for Microsoft Management Serverand (CMS) Autosession objectStudio is instantiated like this: using Visual .NET? Chapter 17: How do you establish user rights? AutoSession = Server.CreateObject("ResolutionObjectModel. Chapter 22:AutoSession3") How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32:also Howhandles do youthe publish dynamic data? Authenticate.inc security for the CMS COM PAPI. A user cannot use the Autosession object unless they have been authenticated as a valid CMS user. A user could
instantiate the Autosession object, but they would not be able to call any of its [actually Team LiB ] methods or properties until they had been authenticated as a valid CMS user. Autosession is automatically instantiated within CMS templates, but it can also be used within any ASP pages that are on the CMS server. In previous versions of CMS, this particular point was hidden from view. The Authenticate.inc file was always readable on the file system. However, the fact that CMS automatically inserted an include statement to include Authenticate.inc was hidden from the end user's eyes. Template files were once stored within the CMS database and edited only using the Site Manager's custom Template Designer. The Template Designer interface did not expose the method used by the templates to automatically instantiate an Autosession object. However, in CMS 2002, the template files have been moved to the file system, and anyone can plainly see how the Autosession object is instantiated. •
Table of Contents
Managed PAPI
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The new ASP.NET interface for the PAPI is a tremendous step forward for CMS developers. Using this interface, developers can program against the CMS PAPI using the Visual Studio .NET Publisher: Addison Wesley environment and numerous ASP.NET languages (including VB.NET and C#). It is this new Pub Date: 31,the 2003Visual Studio .NET integration to be developed. The managed layer of feature thatOctober allowed the CMS PAPI offers access to the PAPI through Interop assemblies. This layer was written ISBN: 0-321-19444-6 using the C# language. Pages: 1136 There are two interfaces within the ASP.NET layer of the PAPI: "This CmsHttpContext: is one of those rare books that you will interface read to learn about the product and keepthe CMS The CmsHttpContext allows managed code to access rereading findinterface those tidbits that youtomissed before." PAPI.toThis can be used develop .NET Web applications on top of CMS. This —Gary Bushey,relies SharePoint MVP provided within IIS. interface on the Server HTTP context Content Management Server (CMS) is fast becoming tool CmsApplicationContext: The application context aisvital newcontent-management to CMS. Although there is that helps currently administrators and developers handle the ever-increasing amount of content on for their no remote interface, the application context is a fantastic step forward CMS Web sites. However, an the authoritative of product information been missing.NET . . . until developers. Using applicationsource context, CMS developers canhas create Windows now. Forms applications. The application context also enables the impressive CMS VS.NET integration. This interface does not require the IIS HTTP context. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock power ofassume CMS. Administrators and developers will alikeonly willinteract learn how Looking forward, you can the reasonably that future CMS components to enhance theirthough Web servers' scalability, and extensibility by has using CMS featurestoand with the server the managed PAPIflexibility, layer. After all, this interface been designed API manage content the Microsoft allowtodevelopers to buildonapplications on platform. top of the CMS server. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Visual Studio .NET Client the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. you'll answers to such questions The Visual Studio .NET (VS.NET) interface is a newInside feature. Thisfind client application depends on as: the Microsoft .NET Framework and the new CMS PAPI application context. The custom Template Designer used in previous versions of CMS has been replaced by this application. Instead of using a custom template authoring environment, CMS developers can use Visual Howtheir do you customize StudioChapter .NET to6: code templates. Theworkflow? client was developed using the CmsApplicationContext class within the managed layer of the PAPI. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using .NET? Because theVisual CMS Studio application context provides a method to authenticate the current Windows
user, CMS developers do not need to log in to this client application. They can open their CMS Chapter 17: Studio How do.NET you and establish user rights? solution in Visual automatically access CMS features such as the placeholder collections and the template galleries. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The Visual Studio .NET integration is not installed by default. The reason for this is that the component is only necessary on developer boxes. The current version of Visual Studio .NET Chapter 32: How do you publish dynamic data? does not support remote connections for client applications such as the CMS integration. For
reason, [this Team LiB ]the CMS VS.NET integration must be installed on the CMS server. The default install location for the client is C:\Program Files\Microsoft Content Management Server\DevTools. Once this component is installed, it allows a CMS developer to work in an extremely powerful development environment. For example, developers can use the Visual Studio integration to manage components of CMS templates that are stored within the database. One of these components is the collection of placeholders that is associated with a particular template. A compelling feature for a CMS developer is the fact that CMS templates can be debugged in VS.NET just like any other ASP.NET pages. Not only can a developer use tools such as breakpoints in their code, they can also debug CMS pages within their specific CMS context. For example, when a CMS developer launches a debugging session, the page can be displayed exactly as a specific CMS user would see it. At any given breakpoint, the local variables will show the values that a specific CMS user would see. This level of contextual debugging has not been offeredTable in the • of past. Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Sample Data Publisher: Addison Wesley To help CMS developers get off the ground, a sample Web site is provided with CMS 2002. The Pub Date: October WoodgroveNet site31, is 2003 an ASP.NET example of how to build a CMS site. The source code for the sampleISBN: site 0-321-19444-6 is also provided on the CMS 2002 CD. Included in this code are a number of Pages: 1136 ASP.NET user controls, and server controls. Examples include the navigation control and the custom XML placeholder control. This sample code is one of the key resources for a new CMS developer.
It is important to mention that the CMS site not bethe used directly askeep the starting "This is one of those rare books that yousample will read toshould learn about product and point for a production CMS site. As written in the CMS ReadMe.html file, it is not a good idea to rereading to find those tidbits that you missed before." build an application on top of the sample objects. The reason for this is that the objects are —Gary Bushey, SharePoint Server MVP accessed by the Site Deployment feature by their GUID. If a site is built on top of the sample objects, Management you could overwrite site by reinstalling sample data. Content Server parts (CMS)ofisthe fast becoming a vital the content-management tool that helps administrators and developers handle the ever-increasing amount of content on their The default install location for the CMSsource WoodgroveNet site ishas C:\Program Files\Microsoft Web sites. However, an authoritative of productsample information been missing . . . until Content Management Server\Sample Data. Microsoft plans to release new sample sites; you now. might want to check the CMS Web site for updates (http://www.microsoft.com/cmserver). Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Content Connector API to manage content on the Microsoft platform.
The Content Connector component is used to integrate CMS with Commerce Server 2002 This thorough reference explains the product architecture, then shows you how to create and features. For example, developers can use the Content Connector to display Commerce Server edit content and use the workflow. Topic coverage includes CMS administration and security, catalog information within a CMS page. Content Connector is not included in CMS 2002. This the Publishing API, deployment options, site configuration, and template development. A component is included with MSIB. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Content Connector is essentially a bridge between the Commerce Server 2002 API and the CMS as: PAPI. It was originally written using VBScript and Visual Basic. In the new version of Content Connector, the ASP pieces have been rewritten against the managed layers of the Commerce Server 2002 API and the CMScustomize PAPI. Theworkflow? Visual Basic components, such as the Personalized Chapter 6: How do you Content Objects pipeline, have remained the same. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? [ Team LiB ] Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Administration Site Manager The Site Manager has probably changed more than any other component of CMS. Originally called the Desktop Client, it was later renamed the Site Builder. At one point, the Site Manager was the only business user interface to the CMS application. Before the PAPI, the Authoring Connector, the Web Author, or the Server Configuration Application, the Site Manager was being used by CMS At that point, almost all authoring and administration was done • Table of customers. Contents using theContent Site Manager. Microsoft Management Server 2002: A Complete Guide By English , Olga Londer, Shawn Shell,were Todd Bleeker , Stephen InBill CMS 2002, authoring features removed from Cawood the Site
Manager. The intent was that the Web Author (and Web Author .NET) would handle authoring, and the new Site Manager would be used purely as an administrative interface. CMS administrators and channel managers can Wesley usePublisher: the SiteAddison Manger for site maintenance tasks. These tasks include administering user roles Date: and October 31, 2003 andPub rights, working with CMS containers. ISBN: 0-321-19444-6
The Site Manager exposes four types of virtual containers: channels, resource galleries, Pages: 1136 template galleries, and user roles. Originally there were five types of containers. Pages were stored in containers called folders. At this time, a distinction was made between a "page" and a "posting." Pages contained content, and postings determined the location and schedule for publication. However, authors found this separation to be confusing, and eventually it was "This is one of those rare books that you will read to learn about the product and keep decided that the folders container would be hidden. Since this change, "page" and "posting" are rereading to find those tidbits that you missed before." used interchangeably. —Gary Bushey, SharePoint Server MVP It is interesting to point out that, under the covers, the folders and pages still exist. The server Content Management Server (CMS) is fast becoming a vital content-management tool that layer was not altered a great deal when this level of abstraction was removed. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until These are the CMS 2002 container types: now. Microsoft Content Management Server 2002: AChannels Completehave Guide the firstrepresentation; book that explains Channels: Contain pages (aka postings). noisphysical they how to effectively unlockcreated the power of CMS. and developers alike will learn how are an abstraction by the CMS Administrators server. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toResource manage Galleries: content onContain the Microsoft platform. Resources can be virtually any type of file. CMS resources. They are stored within the CMS database. This thorough reference explains the product architecture, then shows you how to create and edit content andGalleries: use the workflow. Topic coverage includes CMS administration security, Template Contain templates. In CMS 2002, templates have beenand moved onto the Publishing API, deployment options, site configuration, and template development. A the file system. However, meta information about templates (such as the placeholder running example is used throughout the book to illustrate howThis important CMS is features are collection data), is still stored within the CMS database. information referred to as implemented in real-world Web site development. Inside you'll find answers to such questions the template gallery item (TGI). as: User Roles: Contain user authorization and authentication information. This is one of the few CMS features not exposed through any other interface (including the PAPI). Chapter 6: How do you customize workflow? Note that these containers have no physical representation; they are an abstraction created by Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 the CMS server. using Visual Studio .NET? The properties of the Site Manager shortcut show that the application is called NRClient.exe. 17: How do you establishClient. user rights? This isChapter short for NCompass Resolution The shortcut also shows the path to the ASP interface for the Site Manager (http://localhost/NR/System/ClientUI/login.asp). This is the login Chapter 22: How do you best deploy CMS according to your organization's needs, size, page that is shown when the Site Manager is launched. and resources?
It is possible that the Site Manager will be phased out in the next release of CMS. There are Chapter 32: How do you publish dynamic data? various reasons for this change. If the Site Manager features were available elsewhere, they
beLiB easier to maintain, they could be updated for new features of CMS, and they could be [could Team ] built with remote interfaces. The Site Manager has a remote interface, but this ability is provided through a custom proxy. Since there are better ways to provide remote interfaces, the custom proxy will most likely be removed. Using port 80, the Site Manager client sends and receives XML messages. The proxy was originally written in Java. However, for the CMS Service Pack 1 release, the proxy has been written using the J# managed language. The Site Deployment feature is also partially exposed through the Site Manager. In addition to the Site Manager, it is possible to access Site Deployment through its own API. However, the only graphical user interface for Site Deployment is within the Site Manager client.
Server Configuration Application
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The Server Configuration Application exposes a Web interface for managing CMS sites. The application is written in ASP and is built on top of the CMS server's private Server Configuration API (SCAPI).
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Addison ThePublisher: SCA is used toWesley write CMS settings to the system registry, assign the CMS system account Pub Date: Access October 31, 2003 Lists (ACLs), configure settings within the CMS database, and create file system Control ISBN: 0-321-19444-6 the CMS structure within the IIS metabase. Some of the properties set by the SCA are local to the particular server; other settings are global across a CMS server farm. In the SCA interface, Pages: 1136 the local settings are distinguished by a small server icon. This allows a CMS administrator to easily see whether the setting will affect one machine or the entire server farm.
An example of a default install location for the SCA is "This is one of those rare books that you will read to learn about the product and keep http://localhost:9291/NRConfig/SCAConfigMain.asp. On Windows Server, the default install rereading to find those tidbits that you missed before." location is in the administration Web site. However, XP only supports one Web site, so the —Gary Bushey, SharePoint Server MVP default install location is the less secure default Web site. Content Management Server (CMS) is fast becoming a vital content-management tool that The SCAPI interface is installed via the ServerConfigurationAPI.dll file. The SCA and the Site helps administrators and developers handle the ever-increasing amount of content on their Manager are the only remote administration interfaces to the CMS server. They both function Web sites. However, an authoritative source of product information has been missing . . . until over HTTP, and they handle almost all of the configuration and maintenance of the CMS server. now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Database Configuration Application to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manageConfiguration content on the Microsoft is platform. The to Database Application used to manage the connection between the CMS
server and the Microsoft SQL Server 2000 database. The DCA is triggered automatically during This thorough reference explains the product architecture, then shows you how to create and the CMS server install, but it can also be run manually at any point. A CMS administrator would edit content and use the workflow. Topic coverage includes CMS administration and security, use the DCA to change the CMS database that the server is using. Once CMS is installed, it is the Publishing API, deployment options, site configuration, and template development. A unusual for an administrator to run the DCA. It is more common for CMS developers to use the running example is used throughout the book to illustrate how important CMS features are DCA to change from one development database to another. implemented in real-world Web site development. Inside you'll find answers to such questions as: The DCA application is installed as the file NRDCApplication.exe. The application uses the private SCAPI interface to perform many of the same tasks as the SCA. The DCA also triggers the code necessary for migrating one version of CMS to the next version. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Visual Studio .NET? Siteusing Deployment Chapter 17: How do you establish user rights? The CMS Site Deployment feature has evolved considerably over the last few releases. From its creation, Site 22: Deployment usedbest XMLdeploy packages move CMS objects from one server to size, Chapter How do you CMSto according to your organization's needs, another. Site Deployment Object (SDO) packages can contain various CMS objects. For and resources? example, SDO files (which were previously referred to as Resolution Object Packages or ROP files) Chapter can be used to move CMSpublish template objects, pages, or CMS resources. 32: How do you dynamic data?
files use [SDO Team LiB ] the Windows Cabinet compression format. By changing the .sdo extension to .cab, you can open the package and view the contents. Inside the package are XML files (that describe the SDO file) and various other file types that contain the CMS data. Previously, the Site Deployment feature was only exposed via the Site Manager. However, Site Deployment has recently been enhanced to use a component called the Site Deployment API (SDAPI). The SDAPI allows CMS developers much more flexibility than was previously possible. Using the SDAPI, a developer can write a script that will trigger Site Deployment events. Site Deployment can also be used as part of a backup or versioning strategy. Regular SDO exports can be backed up and used to store versions of the CMS site. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary CMS has been designed to address the Webmaster bottleneck. To eliminate this problem, CMS uses a number of different components and interfaces. The components serve four basic purposes: to enable dynamic Web page rendering, to help authors publish their content, to manage the CMS server, and to enable developers to build CMS sites. The server component is the heart of CMS. Previously, this piece was responsible for a good portion of the CMS workload. However, over the last few releases, CMS has evolved and distributed a number of functions to other components. The primary client used to be the Site Manager application. However, the Web Author applications and the Visual Studio .NET • Table of Contents integration are now used for many features previously Microsoft Content Management Server 2002: A Complete Guide available only through the Site Manager. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Support for the .NET platform has brought more flexibility into the architecture of CMS. For example, the new application context provides CMS developers with new development and integration options. Publisher: Addison Wesley
October 31, 2003 CMSPub is Date: a powerful platform for creating content-centric applications. As new technologies have ISBN: 0-321-19444-6 emerged, CMS has leveraged them. At the time of writing, the next release of CMS is still being designed. However, it is logical to expect that CMS will provide more features built on top of the Pages: 1136 .NET platform.
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 4. Planning a Content Management Server Engagement Just because this is a planning chapter doesn't mean you can skip it, OK? It always seems that the planning chapter is one that people tend to read last in a book, primarily because these chapters are viewed (wrongly) as so boring as to not possibly be of any benefit. Well, nothing could be further from the truth. Although this chapter might not be as exciting as watching a sporting event or tending to your garden, this chapter is important. If there is one thing you can count on, it isofthis: A poorly planned CMS deployment will lead to a poor CMS • Table Contents implementation. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
As with everything else in information technology, you'll need to do your due diligence in planning your Web site before implementing it. Often, a pilot program is used to help with the planning process, but you also need to understand that the pilot alone cannot create your plan: Wesley YouPublisher: must doAddison this yourself. Pub Date: October 31, 2003 0-321-19444-6 In this ISBN: chapter, we'll discuss how to plan your CMS 2002 deployment. We'll discuss four key areas:Pages: 1136
Envisioning the project "This Planning is one of the those rare books that you will read to learn about the product and keep project rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Developing the projectServer MVP Content Management Server (CMS) is fast becoming a vital content-management tool that Stabilizing the project helps administrators and developers handle the ever-increasing amount of content on their Web However, an authoritative sourceand of product has missing be . . .sure untilto If yousites. are developing a site for a customer acting asinformation a consultant onbeen the project, now. read this chapter with an added element: You'll need to pay very close attention to document specifications. Usually, it is the customer's IT department that is responsible for setting up the Microsoft Content Management 2002:AApoorly Complete Guide is the firstwill book that environment into which the siteServer is deployed. written specification lead to explains a poorly how to effectively deployed CMS site.unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage onsothe Microsoft platform. There's much tocontent discuss, let's get going! This thorough [ Team LiB ] reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Envisioning the Project If this is the first time your organization has been introduced to a product with functionality like Content Management Server (CMS), then you'll need to ensure that you've planned for the "people" side of this engagement. Unfortunately, most IT people are ill prepared for the political and interpersonal side of implementing technology change in an organization. It is one thing to ask your users to change operating systems or upgrade to a new version of Office; it is entirely another to ask your users tomanage their information differently than they do today. •
Table of Contents
For example, if a content creator is accustomed to creating Web information in a Word document and then sending that document through an approval process before e-mailing it to ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood the Webmaster for posting on the Web site, then the Authoring Connector is going to lead to changes in how content is posted to the Web site. Discussion about workflow, approval, and using the features of CMS will need to occur before you can deploy CMS to your overall Publisher: Addison Wesley environment. Moreover, although some of these discussions can take place during the pilot Pub Date: October for 31, 2003 phase, it is better you if they occur while you're still in the design and vision stage of the 0-321-19444-6 project.ISBN: Keeping affected parties in the loop on upcoming changes in information management Pages: 1136 that your project is deployed smoothly and that the changes are accepted by will help ensure all in your organization. Don't underestimate the amount of culture and process change that CMS may introduce. This would be a grave mistake. Microsoft Content Management Server 2002: A Complete Guide
Remember if yourare want to bring change in learn your organization, you'lland need the "This is onethat of those books that about you will read to about the product keep following five elements: rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Champion: A person at vice president level or higher who is personally vested in seeing Content Management Server (CMS) is fast becoming a vital content-management tool that the project succeed. This person can help convince other people high in the organization helps administrators and developers handle the ever-increasing amount of content on their of the importance of this project's success. Web sites. However, an authoritative source of product information has been missing . . . until now. Grassroots support: You'll need some level of support from the folks who will use this project on a day-by-day basis. A good way to develop this is to throw a CMS party with Microsoft Content Management Server 2002: A Complete Guide is the first book that explains food and beverages and then give them a demonstration on the cool features and timehow to effectively unlock the power of CMS. Administrators and developers alike will learn how saving elements of CMS. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toProject manage content on the Microsoft platform. definition: Your project needs to be defined in terms of objective criteria. Stay away from defining the project with relative terms like "more," "less," and so forth. Define This thorough reference explains the product architecture, then shows you how to create and the project in terms that are verifiable, such as numbers and/or percentages. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, sitethe configuration, template development. Project control: If you're going to get blame if theand project goes bad, then you A should running example is used throughout the book to illustrate how important CMS get the glory if the project goes well. If you can't control all aspects of thefeatures project,are then implemented in real-world ask for such control. Web site development. Inside you'll find answers to such questions as: Approved, funded budget: There is no sense in doing any of this if the money isn't available to be spent on hardware, software, support, and training. Ensure that your Chapter 6: How do you customize workflow? project plan includes monies for all four aspects of the project. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Some of your efforts should focus on getting support from every affected party in your using Visual Studio .NET? organization or in your customer's organization. This will mean doing things such as giving demonstrations, and discussing the cultural and information management Chapter 17:holding How domeetings, you establish user rights? changes that will occur by implementing CMS. Chapter 22: How do you best deploy CMS according to your organization's needs, size, The importance of such meetings cannot be underestimated. One of your first objectives should and resources? be to get a person high in your organization on board with the vision of the project based on the benefits will dynamic introducedata? to your organization. If you can't get your topChapterand 32:cost Howsavings do youCMS publish level people on board with the project's vision, then it will be difficult to find funding for the
Hence, getting a person at the vice president level or higher on board is a key to the [project. Team LiB ] success of any CMS deployment. Once you have your top-level people sold on the CMS engagement, then it's time to make the rounds to your department heads and help them understand the benefits and goals of a CMS implementation. Inherent in these discussions should be the realization of the change in business processes and information management that will occur. You will have better credibility if you recognize these changes up front and discuss this with your department heads. These folks will be more open to change if they feel that they have input into the change process. You'll also need to discuss how CMS will change your IT and Web-based departments. There might be positions that will become obsolete because of the ability for users to directly publish content from Word to the Web site. Also, most content will need to go through an approval process before being placed on the Web site. Your workflow • Table of models Contents may need to change to accommodate the features of CMS. This doesn't mean that you giveServer up your approval processes, only that the way information is Microsoft Content Management 2002: A Complete Guide passed through the approval process may change because of the Authoring Connector. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
When gathering the interested parties, you should talk to each party individually and then also address them as a group. The purpose of getting them all together is so that they can see and Publisher: Addison Wesley understand the needs of other groups, which may be dissimilar from their own needs. Enabling Pub Date: October 31, 2003 them to understand the needs of other groups in your organization will help everyone ISBN: 0-321-19444-6 understand why some decisions are made that, at first, might appear foolish or unwise. Pages: 1136the context in which decisions are made is often helpful to those who usually see Understanding only a portion of the overall project plan and focus. Be sure to have your kickoff meeting to start the project only after you have secured your champion and frombooks your that department way, nobody is takenand by keep surprise. "This is one of buy-in those rare you will heads. read toThis learn about the product Moreover, to the kickoff can be time tobefore." get all the interested parties together and rereading find thosemeeting tidbits that youamissed generate some excitement enthusiasm for the project. It is also a great time to deliver the —Gary Bushey, SharePoint and Server MVP overall project plan, go over the vision once again, and ensure that everyone is on board with the CMS Management engagement.Server (CMS) is fast becoming a vital content-management tool that Content helps administrators and developers handle the ever-increasing amount of content on their As part of the envisioning stage, you'llsource need to the goals, has objectives, and business Web sites. However, an authoritative of determine product information been missing . . . until requirements of the CMS deployment at this stage. And you'll need to communicate this to now. each interested party in your organization. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Whattoyou want your site to and accomplish will directly impact the objectives business how effectively unlock thedopower of CMS. Administrators and developers alike and will learn how requirements of your deployment. Therefore, the CMS in termsand of to enhance their Web CMS servers' scalability, flexibility,presenting and extensibility byengagement using CMS features how to it manage solves a content current problem or set ofplatform. problems is an excellent way to describe the API on the Microsoft engagement's objectives and business requirements. This thorough reference explains the product architecture, then shows you how to create and Yourcontent project and proposal willworkflow. be a high-level documentincludes that indicates the goals and and scope of the edit use the Topic coverage CMS administration security, project. Sign-off ondeployment this document is usually required before you can move to the next A phase. the Publishing API, options, site configuration, and template development. running example is used throughout the book to illustrate how important CMS features are You'll also need to design a proof-of-concept site whereby the Web team prototypes a CMS site implemented in real-world Web site development. Inside you'll find answers to such questions with templates and content. Such content can often be reused in the pilot and deployment as: phases.
You should plan scope the customize project in such a way that you define the current "pain points" Chapter 6: to How do you workflow? and how a CMS implementation will solve those pain points. You'll want to describe your current system and workflows and thenfor point out specific challenges with your current Chapter 10: How do you develop Microsoft Content Management Server (CMS)system. 2002 The need a content system should be a logical conclusion as you describe the usingfor Visual Studiomanagement .NET? ideal solutions that will solve your problem(s). Chapter 17: How do you establish user rights? You'll also need to do some competitive analysis between various content management products and be articulate for selecting CMS 2002 organization's over other products. Chapter 22:able Howtodo you bestreasons deploy CMS according to your needs, size, and resources? If you are consulting, you'll need to spend time understanding your customer's current environment, theirHow Webdo content, and their authoring/publishing requirements. If you don't have Chapter 32: you publish dynamic data? a good understanding of these three elements, chances are good that your CMS deployment at
site will [their Team LiB ] encounter setbacks and misreads—neither of which you or your customer will enjoy very much. Hence, from an outline perspective, here are the opening points to discuss in your CMS project plan as you scope out the CMS deployment:[1] [1]
A sample document outline is included later in this chapter.
I. The envisioning phase A. Understanding business pain points 1. Company background •
Table of Contents
2. Management Current system Microsoft Content Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
3. Challenges with current system
4. Why the need for a content management system?
Publisher: Addison Wesley
Pub Date: October 31, the 2003choice 5. Why
of Microsoft Content Management Server 2002?
ISBN: 0-321-19444-6
After you have Pages: 1136demonstrated a thorough understanding of your pain points or your customer's pain points, you can begin to investigate other areas of a CMS deployment. The first area to look at is the requirements of the project. Be sure to include documentation that demonstrates you understand the current environment, the content that will be placed on the CMS site, and the publishing requirements for the site. Detailing the publishing requirements—such as who "This is one of those rare books that you will read to learn about the product and keep will be publishing, the type of content that will need to be published, and/or the place in the rereading to find those tidbits that you missed before." workflow models where publishing will occur—will help flesh out this area. —Gary Bushey, SharePoint Server MVP Another area to look at in this phase is identifying which supporting products are currently Content Management Server (CMS) is fast becoming a vital content-management tool that installed in the environment. For instance, does the customer use Exchange 2003 Server or helps administrators and developers handle the ever-increasing amount of content on their GroupWise or SendMail? Does the customer use Visual Studio .NET? What homegrown Web sites. However, an authoritative source of product information has been missing . . . until applications has the customer built that they want to interoperate with CMS 2002? How will the now. Web sites be presented to the Internet? What products will be involved in the passage of packets between Internet and your2002: CMS server? Microsoft Content the Management Server A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Finally, detail the budget and cost of the required CMS servers. If you will have multiple to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and servers, be sure to explain the purpose of each physical server and why it is necessary to API to manage content on the Microsoft platform. install. Part of your planning process will be to estimate the number, size, and cost of each CMS server. Many environments will have only onearchitecture, server or a few Other environments will This thorough reference explains the product thenservers. shows you how to create and have multiple servers. Not only should your plan include budget and cost information, but it edit content and use the workflow. Topic coverage includes CMS administration and security, should also estimate the amountoptions, of site traffic that each server will support. Issues like Athese, the Publishing API, deployment site configuration, and template development. and others, can be covered in this portion of the outline: running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: B. Gathering customer requirements Chapter 6: How do you customize workflow? 1. Understand the current environment Chapter 10: How you develop for Microsoft Content Management Server (CMS) 2002 2. Analyze the do customer's content using Visual Studio .NET?
3. Investigate your customer's authoring/publishing requirements Chapter 17: How do you establish user rights? C. Identifying supporting products for integration Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 1. Applications built in-house Chapter 32: How do you publish dynamic data? 2. Third-party applications 3.
1. 2. [ Team LiB ] 3. Other Microsoft products and servers
D. Determining the required number of CMS servers 1. Budget and cost 2. Site traffic 3. Hardware The environment into which CMS will be installed is crucial to the planning process. The staging environment, source control, testing processes, and deployment solutions should all be explained. Here is a sample outline to help stir your thinking in this area: •
Table of Contents
Microsoft Content Management Server Guide E. Content Management Server2002: 2002A Complete environments ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
1. Managing different environments Publisher: Addison Wesley
2. Development environments
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
a. managing Pages: 1136
team development efforts
b. Source control c. Build servers and the build process "This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missed before." 3. to Testing and staging environments —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that a. Aims of testing and staging helps administrators and developers handle the ever-increasing amount of content on their b. Setting testing andsource staging Web sites. However, an up authoritative of environments product information has been missing . . . until now. c. Testing and staging processes for Content Management Server 2002 solutions Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Production environments how to 4. effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. a. Deploying solutions to the production environment This thorough reference explains the product architecture, then shows you how to create and b. Managing and maintaining the production environment edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, template development. A the As you continue with your planning of the CMS deployment,and it will behoove you to consider running example is used throughout the book to illustrate how important CMS features skill set that each interested party will need to posses in order to get a high return on are implemented in real-world Webinvestment site development. you'll answers such questions investment (ROI) of your CMS dollars. Inside Don't be shyfind at this stage.toOutline the ideal as: skill set for each party and then pursue doing a formal training program for them. Here is a
possible outline for this portion of your planning document: Chapter 6: How do you customize workflow?
F. Team model and resources Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 1. Skill set for administrators Chapter 17: How do you establish user rights? 2. Skill set for authors/editors/moderators Chapter 22: How do you best deploy CMS according to your organization's needs, size, and 3. resources? Skill set for infrastructure and operations staff Chapter do you publish dynamic data? 4. Skill32: setHow for developers
5.
3. 4. team skill set document [ Team5. LiBCMS ] a. Identify team members b. Evaluate skill set c. Assign CMS tasks to individuals As part of your client planning, you should include security and authentication requirements for your CMS site: G. Identify security and authentication requirements •
Tableofofauthentication Contents 1. Type
Microsoft Content Management Server 2002: A Complete Guide
2. Need for a single sign-on
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
3. Need for private content Publisher: Addison Wesley
Be sure to include notes on the current network environment that details where the CMS Pub Date: October 31, 2003 database will reside, the location of domain controllers (or other authenticating servers), and 0-321-19444-6 where ISBN: the CMS sites will ultimately live. Be sure to note any changes to your TCP filter that will Pages: 1136 need to be instituted as a result of your CMS deployment: H. Identify network topology designs "This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missed before." 1. to Location of database —Gary Bushey, SharePoint Server MVP 2. Location of domain controller Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators 3. DMZ setupand developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. 4. Firewall setup Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how [ Team LiB ] to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Planning the Project Aside from the meetings, you'll need to create a plan on paper that will describe the project's vision, scope of work, and milestones. You'll also need to describe the interested parties in the project and who will perform which actions. At this stage, you are most interested in defining all the elements of the Web site and the project work that is required to build it with CMS. Hence, you'll be looking at overall design issues, the site's functionality, CMS-related components such as templates, and how to deploy this site. End-user training should also be included in this step—especially use of the Authoring Connector. Table of Contents • Microsoft Content Management Server 2002: A Complete Guide
The project plan should include information related to the project schedule, budget estimates, and any other project specifications that might exist for the project to be successful. Business users and content experts should develop a content plan that becomes a part of the overall project plan. Developers should create a development plan that becomes a part of the overall Publisher: Addison Wesley project plan.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 The project plan identifies all the types of content and functionality that will be placed into the site. The content Pages: 1136 plan should also specify the sources of the content for your site.
Your development team may also need to craft a plan that explains how content in an existing site will be ported to the new CMS-based site (see Chapter 37 on how to migrate from CMS 2001 to CMS 2002). They may also need to outline how to import content from external "This is one of those rare books that you will read to learn about the product and keep sources, such as a newsfeed or a streaming data source. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint MVP should define the size of the project and the areas of The project vision and scopeServer document responsibility for each party in the project. It is also essential to define what "success" means Content Management Server (CMS) is fast becoming a vital content-management tool that to a given project. Setting expectations at this stage will help keep the project rolling along and helps administrators and developers handle the ever-increasing amount of content on their remove misunderstandings that would naturally arise in the absence of such definitions: Web sites. However, an authoritative source of product information has been missing . . . until now. II. The planning phase Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' A. Create project visionscalability, and scopeflexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough explains the product architecture, then shows you how to create and 1.reference CMS vision/scope document edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A a.used Project vision the book to illustrate how important CMS features are running example is throughout implemented in real-world Web site development. Inside you'll find answers to such questions b. Solution concept as:
c. Project scope Chapter 6: How do you customize workflow? d. Success criteria Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 e. Dependencies using Visual Studio .NET?
B. Risk17: management Chapter How do you establish user rights? C. Resource management Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? D. CMS project plan documents Chapter 32: How do you publish dynamic data?
2. a.
D. [ Team LiB ]2. Envisioning document
a. Planning phase b. Development phase c. Deployment phase d. Stabilizing phase 3. CMS risk document and risk matrix a. Risk management process •
Table of b.Contents Identify risks
Microsoft Content Management Server 2002: A Complete Guide
c. Analyze and prioritize risks
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
d. Plan risks Publisher: Addison Wesley
e. Track risks
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 f. Control
risks
Pages: 1136
g. Top risks During the planning phase, you'll want to gather and discuss detailed information about security, authentication, site architecture, operations management, and capacity "This is one of those rare books that you will read to learn about the product and keep planning. Be sure to argue for a test lab with a good configuration to enable you to work rereading to find those tidbits that you missed before." offline with a production version of your CMS environment so that you can test proposed —Gary Bushey, SharePoint Server MVP changes to your production environment in your test lab. Content Management Server (CMS) is fast becoming a vital content-management tool that Some of the elements in the following portion of the outline will be difficult to quantify, helps administrators and developers handle the ever-increasing amount of content on their such as the CPU cost per transaction or a theoretical maximum number of users. Don't Web sites. However, an authoritative source of product information has been missing . . . until spend a great deal of time on these types of details unless they play a prominent role in now. the customer's requirements. Here, then, are some additional outline elements that should be addressed in your planning documents: Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web flexibility, and extensibility by using CMS features and E. Planning forservers' securityscalability, and authentication API to manage content on the Microsoft platform. F. Existing content management planning This thorough reference explains the product architecture, then shows you how to create and edit content and usesite thearchitecture workflow. Topic coverage includes CMS administration and security, G. Planning the Publishing API, deployment options, site configuration, and template development. A runningH.example is used throughout the book to illustrate how important CMS features are Operations planning implemented in real-world Web site development. Inside you'll find answers to such questions I. Performance planning as:
planning and usage profiling Chapter1.6:Capacity How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 a. Capacity using Visual Studio .NET?planning fundamentals
transaction characteristics Chapter 17: b. HowUnderstanding do you establish user rights? c. Understanding page requests Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? d. Establishing a usage profile Chapter 32: How do you publish dynamic data? e. Example: Establishing a usage profile 2.
d. e. [ Team LiB ]2. Capacity planning and transaction cost analysis
a. Maximum throughput per transaction b. CPU cost per transaction c. Cost per user d. Theoretical maximum number of users e. Strategy for handling peaks f. Consideration of other factors •
g. Result verification
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
3. Test plans
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
4. Test cases 5. Test lab Publisher: Addison Wesley
requirements
Pub Date: October 31, 2003
6. Test lab configuration
ISBN: 0-321-19444-6 Pages: 1136
7. Test tools 8. Availability planning
"This is one of those rare books that you will read to learn about the product and keep a. Acceptable uptime rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP b. Software solutions for high availability Content Management Server (CMS) is fast becoming a vital content-management tool that c. Hardware solutions for high availability helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Although some of the following points might be a bit redundant to earlier outline entries in now. this chapter, what you need to keep in mind is that the planning portion of the deployment is much more detailed than the envisioning portion. Hence, even though you Microsoft Content Management Server 2002: A Complete Guide is the first book that explains might have discussed the number and type of CMS servers in your environment, you may how to effectively unlock the power of CMS. Administrators and developers alike will learn how need to do so again from a functional and design perspective: to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
J. Planning site design This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment site configuration, and template development. A 1.API, Network design options, and topology running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions a. Basic network topology and servers as: 1.you Web servers workflow? Chapter 6: How do customize 2. you Read-only servers Content Management Server (CMS) 2002 Chapter 10: How do developMCMS for Microsoft using Visual Studio .NET? 3. Authoring MCMS servers Chapter 17: How do you establish user rights? 4. Clustering Web servers Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 5. Database servers network components Chapter 32: b. HowAdditional do you publish dynamic data? and servers 1. 2.
b. [ Team LiB ]
1. Switches and hubs 2. Firewalls and proxies 3. Network load balancing 4. Leveraging application center in network design 5. Monitoring with MOM c. Integrating with SharePoint Portal Server 1. SharePoint Portal Server and Content Management Server 2002
•
2. Integration pack
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide By Bill English [ Team LiB ,]Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Developing the Project Once the project has been mapped out on paper, it is time to implement the project on your CMS server. The site development phase includes a number of tasks that are unique to a CMS implementation. There are generally two areas in which you'll need to focus your attention. The first area is having the Web team build the site, including the framework and templates. Testing the functionality of these elements is essential before handing off the site to the content people for content development. While the content team is working on supplying the site with content, the Web development can busy themselves with other development work. • Table ofteam Contents Microsoft Content Management Server 2002: A Complete Guide
Because CMS is modular in format, your Web team can build one channel complete with templates, hand that off to the content people, and then work on other channels while the content teams are developing content for the first channel. It is not necessary for all the channels and templates to be developed before you hand the site off to the content people.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Date: October 31, 2003 workflow processes can be honed and refined during this phase. Your ThePub testing and approval 0-321-19444-6 contentISBN: teams should view the development phase as a chance to ensure that their workflow processes are adjusted and refined to make their future work flow as well as possible. Pages: 1136
At the end of this phase, you should have several elements ready to go. The first element is a working Web site that uses CMS for its content management. The second element should be documentation that contains instructions for those who will interact with the site, from both a "This is one of those rare books that you will read to learn about the product and keep development and a content user's perspective. A third element should be training for those who rereading to find those tidbits that you missed before." will need to learn how to use the Authoring Connector wizard to populate the site with content. —Gary Bushey, SharePoint Server MVP Any project can be kept on track better through the use of milestones. Milestones are used to Content Management Server (CMS) is fast becoming a vital content-management tool that break up an overall project into bite-sized chunks. Holding people accountable to meet helps administrators and developers handle the ever-increasing amount of content on their milestone deadlines ensures that the project continues to move forward. Web sites. However, an authoritative source of product information has been missing . . . until now. Be sure that before you release a channel and templates, you've tested each template's functionality and navigation elements. Nothing will irritate your nontechnical content developers Microsoft Content Management Server 2002: A Complete Guide is the first book that explains more than a template that doesn't do what it purports to do. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to their Web anddepends extensibility byease usingofCMS and In enhance large measure, the servers' success scalability, of any CMSflexibility, deployment on the use features experienced API to manage content on the Microsoft platform. by the content developers. This ease of use comes from a well-designed template that is easy to use. Be sure to build your templates so that they display all the relevant information without This thorough reference explains the product architecture, then shows you how to create and being cumbersome or difficult to use. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment options, and template development. A be a When you are API, planning the number and site typeconfiguration, of templates to host on your site, there will running example is used throughout the book to illustrate how important CMS features are trade-off. One consideration is that the more templates you have, the tighter control you will implemented in real-world Web site development. Inside you'll find answers to such questions gain for content exposure on your site. The balancing consideration is that the more templates as: you have, the more maintenance you will experience in keeping your site updated as new changes come down the pike. Chapter 6: How do you customize workflow? When planning your template types, depending on the type of content you wish to display, you may need to write several versions of the specific browsers and devices. Be 2002 sure Chapter 10: How do you develop for template Microsoft for Content Management Server (CMS) to address these needs as well. using Visual Studio .NET?
Navigation elements include the links that people will use to navigate the site. Because CMS Chapter 17: How do you establish user rights? navigation is dynamically generated, when a page is added to the site, it can automatically appear in a list22: of How links do created by adeploy script that the CMS API. organization's If the script has been size, well Chapter you best CMS uses according to your needs, planned, you will rarely need to touch it. And this is the stage at which these scripts will need to and resources? be planned. Chapter 32: How do you publish dynamic data?
[ Team LiB ]Always keep accurate documentation on each script that is developed for your NOTE: CMS site, including scripts used to build navigation elements and scripts used to build workflow in your site.
When creating such a script, be sure to consider several elements. First, be sure to consider the overall site navigation design. Second, decide between text-based and image-based navigation schemes. Text-based navigation schemes can be automatically updated when a new channel is added. Image-based navigation may require a graphics designer and/or Web designer to implement the new navigation element. Third, identify any hard-coded or static navigation elements early in your navigation design. And then ensure that these static navigation elements are not lost as the overall site design continues. Many sites will have global navigation elements, local navigation elements, and some type of Table of Contents breadcrumb trail that loops back up the channel structure to the current root channel, adding Microsoft Content Management Server 2002: A Complete Guide each step to the left-hand side of a series of links. When planning your navigation elements, By Billcan English , Olga Londer , Shawn Shell, Todd Bleeker , Stephen Cawood you probably use this three-tiered approach to your planning process. •
There are workflow specifications that ship with CMS. You can also implement a customized Publisher: Addison Wesley workflow, and if you do, you'll need to account for several considerations. First, you'll need to Date: October 31,existing 2003 see Pub if there are any Windows NT or Active Directory security principles that can be directlyISBN: mapped to the CMS security roles. If so, you've just saved yourself some time. 0-321-19444-6 Pages: 1136
Second, you may need to have new groups created. This may involve the cooperation of your server group, so be sure to ping them early on to ensure the groups are created and are populated with the appropriate user accounts. "This one of those rare books you willneed read to to be learn about If the product and keepdefine Third,isare there any unique CMSthat rights that created? so, can you clearly rereading to of find those tidbits that missed the purpose these rights and theyou groups withbefore." which the rights will be associated? If so, you'll —Gary SharePoint Server MVP need toBushey, plan these out as they relate to your CMS deployment. Content Management Server (CMS)how is fast becoming a vital will content-management that Any workflow paths should include e-mail notifications be used. How manytool e-mail helps administrators and developers handle ever-increasing of content on their triggers will exist in each workflow path? Willthe e-mail notificationsamount be included for content that is Web sites. However, an authoritative source of product been missing . . e-mail . until outside a workflow path, such as expired content? You'llinformation also need tohas determine how an now. address is derived from the user name and ensure that the same alias format is appended to
each user's mailbox to ensure smooth delivery of e-mail. For example, if your users log on as Microsoft Content Management Server A Complete Guide gwashington (George Washington), but2002: their current e-mail aliasisisthe first book that explains how to effectively unlock the power of CMS. Administrators and learn how george.washington@<domain_name_here> , then you'll need todevelopers ensure thatalike yourwill messaging to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and administrators have added a recipient policy that creates a second e-mail address for API to manage content on the Microsoft platform. gwashington@<domain_name_here> . This reference explains the product architecture, shows you how to create and Herethorough is the developing-phase portion of the outline for yourthen overall CMS deployment edit content and use the workflow. Topic coverage includes CMS administration and security, documentation: the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world III. The developing phaseWeb site development. Inside you'll find answers to such questions as:
A. Installation Chapter 6: How do you customize workflow? B. Site design Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 1. Managing channel hierarchies Chapter 17: How do you establish user rights? siteCMS structure Chapter 22: a. HowDetermining do you bestbasic deploy according to your organization's needs, size, and resources? b. Preventing channel proliferation Chapter 32: How do you publish dynamic data? c. Identifying channel managers 2.
b. c. [ Team LiB ]2. Managing resource gallery structure
a. Grouping resources with Site Manager b. Adding resources with Resource Manager 3. Managing template gallery structure a. Grouping templates b. Identifying template designers 4. Workflow design •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
a. Basic workflow
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
b. Designing extended workflow scenarios C. Site architecture Publisher: Addison Wesley Pub Date: October 31, 2003
D. CMS customizations
ISBN: 0-321-19444-6 Pages: 1136 E. Template
creation
F. Content creation [ Team "This is LiB one]of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Stabilizing the Project This is the final stage in the delivery of the CMS engagement. This step involves deploying the site to the production environment, system testing the site in that environment, and keeping backup copies of the project. This is also the stage at which the final Web site is launched. At this point, your Web site should be fully installed, tested, designed, and operational. Training for end users should have been completed at this point, and training for any personnel who will now assume management of the site should have been completed as well. •
Table of Contents
Future Releases for Your Web Site
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
As your site content and focus change, you will need to have your templates and navigation elements updated accordingly. Remember that you can implement additional, specific releases Publisher: Addison Wesley without reworking the entire site. Be sure to create a process of continual improvement, Pub Date:regular October 31, 2003 scheduling releases and updates to add functionality without undertaking an entirely new project. Timeliness can be important in many sites, so having a methodical, regular plan in ISBN: 0-321-19444-6 place to meet the changing demands of the site will help keep your site up-to-date and focused Pages: 1136 on your core business functions. Here is a sample outline for this phase in your planning documents: "This is one of thoseand raremonitoring books thatphase you will read to learn about the product and keep xx. The stabilizing rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP A. Testing Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their B. Site deployment Web sites. However, an authoritative source of product information has been missing . . . until now. [ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Sample Planning Document Outline In this section, we've pulled together all the portions of the overall outline discussed previously in this chapter, and we present it here for your consideration. I. Envisioning the project A. Understanding business pain points •
Table of Contents
Microsoft Content Server 2002: A Complete Guide 1. Management Company background ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
2. Current system
3. Challenges with current system
Publisher: Addison Wesley
Pub Date: October 31, 2003
4. Why the need for a content management system?
ISBN: 0-321-19444-6 Pages: 1136 5. Why
the choice of Microsoft Content Management Server 2002?
B. Gathering customer requirements "This is one of rare books that youenvironment will read to learn about the product and keep 1. those Understand the current rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint MVP content 2. Analyze theServer customer's Content Management Serveryour (CMS) is fast becoming a vital content-management tool that 3. Investigate customer's authoring/publishing requirements helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source product information has been missing . . . until C. Identifying supporting products forofintegration now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains 1. Applications built in-house how to effectively unlock the power of CMS. Administrators and developers alike will learn how 2. Third-party applications to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. 3. Other Microsoft products and servers This thorough reference explains the product architecture, then shows you how to create and D. Determining requiredTopic number of CMS serversCMS administration and security, edit content and use thethe workflow. coverage includes the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are 1. Budget and cost implemented in real-world Web site development. Inside you'll find answers to such questions as: 2. Site traffic
3. Hardware Chapter 6: How do you customize workflow? E. Content Management Server 2002 environments Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 1. Managing different environments Chapter 17: How do you establish user rights? 2. Development environments Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? a. Managing team development efforts Chapter 32: How do you publish dynamic data? b. Source control c.
a. b. [ Team LiB ]
c. Build servers and the build process 3. Testing and staging environments a. Aims of testing and staging b. Setting up testing and staging environments c. Testing and staging processes for Content Management Server 2002 solutions 4. Production environments
•
Table of a.Contents Deploying solutions to the production environment
Microsoft Content Management Server 2002: A Complete Guide
b. Managing and maintaining the production environment
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
F. Team model and resources Publisher: Addison Wesley Pub Date: October 31, set 2003for 1. Skill
administrators
ISBN: 0-321-19444-6
2. Skill Pages: 1136
set for authors/editors/moderators
3. Skill set for infrastructure and operations staff 4. Skill set for developers "This is one of those rare books that you will read to learn about the product and keep rereading to 5. findCMS those tidbits missed before." team skillthat set you document —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that a. Identify team members helps administrators and developers handle the ever-increasing amount of content on their b. an Evaluate skill setsource of product information has been missing . . . until Web sites. However, authoritative now. c. Assign CMS tasks to individuals Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Identifyunlock security and authentication requirementsand developers alike will learn how how to G. effectively the power of CMS. Administrators to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. 1. Type of authentication This thorough reference explains the product architecture, then shows you how to create and 2. Need for a single sign-on edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment 3.API, Need for privateoptions, contentsite configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world site development. Inside you'll find answers to such questions H. Identify networkWeb topology designs as:
1. Location of database Chapter 6: How do you customize workflow? 2. Location of domain controller Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 3. DMZ setup Chapter4.17: How do you establish user rights? Firewall setup 22: How do you best deploy CMS according to your organization's needs, size, II. Chapter The planning phase and resources? Chapter 32: project How do vision you publish dynamic data? A. Create and scope
1.
A. [ Team LiB ]1. CMS vision/scope document
a. Project vision b. Solution concept c. Project scope d. Success criteria e. Dependencies B. Risk management •
C. Resource management Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
D. CMS project plan documents
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
1. Envisioning document Publisher: Addison Wesley Pub Date: October 31, 2003
a. Planning phase
ISBN: 0-321-19444-6 Pages: 1136
b. Development phase c. Deployment phase
d. rare Stabilizing phase "This is one of those books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." 2. CMS risk document and risk matrix —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that a. and Riskdevelopers management process helps administrators handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until b. Identify risks now.
c. Analyze and prioritize risks Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively d. unlock power of CMS. Administrators and developers alike will learn how Planthe risks to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. e. Track risks This thorough reference explains f. Control risksthe product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API,g.deployment Top risks options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web and site development. E. Planning for security authenticationInside you'll find answers to such questions as: F. Existing content management planning Chapter 6: How doarchitecture you customize workflow? G. Planning site Chapter 10: Howplanning do you develop for Microsoft Content Management Server (CMS) 2002 H. Operations using Visual Studio .NET? I. Performance planning Chapter 17: How do you establish user rights?
Capacity usage profiling Chapter1.22: How doplanning you bestand deploy CMS according to your organization's needs, size, and resources? planningdynamic fundamentals Chapter 32: a. HowCapacity do you publish data? b. c.
a. [ Team LiB ]
b. Understanding transaction characteristics c. Understanding page requests d. Establishing a usage profile e. Example: Establishing a usage profile 2. Capacity planning and transaction cost analysis a. Maximum throughput per transaction b. CPU cost per transaction c. Cost per user
•
Table of Contents
Microsoft Content Management Server maximum 2002: A Complete Guide d. Theoretical number of
users
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
e. Strategy for handling peaks
f. Consideration of other factors
Publisher: Addison Wesley
Pub Date: October 31, 2003
g. Result verification
ISBN: 0-321-19444-6
3. Test Pages: 1136
plans
4. Test cases 5. Test lab requirements "This is one of those rare books that you will read to learn about the product and keep rereading to 6. findTest those that you missed before." labtidbits configuration —Gary Bushey, SharePoint Server MVP 7. Test tools Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers 8. Availability planning handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. a. Acceptable uptime Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Software solutions for high availability and developers alike will learn how how to effectively b. unlock the power of CMS. Administrators to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and c. Hardware solutionsplatform. for high availability API to manage content on the Microsoft J. Planning site design This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A 1. Network design and topology running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: a. Basic network topology and servers Chapter 6: How do customize 1.you Web servers workflow? Chapter 10: How do developMCMS for Microsoft 2. you Read-only servers Content Management Server (CMS) 2002 using Visual Studio .NET? 3. Authoring MCMS servers Chapter 17: How do you establish user rights? 4. Clustering Web servers Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 5. Database servers Chapter 32: b. HowAdditional do you publish dynamic data? and servers network components
1.
5. b. [ Team LiB ]
1. Switches and hubs 2. Firewalls and proxies 3. Network load balancing 4. Leveraging application center in network design 5. Monitoring with MOM c. Integrating with SharePoint Portal Server 1. SharePoint Portal Server and Content Management Server 2002 2. Integration pack Table of Contents
•
Microsoft Content Management Server 2002: A Complete Guide
III. The developing phase
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
A. Installation Publisher: Addison Wesley Pub B. Date:Site October 31, 2003 design ISBN: 0-321-19444-6 Pages: 1136
1. Managing channel hierarchies
a. Determining basic site structure "This is one of those rare books that you will read to learn about the product and keep b. Preventing channel proliferation rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP c. Identifying channel managers Content Management Server (CMS) is fast becoming a vital content-management tool that 2. Managing resource gallery helps administrators and developers handlestructure the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. a. Grouping resources with Site Manager Microsoft Content Management Server 2002: A Complete Guide is the first book that explains b. Adding resources with Resource Manager how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 3. Managing template gallery structure API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and a. Grouping templates edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API,b.deployment site configuration, and template development. A Identifyingoptions, template designers running example is used throughout the book to illustrate how important CMS features are implemented4.in real-world Web site development. Inside you'll find answers to such questions Workflow design as:
a. Basic workflow Chapter 6: How do you customize workflow? b. Designing extended workflow scenarios Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 C. Site architecture using Visual Studio .NET? D. CMS customizations Chapter 17: How do you establish user rights? E. Template creation Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? F. Content creation Chapter 32: How do you publish dynamic data? IV. The stabilizing and monitoring phase A.
F. IV. [ Team LiB ] A. Testing
B. Site deployment [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we introduced essential concepts for writing a planning document for a CMS engagement. We used a four-phase approach of envisioning the project, planning the project, developing the project, and stabilizing the project. We have also provided a sample outline from which you can begin to write your own CMS planning documents. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part II: Content Authoring and Publishing Chapter 5. The Web Author Chapter 6. Publishing Workflow Chapter 7. Authoring Connector [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 5. The Web Author Overview Browser-Based Publishing CMS Page Modes Creating a New Page •
Table of Contents
Adding Content Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Saving the Page
Setting Up Page Properties Publisher: Addison Wesley Pub Date: October 31, 2003 Editing the Page ISBN: 0-321-19444-6
Copying, Moving, and Deleting Pages Pages: 1136 Production Manager Summary "This is LiB one]of those rare books that you will read to learn about the product and keep [ Team rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview The key features of CMS are providing nontechnical users with the ability to easily create and manage content, and the automation of the Web publishing process. Traditionally, content authors use tools such as Microsoft FrontPage or Macromedia Dreamweaver to create Web content. Then the content is forwarded to a Webmaster, who checks it and then puts it on a Web site. The Webmaster's main responsibility is the technology, not the content. It takes some time for the Webmaster to check the technical correctness of Web pages created by the business users and then to put them on the Web site, thus creatingTable a publishing bottleneck. CMS removes this bottleneck by putting content • of Contents publishing in theManagement hands of the business Microsoft Content Server 2002: Ausers. Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In the traditional model, content creators are required to understand HTML and the Web. They are usually disconnected from the published content and need to involve the Webmaster to change it. Furthermore, the technical staff is often expected to understand the content and be Wesley ablePublisher: to edit Addison it. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 CMS-based Web sites provide business users with an environment that enables them to create and publish their content without any prior HTML knowledge and without involving the technical Pages: 1136 staff. At the same time, Web developers and Webmasters are able to focus on the overall site design and structure, without having to create or maintain the content. In other words, the coders can worry about writing code.
"This is one of those rare books that you will read to learn about the product and keep CMS provides the ability to separate the site development process from the content authoring rereading to find those tidbits that you missed before." process, as shown in Figure 5-1. First, the Web designers and developers create the site —Gary Bushey, SharePoint Server MVP framework, which includes page templates. Page templates have permanent elements that don't change from page to page—for a company or a navigation bar—as well as Content Management Server (CMS) isexample, fast becoming a vitallogo content-management tool that placeholders for content to be provided by the content creators. After the site framework has helps administrators and developers handle the ever-increasing amount of content on their been created, the content creators populate the site with the content. For example, Figure 5-2 Web sites. However, an authoritative source of product information has been missing . . . until shows the BOTS Consulting home page; BOTS Consulting is a fictional consulting company that now. we will use as the sample site throughout the book. The graphic at the top of the page and the navigationContent bar directly underneath it come from a template; however, the content of the page Microsoft Management Server 2002: A Complete Guide is the first book that explains is provided by the content creators. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Figure 5-1. CMS site creation This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?5-2. A template-based Web page Figure Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that youdevelopment missed before." Content creators with little or no Web knowledge can easily add, update, and —Gary Bushey, SharePoint Server MVP even delete content without having to contact the Webmaster. Content creators don't need any special technical skills. Rather than having to install and learn a Web development tool, they Content Management Server (CMS)using is fastthe becoming a vitalinterface content-management tool that can do the authoring in CMS either Web browser or using Microsoft Word helps administrators and developers handle the ever-increasing amount of content on their XP. Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: Guide is the and firstusing book the thatCMS explains NOTE: Content authoring from Word XP Ais Complete achieved by installing how to effectively unlock the power of CMS. Administrators and developers alike will learn Authoring Connector component in addition to Word XP on the content authors' client how to enhance their We Webwill servers' scalability, flexibility, and extensibility by using7. CMS features and computers. discuss the Authoring Connector in detail in Chapter API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit and use workflow. coverage includes CMS administration and security, Aftercontent the content hasthe been created Topic or modified by the content authors, it goes through the the Publishing API, deployment options, site configuration, and template development. publishing workflow, which allows content editors and moderators to approve the page A for running example is used thethe book illustrate howthey important CMS approved; features are publishing. The pages arethroughout published on livetosite only after have been implemented in real-world Web site development. Inside you'll find answers to such questions otherwise, they are not available to the site visitors. as:
In the next two chapters, we will focus on the content authoring and publishing workflow in the CMS environment using the Web browser; then we will look into content authoring using Word Chapter 6: How do you customize workflow? XP with the Authoring Connector. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 In this chapter, we will concentrate on creating and editing a CMS page in a Web browser. using Visual Studio .NET? Chapter 17: How do you establish user rights? [ Team LiB ] Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Browser-Based Publishing To give business users the ability to create content using a Web browser, CMS provides a framework called the Web Author. There are two version of the Web Author in CMS 2002: ASPbased and ASP.NET-based. We are going to focus on the ASP.NET-based version. The Web Author framework consists of client-side and server-side components. On the client side, the Web Author functionality includes a console with a link to switch between the CMS presentation and authoring modes, and a set of links to authoring actions (Figure 5-3), as well as a number of dialog boxes that provide and gather information (Table 5-1). We will be looking into these in the next two chapters. On the server side, the Web Author • Table ofcomponents Contents functionality is implemented using2002: ASP.NET server controls. These controls will be discussed in Microsoft Content Management Server A Complete Guide Chapter 30 later in the book. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 5-3. Full default console Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Table 5-1. Webdata? Author Chapter 32: How do you publish dynamic
Dialogs
[ Team LiB ] Dialog
What It Does
Create New Page
Provides an interface to create a new page
Save New Page
Provides an interface to enter the name and description of a new posting
Insert Image
Provides an interface to insert an image from the resource gallery or the local computer
Edit Image Properties
Provides an interface to edit the properties of an image
Insert Attachment
Provides an interface to insert an attachment from the resource gallery or the local computer
Edit Attachment
Provides an interface to edit the properties of an attachment
• Properties Table of Contents Microsoft Content Management Server 2002: A Complete Guide
Insert Table
Provides an interface to insert a table
Edit Hyperlink
Provides an interface to insert or edit a hyperlink
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Provides an interface to set the foreground and background colors Select Color Pub Date: October 31, 2003
Page Properties Provides an interface to change the properties of the page ISBN: 0-321-19444-6 Copy Pages: Page 1136
Provides an interface to copy the current page into another channel
Move Page
Provides an interface to move the page into another channel
Create Connected Provides an interface to create a connected page "This is one of those rare books that you will read to learn about the product and keep Page rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP of all connected postings Go to Connected Lists hyperlinks Pages Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators developers the ever-increasing amount of content on their Production Manager and Lists not yethandle published pages created by the user Web sites. However, an authoritative source of product information has been missing . . . until Approval Assistant Lists pages waiting for approval by the user now. ResourceContent Manager Provides an interface manage Guide resources in first the galleries which Microsoft Management Server 2002: Ato Complete is the book thattoexplains the user has rights how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Revision History Lists revisions to the page, and provides an interface to compare two API to manage content on the Microsoft platform. revisions of the page This reference explains then shows you how to create and Viewthorough Revisions By Providesthe an product interfacearchitecture, to view a revision of a page edit content and use the workflow. Topic coverage includes CMS administration and security, Date the Publishing API, deployment options, site configuration, and template development. A running is used throughout book to how importantofCMS features are Channelexample Properties Provides an the interface toillustrate change the properties the channel implemented in real-world Web site development. Inside you'll find answers to such questions as:
NOTE: files in the folder /Program ChapterDialog 6: How doare youlocated customize workflow? Files/Microsoft Content Management Server/Server/IIS_CMS/WebAuthor/Dialogs/. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? The default Web console (Figure user 5-3) rights? is implemented using the DefaultConsole.ascx Chapter 17:Author How do you establish user control. This user control is added to the page templates by the template designers. The actions in the 22: console to a user rights in needs, CMS; each Chapter Howare do presented you best deploy CMSdepending accordingon to that youruser's organization's size, user only sees the actions they are allowed to perform. Figure 5-3 shows the full list of options and resources? in the console; this console would be displayed to a user with administrative rights. Figure 5-4 32: How you be publish dynamic showsChapter the console that do would displayed to a data? user with authoring rights.
Figure [ Team LiB ]
•
5-4. Default console as displayed to site authors
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The console is displayed as a table with the authoring commands available. The commands are how to effectively unlock the power of CMS. Administrators and developers alike will learn how grouped together based on the general functions they perform. The console provides several to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and options to perform various editing functions on pages, such as creating pages, editing pages, API to manage content on the Microsoft platform. and previewing pages. Options for the publishing workflow include submitting pages, approving pages, and declining pages. There are also several options related to the content management This thorough reference explains the product architecture, then shows you how to create and lifecycle, such as Production Manager, Resource Manager, and Approval Assistant. Table 5-2 edit content and use the workflow. Topic coverage includes CMS administration and security, lists and explains each option. The options in the console display a series of the Web Author the Publishing API, deployment options, site configuration, and template development. A dialogs; therefore, don't be surprised that Tables 5-1 and 5-2 overlap. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Web Author Chapter 6: HowTable do you 5-2. customize workflow?
Console Options
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ] Option
What It Does
Page Status
Shows the current status of the page
Lock Status
Provides a Locked/Not Locked status for the current page
Production Manager
Lists saved pages that are in production
Approval Assistant
Lists pages awaiting approval
Resource Manager
Lists available resource galleries and resources in those galleries
Preview
Provides a preview of the current page
Create New Page
Creates a new page based on a selected template
Create Connected Creates a page that is connected to an existing page Table of Contents Page Microsoft Content Management Server 2002: A Complete Guide •
By Bill English, Olga Londer, Shawn Shell Todd Bleeker, Stephen Cawood Edit Edits a ,page
Delete Publisher: Addison Wesley
Copy
Pub Date: October 31, 2003
Move ISBN: 0-321-19444-6 Pages: 1136
Page Properties
Deletes a page Copies a page to another channel Moves a page to another channel Displays and allows modification of the properties of the current page
Revision History Displays all page versions "This is one of those rare books that you will read to learn about the product and keep rereading to findby those that you missed View Revisions Datetidbits Displays versions of abefore." page for a specified date —Gary Bushey, SharePoint Server MVP Channel Properties Displays properties for a channel Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: The look, feel, and functionality of the default console can be customized by the template designers. We will discuss how to do this in Chapter 30. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage on the Microsoft platform. To separate thecontent page design from the page content creation, the Web Author provides the ability to use placeholders for content authoring. A placeholder is a predefined area on a page This thorough reference explains the then shows youpage how to create and template where content creators can product put theirarchitecture, content. A blueprint for the is provided by a edit content and contain use the both workflow. coverage CMS administration and security, template; it can static Topic elements, such includes as images, and dynamic elements, such as the Publishing API, deployment configuration, template development. A navigation links. These elementsoptions, cannot site be changed by theand content creators. A template running example is used throughout the book to illustrate how important CMS features are designer defines the areas on the page template where the content will be inserted by the implemented in real-world Web site development. Inside you'll find answers to such questions content creators; these areas are the placeholders. The designer may restrict the type of as: content that a placeholder can contain—for example, only text and no images. An example of a placeholder is shown in Figure 5-5. Chapter 6: How do you customize workflow?
Figure 5-5. A placeholder
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
The Web Author client interface is implemented using HTML forms, JavaScript, and ActiveX controls. For content creation, the supported browsers are Microsoft Internet Explorer 5.x and • Table of Contents later. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: The HTML placeholders are implemented using two ActiveX controls: ncbmprdr.dll NRDHtml.dll. One control provides the functionality of the toolbar Publisher: Addison and Wesley and the other of the placeholder itself. These controls are downloaded to a browser Pub Date: October 31, 2003 on the first use in a .cab file, nrdhtml.cab. If the ActiveX controls download is ISBN: 0-321-19444-6 restricted on the client browser, these controls can be preinstalled on the client Pages: 1136 machine by unzipping the .cab file and registering the .dlls. On the server, the .cab file is located in the folder :\Program Files\Microsoft Content Management Server\Server\IIS_CMS\WebAuthor\Client\PlaceholderControlSupport\. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary SharePoint Server MVP [ Team Bushey, LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Page Modes The Web Author provides the ability for content authors to switch between two CMS page modes, as follows: Presentation mode, which is displayed within the Web Author as Live mode Authoring mode, which is displayed within the Web Author as Edit mode When users browse the site, the pages are displayed in presentation, or Live, mode. In of Contents presentationTable mode, the Web Author console is displayed to the users with predefined editing Microsoft Content Management Server 2002: A Complete Guide rights as a single link that provides the ability to switch to authoring, or Edit, mode. Therefore, By English Olgathe Londer , Todd Bleeker, Stephen Cawood in Bill order to ,see link,Shawn and toShell start authoring or editing content, the content creators need to log in to the site (Figure 5-6). •
Publisher: Addison Wesley
Figure 5-6. Login dialog
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
In CMS, the users who browse the site are called subscribers. Figure 5-2 shows BOTS and This thorough reference explains the product architecture, then shows you how the to create Consulting home page in presentation mode as it is displayed to the subscribers. The Web edit content and use the workflow. Topic coverage includes CMS administration and security, Author consoleAPI, is not displayed;options, there is site no link that allowsand a user to switch to Edit mode. the Publishing deployment configuration, template development. A Figure 5-7 shows is the same page in presentation mode displayed to the user with authoring running example used throughout the book to illustrate how important CMS features are rights; you can that there a link that reads "Switch to Edit Site." implemented in see real-world Webissite development. Inside you'll find answers to such questions as:
Figure 5-7. CMS page in Live mode presented to a user with authoring rights Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." When a user clicks this link, the site is switched from presentation mode into authoring mode, —Gary Bushey, SharePoint Server MVP and the Web Author console options are displayed (Figure 5-8). On the top of the console there is a link that allows the user to switch back to the live site. When the site is in Live mode, the Content Management Server (CMS) is fast becoming a vital content-management tool that URL of the page is presented in the hierarchical way that reflects the page's location in the site helps administrators and developers handle the ever-increasing amount of content on their structure. In Edit mode, the URL is modified; it includes various parameters in the query string Web sites. However, an authoritative source of product information has been missing . . . until after the question mark, including the page's Globally Unique Identifier (GUID) that is assigned now. and maintained by CMS. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlockFigure the power of CMS. Administrators and mode developers alike will learn how 5-8. CMS page in Edit to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Depending on the rights of the logged-on user, the options presented in the Web Author —Gary Bushey, SharePoint Server MVP console will be different. For example, the console in Figure 5-8 displays the options that are availableManagement to the content authors because are logged on as a user with authoring rights Content Server (CMS) is fastwebecoming a vital content-management tool that (Figure 5-6). helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Let's click the Edit link in the console to see what we can edit in the page (Figure 5-9). We can now. see the placeholders on the page: The top placeholder contains the graphic representing BOTS Consulting; the Body Page Title Server placeholder the title; there is also bottom Microsoft Content Management 2002:contains A Complete Guideand is the first bookathat explains placeholder that provides the actual text. (The bottom placeholder needs to be scrolled to in how to effectively unlock the power of CMS. Administrators and developers alike will learn how theenhance browsertheir window Figure 5-9; this placeholder similar to the one have already seen to Webinservers' scalability, flexibility, is and extensibility by we using CMS features and in Figure 5-5) The page is as aplatform. combination of content defined in the page API to manage content onpresented the Microsoft template—such as the graphic on the top of the page—and the content provided within the placeholders. we are now inthe Editproduct mode, architecture, we can change theshows data within theto placeholders This thorough Since reference explains then you how create and if need be. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout book to illustrate how important CMS features are Figurethe 5-9. Editing the page implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint When we edit the page, the Server optionsMVP in the console change to provide access to actions that may be required during or after editing (Figure 5-9). Because the console and the placeholders are Content (CMS) fast becoming a authoring vital content-management tool that displayedManagement in the page, Server the page looksisquite different in mode. This can be confusing helps and developers ever-increasing amountPreview of content on their for theadministrators authors; therefore, there is a handle Previewthe option available. Clicking causes a new Web sites. However, an the authoritative source product information has been window to appear, with page shown as it of would be displayed in Live modemissing to the . . . until now. subscribers. Other options allow us to save the page, to save the page and exit page editing,
and to exit without saving the changes. We are not going to change the page, so we will click Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Exit on the console. An exit warning is displayed by the Web Author (Figure 5-10); we will click how to effectively unlock the power of CMS. Administrators and developers alike will learn how OK to continue, and then we will be taken to the page in authoring mode, as shown in Figure 5to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 8. From there, to go to presentation mode, we can click the Switch to Live Site link in the Web API to manage content on the Microsoft platform. Author console; then the page is displayed in Live mode, as we have already seen in Figure 57. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Figure 5-10. Author exit the Publishing API, deployment options,Web site configuration, andwarning template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter [ Team LiB ] 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating a New Page The Web Author console provides a link that allows content authors to create new pages. However, before you click this link, you need to navigate to a site location where you want the page to be created. This location is referred to as a channel. Traditional Web sites store pages in virtual directories; CMS Web sites provide virtual storage spaces for pages that are called channels. A channel can contain pages and other subchannels. Channels are organized in a hierarchical way; the channels hierarchy defines the navigational structure of the CMS site. CMS site administrators create and maintain the channels hierarchy. For example, in our sample site the horizontal navigation bar underneath the BOTS Consulting graphic represents the site top-level • Table channels of Contents(Figure 5-2). Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: We will look into the channels structure and site navigation in Chapter 9. Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 When we want to create a new page, first of all we need to navigate to a channel where this Pages: page will be1136 stored, and then switch to Edit mode to display the Web Author console. When you navigate to the channel, you see the page that is configured as a default for this channel. If you are creating the first page in the channel, the default CMS channel page is displayed. The default CMS channel page displays the channel within the channels hierarchy immediately surrounding the current the you parent aboveabout the current channel, the "This is one of those rarechannel: books that will channel read to learn the product andand keep subchannels within the tidbits currentthat channel. rereading to find those you missed before."
—Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that The channel pagehandle is an ASP page called cover.asp located in theonfolder helpsNOTE: administrators and default developers the ever-increasing amount of content their drive>:\Program Files\Microsoft Content Management Web API to<META manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS and security, Two custom properties called Keywords and Description areadministration used for the search engines. the Publishing API, deployment options, site andfor template development. A The Keywords property contains the listconfiguration, of the keywords this particular page; the running example property is used throughout thetext book to provides illustrate ahow important CMS Description contains the that brief description of features the pageare implemented real-world site development. Inside you'll find answers to such questions content.in The followingWeb META tags will be generated: as: <META name = Keywords content="MCMS, content management"> <META name=Description value="MCMS 2002 technical overview"> Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Figure 6-7. Sample page custom properties using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that [ Team LiB ] helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Moderator's Approval The final stage in the CMS workflow process is for a moderator to approve the page. After an editor has approved a page, a user with moderator rights is responsible for publishing the page in a particular channel and verifying the page content and page properties. The moderator controls whether the pages with the WaitingforModeratorApproval status are published to the live site. The pages usually get this status after they have been approved by the editors. However, there are exceptions, including the following: If publishing properties—for example, the publishing schedule or the display name of an Table of Contents existing published page—have been changed, then the page bypasses the editor and gets Microsoft Content Management Server 2002: A Complete Guide the WaitingforModeratorApproval status from the Published status after the changes to ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood the properties have been saved. •
If a page originally was declined by the moderator, and subsequently its publishing changed by the page author or the page has been resubmitted Pub Date: October 31, 2003 without changes, then the saved page bypasses the editor and gets the ISBN: 0-321-19444-6 WaitingforModeratorApproval status from the ModeratorDeclined status.
Publisher: Addison Wesley properties have been
Pages: 1136
If a published page has been moved and its content has not been modified, the page status in the new location changes to WaitingforModeratorApproval, bypassing both the Saved status and the WaitingforEditorApproval status. "This those rare books that logs you on willto read to learn about the product keepthey have Whenisa one userofwith moderating rights a CMS site and switches to Editand mode, rereading to find those tidbits that you missed before." the same options as an editor available in the Web Author console (Figure 6-4). They can use —Gary Bushey, SharePoint Server or MVP the Approval Assistant to approve decline pages, or they can use the Approve and Decline
commands in the console to approve or decline pages individually. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators andthe developers handle the ever-increasing amount ofit,content on status their If a moderator modifies page content, saves the page, and resubmits the page Web sites. However, an authoritative source of product information has been missing . . . until changes to WaitingforEditorApproval. If the moderator changes the page name, description, or now. values for custom properties and clicks Save Changes in the Page Properties dialog, the page status also changes to WaitingforEditorApproval. The page content, custom properties values, Microsoft Content Management Server 2002: A Complete Guide is the first book that explains description, and name have to be approved by the editor first; moderators cannot approve how to effectively unlock the power of CMS. Administrators and developers alike will learn how their own changes to any of them. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage on the Microsoft platform. However, if the content moderator changes the page display name and the standard properties, such as the page publishing schedule and the Web Robots check boxes, the status of the page stays This thorough reference explains the product architecture, then shows you how to create and the same: WaitingforModeratorApproval. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find the answers such questions NOTE: Moderators can change all standard properties except page to description. as: Changes to the page description property should be approved by the editor. Chapter 6: How do you customize workflow?
This functionality implemented in CMS order to Content separateManagement the responsibility for(CMS) the content Chapter 10: is How do you develop forinMicrosoft Server 2002 from using the responsibility for page publishing to the live site: Editors are responsible for the Visual Studio .NET? content, while moderators are responsible for the publishing. In addition to approving and declining pages, moderators approve page for publishing, they can modify the Chapter 17:before How do you establish user arights? following properties of the page (Figure 6-8): Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Display Name: The Display Name property defines the text for the link pointing to the current page fromdo other on the site. Chapter 32: How you locations publish dynamic data?
Page schedule: The publishing schedule defines the period of time when the [ Team LiBpublishing ] page is available on the live site in presentation mode, as follows: Start Publishing can be set either to start immediately or to start at an exact date and time. The default is the page's last modified time. The exact date and time can be typed in, or the date can be selected by clicking the calendar icon, as shown in Figure 6-8. When the calendar is displayed, it points to the currently specified date; you can navigate to the desired date. The start date of the page can't be earlier than the creation or start date of the containing channel, whichever is earlier. This applies to the whole hierarchy of channels that contain the current channel, which, in turn, contains the current page. Stop Publishing can be set either to never stop or to stop at the exact date and time. The default is Never. As before, the calendar icon provides the ability to select the • Table of Contents date Management for the expiry date; or you can just type in both the date and the time. The Microsoft Content Server 2002: A Complete Guide expiry date can't be earlier than the start date. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Important Page: This check box sets up an additional flag on the page. This flag can be analyzed programmatically—for example, inside a template file. It is not selected by Publisher: Addison Wesley default. Pub Date: October 31, 2003
Hide When Published: This check box makes the page invisible after it has been published. ISBN: 0-321-19444-6 Once Pages:again, 1136 this option can be analyzed in the code and changed programmatically at runtime, depending on the business logic implemented by the site designers. This check box is also not selected by default. Two Web Robots settings: These check boxes define whether and how the page should be "This is one of those rare books that you will read to learn about the product and keep made available to Web robots. The settings define how the robots META tags for the page rereading to find those tidbits that you missed before." are generated at runtime, as follows: —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is Links fast becoming vital content-management tool that The Web Robots Can Crawl check boxa allows Web robots, also referred to as helps administrators developers handle ever-increasing amount content on spiders or and crawlers, to follow linksthe from the page. If this box isofselected, thetheir Web sites. following However,META an authoritative source product information has been tag is inserted intoof the HTML container at missing runtime:. . . until now.
<META name="ROBOTS" content="FOLLOW, NOINDEX"> Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhanceThe their Web servers' andbox extensibility bycrawlers using CMS features Web Robots Canscalability, Index Thisflexibility, Page check allows Web to index theand API to manage content on the Microsoft platform. page. In this case, the following META tag is inserted at runtime: This thorough reference explains the product architecture, then shows you how to create and <META name="ROBOTS" content="INDEX, NOFOLLOW"> edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example used throughout book illustrateas how CMS features If bothisWeb Robots check the boxes aretoselected, by important default, the META tag is are as implemented in real-world Web site development. Inside you'll find answers to such questions follows: as:
<META name="ROBOTS" content="FOLLOW, INDEX"> Chapter 6: How do you customize workflow?
Leaving both boxes empty causes the following META tag to be generated: Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? <META name="ROBOTS" content="NOFOLLOW, NOINDEX"> Chapter 17: How do you establish user rights? Chapter 22:Figure How do you best deploy CMS according to yourproperties organization's needs, size, 6-8. Sample page standard and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helpsNOTE: administrators developers of content In a rareand case, you may handle need tothe setever-increasing up a start date amount that is earlier than on thetheir Web current sites. However, an authoritative product been missing date. If you try to set up source a start of date for a information page that is has earlier than the . . . until now. corresponding date for the containing channels, the Web Author will revert to the original date without warning you. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and Web Robots edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the booktraverse to illustrate important Web robots are programs that automatically Webhow sites. They areCMS alsofeatures are implemented in real-world Web site development. Inside you'll find answers to such questions known as spiders or crawlers. An example of a Web crawler is a search engine as: program that indexes your site for further searches.
Compliance with robots META tags is voluntary. However, most well-known robots Chapter 6: How dotags. you customize workflow? will honor robots META Chapter 10: How on doWeb you develop for Microsoft Management Server For more information robots, have a look atContent The Web Robots Pages at (CMS) 2002 using Visual Studio .NET? http://www.robotstxt.org/wc/robots.html. Chapter 17: How do you establish user rights?
After Chapter the moderator has page, CMS depending on the pageorganization's publishing schedule, 22: How doapproved you best adeploy according to your needs, one size,of the following three events occurs: and resources? Chapter 32: How do you publish dynamic data? If the current time is earlier than the page's Start Publishing time, the page status is set
to LiB Approved; the page will be available on the live site when the start time is reached. [ Team ] If the current time has passed the page expiry date, the page status is set to Expired; the page is not available on the live site. If the current time matches the page publishing schedule, the page status is set to Published; it is immediately made available on the live site in presentation mode (Figure 6-9).
Figure 6-9. Published sample page in Edit mode
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: An approved page is not locked and is owned by everybody. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to Webby servers' scalability, flexibility, and extensibility CMS features and If aenhance page is their declined the moderator, then the page status changesby to using ModeratorDeclined, API to manage content on the Microsoft platform. and this is how the page appears in the author's Production Manager. Declined pages will only
be displayed in Edit mode and will not be displayed on the live site until the moderator This thorough explains the product architecture, then shows you how to create and reapproves thereference page. edit content and use the workflow. Topic coverage includes CMS administration and security, the deployment options, site configuration, and template development. A ThisPublishing concludes API, our discussion about the three-step CMS publishing process. However, before running example is used throughout the book to illustrate how important CMS features are we move on to the next section, it is worth mentioning an anomaly in the workflow between implemented in real-world Web site development. Inside you'll find answers to such questions editing existing page content and editing existing page publishing properties. If you change the as: content for a published page, then save and submit the changes, the original version of the page is available on the live site until an editor approves the new content. However, if you take an existing, published page and change its publishing properties, such as the publishing Chapter 6: How do you customize workflow? schedule or the display name, then the existing page stops being published until it is approved by a moderator. may result the page's disappearing from Server the live(CMS) site and then Chapter 10:This Howbehavior do you develop for in Microsoft Content Management 2002 reappearing at a random time. Undoubtedly, it can create problems for your users. using Visual Studio .NET? [ Team LiB ] 17: How do you establish user rights? Chapter Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Auto-approval Depending on your corporate processes and business needs, the CMS default workflow may not be suitable for your environment. The standard CMS three-step workflow approval process can be reduced if required. The workflow process stages can be bypassed—for example, if you determine that for a particular site there is no requirement for content editing and/or moderation. This functionality is called auto-approval. It can be achieved by not assigning the workflow roles to a channel, as follows: •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
If a channel doesn't have a moderator assigned to it, then an editor's approval will
ByBill English , Olga Londer , Shawn Shell, Todd Bleeker, Stephen Cawood approve the pages for publishing.
If a channel doesn't have either an editor or a moderator assigned to it, the content to submit pages live to the Web site.
Publisher: authorAddison will beWesley able
Pub Date: October 31, 2003
Another way0-321-19444-6 of reducing the workflow is by combining the workflow roles for the users. If a ISBN: user with moderator rights also has editing rights, all page content and properties they save Pages: 1136 and submit are automatically approved. For example, if the user who is creating pages either has administrative permissions on a channel or has multiple publishing roles, such as author, editor, and moderator, the workflow will be significantly reduced because they can create and approve their own content in order to publish it. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP NOTE: The publishing workflow can also be extended or otherwise customized by the Content Management Server (CMS) is fast becoming developers. This will be discussed in Chapter 31. a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. [ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Page Revisions Web sites and Web pages are always changing over time; CMS sites and pages are no exception. During a CMS page's lifetime, the page may—and most probably will—be modified many times. Once a new version of the page has been approved, this version is displayed on the live site according to its publishing schedule. CMS doesn't delete the previous approved page version; it is automatically maintained for revision tracking. Any page change that has been approved by an editor is a revision. Each approved change to a page creates a new page version. Revision tracking is Contents always enabled; page versions are stored by date and time. Page content • Table of and properties have toServer be approved by the editor Microsoft Content that Management 2002: A Complete Guide
are versioned, while page properties that can be changed by a moderator without further editor approval are not versioned. Versioned ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood changes include placeholder content, resource gallery items used on the page, custom properties, and page description. Changes that are not versioned include page name, page display name, publishing schedule, and publishing flags, such as Important Page, Hide When Publisher: Addison Wesley Published, and the two Web Robots flags. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: Code in the template ASPX file is not stored in the database and is not versioned by revision tracking. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." CMS archives allSharePoint approved pages; —Gary Bushey, Server there MVP is no configurable maximum number for the length of the revision history. Although page versions are maintained by CMS, there is no rollback facility. IfManagement you want to Server go back(CMS) to an is older you needcontent-management to manually copy andtool paste Content fast version, becoming a vital that content from the older page preview into a new version of your page. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
NOTE: It is possible to purge page2002: revisions using the Site Manager; willthat discuss Microsoft Content Management Server A Complete Guide is the firstwe book explains how to do it in Chapter 16. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Revision histories are made available to content creators using Author console commands This thorough reference explains the product architecture, thenWeb shows you how to create and that allow them to compare versions. There are two console commands related to revisions: edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are The Revision History command lists all available page revisions and allows content implemented in real-world Web site development. Inside you'll find answers to such questions creators to compare any two of them (Figure 6-10). For example, when you edit a page, as: you may need to compare it with the approved version of the page. Chapter 6: How do you customize workflow? Figure 6-10. Revision
History dialog
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The View Revisions by Date command provides the ability to view a page revision in presentation mode as it was displayed on the site at the specified date and time. You can either manually specify a date and time for a revision you want to view, or select the date "This from is onethe of calendar those rare books that you 6-11). will read to learn about the product and keep provided (Figure rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Figure 6-11. View Revisions by Date dialog
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[When Teamviewing LiB ] and comparing the page revisions, you need to be aware that they are displayed using the current template file. This is especially important if you are looking at a specific revision by date. Even if the template file has been changed since that date, the revision will be displayed using the current template file, not the original template file as it was on that particular date. As a result, the revision may not be displayed as it was displayed originally. For example, if the template file has had a placeholder removed since that date, the page revision will be based on the current template file and will not display this placeholder and its content.
To compare a particular page's revisions using the Web Author, a currently logged-on user must have authoring or editing rights to the page. Selecting the Revision History command on the console displays the Revision History dialog, shown in Figure 6-10, which provides an interface for comparing the revisions. Two check boxes under Revision Types to List provide the ability to specify the types of revisions you want to display, as follows: •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Page content or page properties: This option is selected by default.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Shared Resource in page: This option is not selected by default. Publisher: Addison Wesley Pub Date: October 31, 2003
NOTE: Changes to resource gallery items are viewed within the pages that use these ISBN: 0-321-19444-6 items; any approved change to a resource gallery item used in a page creates a new Pages: 1136 page version.
"This is one of those rare books that you will read to learn about the product and keep Depending on the revision types you've specified, the list of revisions that meet the type rereading to find those tidbits that you missed before." criteria will be displayed. Different information is listed for the approved page versions versus —Gary Bushey, SharePoint Server MVP an unapproved version of the page, as follows: Content Management Server (CMS) is fast becoming a vital content-management tool that helps The administrators and developers handleifthe ever-increasing amount of content on their latest unapproved page revision, it exists: Web sites. However, an authoritative source of product information has been missing . . . until now. Date and time when the revision was last modified Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively the power of CMS. Administrators and developers alike will learn how Currentunlock page status to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and revisions: API toApproved manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and Revision date and time edit content and useapproval the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Revision running example is type used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Name of the user who approved the revision as:
Both approved and unapproved revisions: Chapter 6: How do you customize workflow?
Preview and Properties icons Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? To compare two versions, select them by clicking the Select box for each of the versions, and then click the Compare button. The changes between two pages are displayed under three Chapter 17: How do you establish user rights? comparison tabs (Figure 6-12), as follows: Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The Appearance tab displays differences in the page content. Chapter 32: How do you publish dynamic data? The Source tab displays differences in the page HTML.
The Properties tab compares the versioned page properties and displays changes. [ Team LiB ]
Figure 6-12. Compare Revisions interface
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP The Appearance and Source tabs display text changes as color-coded: The text that has been added is Management in one color, and the(CMS) text that hasbecoming been deleted is in a different color withtool that Content Server is fast a vital content-management strikethroughs. Changed images in the Appearance tab appear colorofborders them. helps administrators and developers handle the ever-increasingwith amount contentaround on their The default colors arean green for additions andofred for deletions; you has can been selectmissing other colors Web sites. However, authoritative source product information . . . until from the lists provided for both options. now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains [ Team LiB ] how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary CMS defines a publishing workflow process that ensures the quality of the content published on a CMS Web site. Several CMS publishing roles, such as author, editor, and moderator, can be assigned to individual users, allowing all content to pass through this workflow. Authors, editors, and moderators use the Web Author for creating and approving content. Once the template designers have created templates and the site administrator has assigned user roles, the whole content creation process can occur without any further need for the developers or administrators to be involved. The publishing workflow includes creating a page by an author, approving the page content by • Table of Contents an editor, approving the page publishing scheduleGuide by a Microsoft Content Management Server 2002: A Complete
moderator, and, finally, publishing the page on the live site if approved. In this chapter, we walked through the publishing workflow ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood process and discussed the statuses assigned to a page in different workflow stages.
Depending on your business requirements, the standard three-step workflow can be changed. Addison Wesley We Publisher: discussed the auto-approval process used to reduce the workflow. However, the workflow Pub Date: October 2003 can be extended or31,otherwise customized to include various roles if required. We will look into ISBN: how this can0-321-19444-6 be done in Chapter 31. Pages: 1136
In the next chapter, we will focus on CMS content creation using Microsoft Word. [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 7. Authoring Connector In Chapters 5 and 6, we looked into content creation and publishing using the Web Author. CMS 2002 also provides the ability for nontechnical content authors to create CMS content directly from Microsoft Word XP. This functionality is achieved by installing and using the CMS Authoring Connector component in addition to Word XP on the content authors' client computers. In this chapter, we'll detail how to use the Authoring Connector and look into its architecture and functionality. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
What Is the Authoring Connector? The Authoring Connector is a stand-alone tool that doesn't require any other CMS 2002 components to be installed on a client computer. The Authoring Connector provides a new feature in CMS 2002 that enables business users to create and submit content without leaving Word XP. In the previous versions of CMS, document content could only be copied and pasted into the placeholders in the Web Author. Using Word XP with the Authoring Connector, authors can create and update content on the CMS site using a wizard-driven interface. Currently, the Authoring Connector enables content authoring from Word XP only; content from other Office applications, such as Excel, must be manually copied and pasted into the appropriate placeholders,Table using Web Author as before. • of the Contents Microsoft Content Management Server 2002: A Complete Guide
The Authoring Connector Wizard provides an author with a list of predefined publishing tasks and guides the author through the submitting content to be published. Upon completion of the wizard, the Authoring Connector creates a new posting. The status of the posting is set to WaitingforEditorApproval. For content to become available on the live site, the page has to go Publisher: Addison Wesley through the publishing workflow as usual.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: As we have mentioned previously, in CMS 2002 the terms "page" and "posting" can be used interchangeably. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The publishing for theServer authorsMVP are preconfigured by a site administrator, thus shielding —Gary Bushey,tasks SharePoint the business users from the detailed understanding of CMS site structure and functionality. Content Management Server (CMS) is fast becoming a vital content-management tool that A content author can and submit an entire document or a selected part of a document. the helps administrators developers handle the ever-increasing amount of content How on their content is inserted into a CMS page is defined by the placeholders within a template on which Web sites. However, an authoritative source of product information has been missing . . . until this page is based. The content can be inserted into the page in one of two ways: now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The content, including text and/or images, is displayed inline as a part of a Web page. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance theirdocument Web servers' scalability, extensibility by using CMS features and The entire is inserted into flexibility, a page as and an attachment. API to manage content on the Microsoft platform.
For example, Figure 7-1 shows a page created from Word XP using the Authoring Connector. This thoroughtext reference explains the product thenproviding shows you to create andfull The selected from the Word document is architecture, displayed inline, thehow abstract for the edit content and use the workflow. Topic coverage includes CMS administration and security, document, which is available for download as an attachment on the same page. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Figure Web 7-1.site CMS page created from XP implemented in real-world development. Inside you'll findWord answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The Authoring Connector targets templates, placeholders. The content "ThisNOTE: is one of those rare books that you will read to learnnot about the product and keep is placed into the placeholders within the template depending on the types of rereading to find those tidbits that you missed before." placeholders and their properties —Gary Bushey, SharePoint Server MVPdefined by the template designers. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Now that have anan idea as to what source the Authoring Connector is, let's its architecture Web sites.we However, authoritative of product information hasdiscuss been missing . . . until and look into how it is used. now.
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Authoring Connector Components The Authoring Connector contains both client and server components. A high-level architecture of the Authoring Connector components is shown in Figure 7-2.
Figure 7-2. Authoring Connector components
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The client component is a books Word add-on offcon.dll. The add-on additional "This is one of those rare that youcalled will read to learn about the provides product and keep Word menu options (Figure that launch publishing wizard. When the Authoring Connector rereading to find those7-3) tidbits that you the missed before." client component is installed, the Send —Gary Bushey, SharePoint Server MVPto MCMS drop-down menu is added to the File menu. It includes the following options: Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their CreateHowever, New Page Web sites. an authoritative source of product information has been missing . . . until now. Update Same Page Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Replace Any Page how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Figure 7-3. Additional File menu options in Word XP This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
The client component needs to be installed on each computer that will use the Authoring Connector; Word XP has to becustomize installed on client computers before installation of the Authoring Chapter 6: How do you workflow? Connector client component. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? ChapterThe 17:server How do you establish user rights? NOTE: requires no additional configuration; all software components are installed by default. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 32: Howindo you XP publish If theChapter Macro Security Word is setdynamic to High, data? when Word XP is launched for the first time after the Authoring Connector has been installed, it may give a security warning regarding
macro viruses (Figure 7-4). To prevent the warning from appearing again, in the [potential Team LiB ] warning dialog box click the "Always trust macros from this source" check box, and then click the Enable Macros button. Word adds the Microsoft Corporation certificate to the list of trusted sources (Figure 7-5) and will not display the warning again.
Figure 7-4. Word XP security warning
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 7-5. Trusted macros Wordand XPkeep "This is one of those rare books that yousources will read tofor learn about thein product rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? ChapterTo32: How the do you publish dynamic data? NOTE: review list of trusted sources for macros in Word XP, select Tools > Options > Security tab, click the Macro Security button, and choose the Trusted
Sources [ Team LiB ] tab.
On the server side, the Authoring Connector user interface is contained in the ASP.NET page OC.aspx; this page is essentially a collection of ASP.NET Web forms. The client component communicates with the server component over HTTP; therefore, HTTP connectivity is required between the client and the server. If the OC.aspx file is not available or has been secured on the server, then the Authoring Connector will not be able to submit content.
NOTE: The URL pointing to OC.aspx can be modified within the wizard. We will discuss that in the next section in this chapter. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The OC.aspx file is located in the folder \Server\IIS_CMS\OfficeWizard. On a CMS site, this folder by default is mapped to the virtual directory /MCMS/CMS/OfficeWizard. The same folder contains the file PublishingTasks.xml, which provides a list of Authoring Connector publishing tasks displayed in the wizard. This file can be modified by a site Publisher: Addison Wesley administrator; we will look into how to do it later in this chapter.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Pub Date: October 31, 2003
ISBN: 0-321-19444-6 The Authoring Connector Wizard interacts with the OC.aspx file, which in turn interacts with the Pages: 1136Upon completion of the wizard, the Authoring Connector creates a new posting Publishing API. and then copies the content from the Word document into the available placeholders defined in the target template.
Thereisare two placeholders template maythe use within and a template "This one of types those of rare books that that you a will read to designer learn about product keep specificallytofor Word content: and OfficeAttachmentPlaceholder. In our rereading find those tidbits OfficeHtmlPlaceholder that you missed before." exampleBushey, in Figure 7-1, the inline abstract —Gary SharePoint Server MVP text is inserted into the OfficeHtmlPlaceholder, and the full Word document is inserted as an attachment into the OfficeAttachmentPlaceholder. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Authoring Connector Customization Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The to behavior of the Authoring Connector canAdministrators be customized. For example, alike you may how effectively unlock the power of CMS. and developers will learn how require a different publishing forflexibility, Word-based than browserto enhance their Web servers' workflow scalability, andauthoring extensibility byfor using CMS features and based authoring. Another is a multilingual API to manage content on example the Microsoft platform. site, in which additional consideration should be given to the globalization directives (codepages) for your site and thorough the character sets used on the as well as to choosing inyou Word that This reference explains thesite, product architecture, then fonts shows how to create and match the character set for the language you are using. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A For details, refer is toused the MSDN articlethe located running example throughout bookat to illustrate how important CMS features are http://msdn.microsoft.com/library/default.asp?url=/library/enimplemented in real-world Web site development. Inside you'll find answers to such questions us/dnmscms02/html/mscms_custauco.asp. as: Chapter 6: How do you customize It is worth mentioning that authors can workflow? submit Word content using any template, and into any channel to which they have rights, even if the templates are not designated as Word authoring Chapter How you develop for Microsoft Content Server (CMS) 2002 templates and10: may notdo contain OfficeHtmlPlaceholder and/orManagement OfficeAttachmentPlaceholder. In using Visual Studio .NET? such cases, content is inserted into the first available HtmlPlaceholder, and the source document is uploaded into the first AttachmentPlaceholder. We will focus on how the content is Chapter 17:placeholders How do you later establish user rights? inserted into the in this chapter How do you best CMSConnector accordingcreates to yourtwo organization's needs, size, In theChapter original22: Word document, the deploy Authoring additional custom and resources? properties, as follows: Chapter 32: How do you publish dynamic data?
The CmsServerUrl property contains the full URL pointing to the location of the OC.aspx [ Team LiB ] file on the CMS server. For example, the value for this property can be set to http://www.botsconsulting.com/MCMS/CMS/OfficeWizard/oc.aspx. CmsPostingGuid contains the posting Globally Unique Identifier (GUID). These document properties allow the Authoring Connector to find the posting that corresponds to where the document content was last submitted for publishing. The next time the author opens the document, the option of updating an existing posting becomes available. The Authoring Connector updates the existing posting by copying content from Word XP into the available placeholders.
NOTE: There is no interaction between the Authoring Connector and the template .aspx file. When content is created using the Authoring Connector, the template .aspx • Table of Contents file Content is not run; therefore, any2002: custom code inGuide the template file is not executed. Microsoft Management Server A Complete ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Using the Authoring Connector Content authors use the Authoring Connector to submit their content from Word XP. An entire document or a selected part of a document can be submitted. Content authors can create a new page, update an existing page originally created by using the Authoring Connector, or replace an existing page.
Creating a New Page •
Table of Contents
The process of creating a new page using the Authoring Connector consists of several steps:
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
If you would like to submit part of a Word document, select the content as required. If an entire document, don't make any selection.
you are submitting Publisher: Addison Wesley
Pub Date: October 31, 2003
Change the URL pointing to the OC.aspx file if you are publishing to a different server or ISBN: 0-321-19444-6 using a different file location. Pages: 1136
Choose a channel where the new page will be published, and a template on which it will be based. These parameters can either be chosen as a publishing task or be specified manually. "This is one of those rare books that you will read to learn about the product and keep Set up rereading to the findpage thoseproperties. tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Preview the page and confirm your choices. Content Management Server (CMS) is fast becoming a vital content-management tool that The first step is to select the Wordhandle document the content to be published; alternatively, helps administrators and in developers the ever-increasing amount of content on theirthe entiresites. document will be Then, choose the Fileinformation > Send to MCMS > Create New Web However, an published. authoritative source of product has been missing . . .Page until menu option. If the document has not been saved, you will be prompted to save it (Figure 7now. 6); click Yes. The Authoring Connector Wizard is then launched. If a selection has been made in Word, theContent Authoring Connector Server prompts you to choose whether publish selection or the Microsoft Management 2002: A Complete Guide to is the first the book that explains whole shown inpower Figureof7-7. If no selection hasand been made, thealike textwill in the middle how todocument, effectively as unlock the CMS. Administrators developers learn how section of the Welcome screen scalability, is not displayed (Figure to enhance their Web servers' flexibility, and7-8). extensibility by using CMS features and API to manage content on the Microsoft platform.
Figure 7-6. Word XP prompt before the wizard is launched
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Figure 7-7. Authoring Connector Wizard Welcome screen, selected Chapter 17: How do you establish user rights? text being submitted Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of7-8. thoseAuthoring rare books that you will readWizard to learn about the product and keep Figure Connector Welcome screen, entire rereading to find those tidbits that you missed before." document being submitted —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 32:you Howcan do change you publish dynamic data? From Chapter this screen the URL for the OC.aspx if required. Once the OC.aspx
is set [location Team LiB ] up for a document, it is saved to the CmsServerUrl property in the Word document when the wizard has completed. It does not need to be set up again if there have been no changes. It also becomes the default for any other Word document opened on a client machine that does not already have the CmsServerUrl property defined. In addition, any Word template based on the document with this property will pick up the OC.aspx location. To change the location, select the "Change server name and path" check box and click Next; then specify the new URL (Figure 7-9) and click Next.
Figure 7-9. Change the default server and location dialog
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how The wizard can accessed by usersflexibility, who haveand authoring rights by in at least onefeatures of the and to enhance theironly Webbeservers' scalability, extensibility using CMS channels on the CMS site. If the current user does not have sufficient permissions on the CMS API to manage content on the Microsoft platform. server, an additional login dialog will be displayed (Figure 7-10). This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic7-10. coverage includes CMS administration and security, Figure Login dialog the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[Then, Teama LiB ] Publishing Task dialog is displayed, as shown in Figure 7-11. This dialog presents a list of publishing tasks from which an author can choose. Publishing tasks are preconfigured by an administrator. Each publishing task is listed by name. This name is an alias for a combination of three parameters, as follows:
A short description of the task, which is displayed in the dialog when the task has been selected A template on which a new page will be based A channel where a new page will be published
Figure 7-11. Publishing Task dialog •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, When content API, is created using the Web Author, the contentand author needsdevelopment. to navigate toAa the Publishing deployment options, site configuration, template channel example where the will be submitted, a template on whichCMS the features new pageare will be running isnew usedpage throughout the book toselect illustrate how important based, and then enter the content the placeholders. thefind Authoring Connector, using implemented in real-world Web siteinto development. Inside In you'll answers to such questions publishing tasks allows administrators to preconfigure the channel and the template. Therefore, as: an author does not require any additional knowledge of the CMS site structure: The document content is uploaded into the preconfigured template and stored in the preconfigured channel 6: How do you customize workflow?task. basedChapter on the parameters defined by a publishing Chapter 10:needs How to do create you develop for Microsoft Contenta Management (CMS)that 2002 The author only the document and choose task; the taskServer guarantees the using Visual Studio .NET? and the content is submitted for publishing in the appropriate appropriate template is selected channel, thus reducing the probability of a user error. Chapter 17: How do you establish user rights? The author rights on channels and templates determine which tasks are displayed. Only tasks Chapterchannels 22: Howand do you best deploy CMS according to your needs, that contain templates to which the current user hasorganization's rights are shown. Forsize, and resources? example, if an author only has access to one channel, then only the tasks related to that channel will be displayed, provided the author has rights to the templates used in these tasks. Chapter 32: How do you publish dynamic data? The Authoring Connector also provides the ability for an author to override the publishing tasks
manually [and Team LiB ] enter a channel and a template. To achieve this, check the "Manual entry of channel and template" box if it is enabled, and click Next. In the Channel Information dialog, navigate to the required channel, or type the full path from the root channel Channels, as shown in Figure 7-12, and click Next. In the Template Information dialog, navigate to the required template, or type the full path from the root template gallery Templates, as shown in Figure 7-13.
Figure 7-12. Channel Information dialog
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the7-13. power of CMS. Administrators and developers Figure Template Information dialogalike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." NOTE: TheSharePoint template path is based —Gary Bushey, Server MVP on the template gallery hierarchy and not the physical location of the template file. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Regardless of whether the template is specified by a publishing task or manually, the Authoring now. Connector does not provide the ability to target placeholders within the template. The content Microsoft Management Server 2002: Complete is the firstdefined book that explains is insertedContent into a page depending on the type Aand numberGuide of placeholders within a how to effectively unlock the power of CMS. Administrators and developers alike will learn how template, as follows: to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. If there are one or more OfficeHtmlPlaceholders within the template, the content is inserted into all of them as inline contentarchitecture, to be displayed page. Fortoinstance, if This thorough reference explains the product thenwithin showsa you how create and there are two OfficeHtmlPlaceholders within a template, the content will be inserted into edit content and use the workflow. Topic coverage includes CMS administration and security, both of them. The content options, can be either the entire document or a selected part of Athe the Publishing API, deployment site configuration, and template development. document. properties of each the OfficeHtmlPlaceholders define what content running exampleThe is used throughout theofbook to illustrate how important CMS features arewill be published and how.Web site development. Inside you'll find answers to such questions implemented in real-world as: For example, if images are not allowed for a particular OfficeHtmlPlaceholder, then only text from the Word document will be inserted into this placeholder and displayed on a Chapter How do workflow? page; all6: images willyou be customize filtered out. If the same template has another OfficeHtmlPlaceholder that allows images but no text, then only images from the Word Chapter 10: How do you develop Microsoft Content Server document will be inserted into thisfor placeholder; the textManagement will be filtered out. (CMS) 2002 using Visual Studio .NET? If there are one or more OfficeAttachmentPlaceholders within the template, the entire Chapter 17: How do you establish rights? source document is inserted into alluser of them as a file attachment; the link to the document is displayed within a page. Regardless of whether part of the document has been selected Chapter 22:entire How do you best deploy CMS according to your organization's size, or not, the document will be inserted as an attachment. For example,needs, if there are and resources? two OfficeAttachmentPlaceholders within a template, the source document will be inserted into both of them as an attachment in exactly the same way. Chapter 32: How do you publish dynamic data?
If there [ Team LiB ] are one or more OfficeHtmlPlaceholders and OfficeAttachmentPlaceholders defined within the template, the inline content is inserted into all OfficeHtmlPlaceholders, and the source document is inserted as an attachment into all OfficeAttachmentPlaceholders. If there are no OfficeHtmlPlaceholders in the template, the content will be inserted into the first HtmlPlaceholder defined within a template for inline publishing. If there are no OfficeHtmlPlaceholders and no HtmlPlaceholders within a template, no inline content will be published on the page. If there are no OfficeAttachmentPlaceholders in the template, the document will be inserted as an attachment into the first AttachmentPlaceholder defined within a template. If there are no OfficeAttachmentPlaceholders and no AttachmentPlaceholders within a template, the source document is not inserted as an attachment into the page. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NOTE: The formatting of text inserted into an OfficeHtmlPlaceholder depends on the properties of the placeholder, the original text formatting in Word, and the mapping of the styles definition within the template to styles in Word. We will look into preserving formatting later in this chapter.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 next step is
The to configure the page properties. First of all, the Authoring Connector displays a Page Information dialog, shown in Figure 7-14, which provides the ability to specify the page name, title, and description. The page name will be used as a part of a URL pointing to the new page. The title sets up the Display Name property as we know it in the Web Author. By default, the Authoring theyou firstwill 128read characters the text both the "This is one of Connector those rare displays books that to learnof about the as product andpage keep name and title; this canthose be changed. Theyou Page Description property allows the author to provide a rereading to find tidbits that missed before." meaningful description of the page;MVP this property is optional and is limited to 256 characters in —Gary Bushey, SharePoint Server length. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the Information ever-increasing amount Figure 7-14. Page dialogof content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Clicking Nextofdisplays a Publishing Dates Times as shown in Figureand 7-15; this dialog "This is one those rare books that you and will read todialog, learn about the product keep allows an author specify thethat desired schedule for the page. As we have seen in rereading to find to those tidbits you publishing missed before." the previous chapter, this schedule can be changed by editors and moderators after the page —Gary Bushey, SharePoint Server MVP has been submitted to the publishing workflow. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and 7-15. developers handle the ever-increasing amount dialog of content on their Figure Publishing Dates and Times Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Thereisisone alsoofanthose "Advanced pagethat properties" box, which allows the author display the "This rare books you will check read to learn about the product andto keep Advanced to Page dialog, in Figure 7-16. It provides the ability to set up the rereading findProperties those tidbits thatshown you missed before." page attributes, as well as to specify values for custom properties for a page if they are defined —Gary Bushey, SharePoint Server MVP in the template. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amountdialog of content on their Figure 7-16. Advanced Page Properties Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The page attributes same settings as read the page publishing properties "This is one of thoseare rarethe books that you will to learn about the productpresented and keep in the Web Author, Pagethose Properties However, warned that the names for the settings in the rereading to find tidbitsdialog. that you missed be before." Authoring Connector are very closeMVP but not exactly the same as in the Web Author, as follows: —Gary Bushey, SharePoint Server Content Management Server (CMS) is fast becoming a vital content-management tool that page as special page: Thishandle settingthe is the same as Important in the Web Author; helps Mark administrators and developers ever-increasing amountPage of content on their it is not selectedan byauthoritative default. Web sites. However, source of product information has been missing . . . until now.
Allow Web robots to crawl links: This is the same as Web Robots Can Crawl Links in the WebContent Author; Management it is selected Server by default. Microsoft 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Hide page when published: This setting is the same as Hide to enhance theirfrom Websubscriber servers' scalability, flexibility, and extensibility by using CMSWhen features and Published in the Web Author; it is not selected by default. API to manage content on the Microsoft platform. Allow Web robots toexplains index this This is the samethen as Web Robots Can Index Thisand Page This thorough reference thepage: product architecture, shows you how to create in the Web Author; it is selected by default. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Custom properties are defined by template designers and will therefore be displayed by the running example is used throughout the book to illustrate how important CMS features are same names and provide the same default values in both the Authoring Connector and the Web implemented in real-world Web site development. Inside you'll find answers to such questions Author. The author can change the values of the custom properties. If no custom properties are as: specified in the template, the "Custom properties" table is not displayed in the Advanced Page Properties dialog. Chapter 6: How do you customize workflow? The final step of the wizard allows the author to preview the page, and provides a summary of the configuration thedo Page as shown in Management Figure 7-17. Server (CMS) 2002 Chapter 10: in How youSubmission develop fordialog, Microsoft Content using Visual Studio .NET?
Figure 7-17. Page Submission dialog
Chapter 17: How do you establish user rights?
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
A Preview Page button displays default browser window; the author may be "This is one of those rare books the thatpage you in willa read to learn about the product and keep required totolog onthose to the site. that you missed before." rereading find tidbits —Gary Bushey, SharePoint Server MVP The following items are presented in this screen for reviewing: page name; page display title, which is Management the same as the Display Name property in the Web content-management Author; channel wheretool thethat page Content Server (CMS) is fast becoming a vital will be published; and template on which the page will be based. To make changes to any helps administrators and developers handle the ever-increasing amount of content on theirof thesesites. items, click Back you reachsource the dialog where information you need tohas change required Web However, anuntil authoritative of product beenthe missing . . . until information. now. The Page Content Submission dialog alsoServer provides an indication of Guide how the document content will be Microsoft Management 2002: A Complete is the first book that explains inserted into the resulting page: as inline text and images, as an attachment, or both. As we how to effectively unlock the power of CMS. Administrators and developers alike will learn how have already seen, these options are not controlled by the author; they are defined within the to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and template by thecontent type of on thethe available placeholders. API to manage Microsoft platform. Clicking Next inreference the Pageexplains Submission dialog submits the page forshows publication andtothen displays This thorough the product architecture, then you how create and the final wizard dialog, shown in Figure 7-18. The final dialog allows you either to finish and go edit content and use the workflow. Topic coverage includes CMS administration and security, backPublishing to Word or to launch the Web Author. status of the page displayed in the WebAAuthor the API, deployment options, siteThe configuration, and template development. is WaitingforEditorApproval. In order the for the to become available on CMS the live site, itare should running example is used throughout bookpage to illustrate how important features be approved for publishing Web by going through the workflow as configured on the channel where implemented in real-world site development. Inside you'll find answers to such questions it is submitted. as:
Figure 7-18. Authoring Connector Wizard final dialog
Chapter 6: How do you customize workflow?
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
As weishave completion wizard two properties are keep added to the "This one already of thosementioned, rare books upon that you will readoftothe learn about the product and Word document: the CmsServerUrl property, contains the URL pointing to the location of rereading to find those tidbits that you missedwhich before." the OC.aspx file SharePoint on the CMSServer server;MVP and the CmsPostingGuid, which contains the GUID for the —Gary Bushey, newly created posting (Figure 7-19). Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle XP the ever-increasing amount of content on their Figure 7-19. Word document properties Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that It is worth mentioning that these two properties are available in the Word document regardless helps administrators and developers handle the ever-increasing amount of content on their of where the document is located. You can copy the Word document or send it in an e-mail. Web sites. However, an authoritative source of product information has been missing . . . until Anyone editing the new copy of the document would be able to publish it to the proper location now. because of the CMS properties stored in the document. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Updating a Page API to manage content on the Microsoft platform.
The CmsServerUrl and the CmsPostingGuid properties allow you to update a page that was This thorough reference explains the product architecture, then shows you how to create and previously created using Word and the Authoring Connector. In this case, you are not required edit content and use the workflow. Topic coverage includes CMS administration and security, to specify the channel and template by selecting a publishing task or manually. Instead, the the Publishing API, deployment options, site configuration, and template development. A wizard goes straight to the Page Information screen, which provides the ability to modify the running example is used throughout the book to illustrate how important CMS features are page properties. implemented in real-world Web site development. Inside you'll find answers to such questions as: To update an existing page, in the Word document select the content you'd like to publish, if required, and then choose the File > Send to MCMS > Update Same Page menu option. If you have not yet saved your work, you will be prompted to do so. Chapter 6: How do you customize workflow? After the Authoring Connector Wizard starts, it points to the OC.aspx location as defined in the Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 CmsServerUrl property of the document; click Next. using Visual Studio .NET? Chapter 17: How do you establish user rights?
NOTE: andeploy entire CMS Wordaccording documenttooryour a selected part, the ChapterWhether 22: Howyou do submit you best organization's needs, size, submitted content will overwrite all of the inline content in the target page that and resources? originates from Word. If there is a Word attachment in the target page, it will be changed to the new of thedynamic document. Chapter 32: How doversion you publish data?
[ Team LiB ]
In the Page Information dialog, change the page properties if necessary, and click Next; in the Publishing Dates and Times dialog, change the publishing schedule if required, and then click Next. In the Page Submission screen, review the page information, and preview the page by clicking Page Preview if desired. Clicking Next submits the page and displays the Completing the Authoring Connector Wizard page, where you can go back to Word or start the Web Author.
•
NOTE: If your page includes dynamic navigation, in the page preview you may see two postings listed under the same display name: the original one that you are replacing and the new one that you are submitting. This is only a temporary issue: After you've submitted the page, the original one will be replaced with the new one. If you look at the submitted page in the Web Author, only the new page will be Table of Contents displayed in dynamic navigation.
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Replacing a Page Publisher: Addison Wesley
Pub Date: October 31, 2003
Replacing a page using the Authoring Connector allows you to change the content of any 0-321-19444-6 existingISBN: page, regardless of whether it was originally created from Word. In this case, the new Pages: page will be1136 placed in the same channel and will be based on the same template as the original page. The wizard allows you to navigate to the page and then takes you straight to the Page Information dialog. To replace page, in the Word content you'd like publish, if "This is onean of existing those rare books that you document will read toselect learn the about the product andtokeep required, and then choose the that File > Send to MCMS > Replace Any Page menu option. If you rereading to find those tidbits you missed before." have not yet saved your work, you MVP are prompted to do so. —Gary Bushey, SharePoint Server After theManagement Authoring Connector Wizard it pointsatovital the content-management default OC.aspx location; Content Server (CMS) is starts, fast becoming tool you thatcan change it if required and then click Next. The Authoring Connector Wizard displays the Page to helps administrators and developers handle the ever-increasing amount of content on their Replace dialog, whichan allows you to select a page to be replaced (Figure 7-20).missing In the ."Select Web sites. However, authoritative source of product information has been . . until page" area, expand Channels and navigate to the page to be replaced, or type the full path to now. the page in the "Web page path" box; then click Next. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers Figure 7-20. Page to Replace dialog alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." NOTE: As before, the submitted content will overwrite all of the inline content in the —Gary Bushey, SharePoint Server MVP target page that originates from Word. If there is a Word attachment in the target Content Management Server to (CMS) is fast becoming a vital content-management tool that page, it will be changed the new source document. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. In the Page Information dialog, change the page properties if necessary—you are allowed to Microsoft Content Management Server 2002: A Complete Guide thePublishing first bookDates that explains change the page name and other properties—then click Next. In isthe and how todialog, effectively unlock power of CMS. Administrators and developers alike will Page learn how Times change the the publishing schedule if required, and then click Next. In the to enhance their Web servers' flexibility, extensibility byby using CMSPage features and Submission screen, review the scalability, page information andand preview the page clicking Preview API to manage on the Microsoft platform. if desired. As wecontent have seen already, clicking Next submits the page and displays the Completing the Authoring Connector Wizard page, where you can go back to Word or start the This Web thorough Author. reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in before, real-world Webpage site includes development. Inside you'll find such questions NOTE: As if your dynamic navigation, in answers the pageto preview you as: may see two postings listed under the same display name instead of the one you are submitting. However, in the Web Author, only the new page display name will be displayed in dynamic navigation. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Preserving Word Formatting and Styles Chapter 17: How do you establish user rights?
Content authors who are used to rich formatting in Word XP may expect the formatting of the Chapter 22: How do you best deploy CMS according to your organization's needs, size, content to be preserved in the resulting CMS pages when it is displayed inline. Although it is and resources? usually possible to set up the properties of the placeholders in the page templates and/or cascading style sheets to preserve formatting, it has to be pointed out that not all the content Chapter 32: How do you publish dynamic data? on a CMS page will be displayed exactly as it is shown in Word; this may be caused by
settings in the client browser options and/or differences in the [additional Team LiBuser-defined ] implementation of cascading style sheets in different browsers. In Word, there are two types of formatting styles, as follows: Inline styles are formatting options stored inline together with the text to which they are applied. For example, font and color applied to the selected section of the document text using Word formatting options represent an inline style. The formatting options that define the style are wrapped around the content and therefore can be represented in HTML. Document styles are named formatting options stored in the header of the document; they can be applied and changed globally. For example, Heading 2 represents a document style. Authors can select document styles from the Word styles and formatting toolbar or a side bar. • TableAofreference Contents to a style encapsulates the selected content. However, the style information in the document header is not carried Microsoft Content Management Server 2002: A Complete Guide over by the Authoring Connector; therefore, the intended formatting cannot be applied. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
A template designer can allow inline styles by setting the Formatting property of an OfficeHtmlPlaceholder to Full Formatting. If other formatting is selected, inline styles may be Publisher: Addison Wesley partially or fully lost when the content is inserted in the placeholder. Pub Date: October 31, 2003
Preserving styles requires more work. A good technique for preserving the document ISBN:document 0-321-19444-6 styles Pages: is to have 1136 a corresponding external cascading style sheet attached to the template. This style sheet has to provide the style definitions for the named styles used within Word documents. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." NOTE: It is also possible to define document styles in an embedded style sheet in the —Gary Bushey, SharePoint Server MVP section of a template. In this case, the styles will only be preserved within pages based on this particular template. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. The name of the style is wrapped around the content published by the Authoring Connector; therefore, if the style is defined within a cascading style sheet, it will be applied within a page. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains This technique will work just fine for capturing document styles that are used widely within an how to effectively unlock the power of CMS. Administrators and developers alike will learn how organization—for example, within corporate templates. However, if an author defines new to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and document styles or updates existing ones in an existing Word document, the change will not be API to manage content on the Microsoft platform. reflected on the site until the cascading style sheet is updated to reflect the changes. This thorough reference explains the product architecture, then shows you how to create and To import a style definition from Word XP, in Word apply a particular style to the selected edit content and use the workflow. Topic coverage includes CMS administration and security, content, and save the document as Web page, filtered. Open the resulting .htm file in Notepad, the Publishing API, deployment options, site configuration, and template development. A go to the section of the document, and locate the <style> container and the relevant running example is used throughout the book to illustrate how important CMS features are style definition. Copy the style definition to an external cascading style sheet. If an embedded implemented in real-world Web site development. Inside you'll find answers to such questions style sheet is used, copy the definition into the <style> container in the section of an as: appropriate tempalte.
In some cases, designers may workflow? be required to disable both document and inline styles. Chapter 6:template How do you customize To achieve this, the template designers must set the Formatting property of OfficeHtmlPlaceholder bedevelop set to NoFormatting. In this scenario, all style and (CMS) formatting Chapter 10: How must do you for Microsoft Content Management Server 2002 information will beStudio stripped from the document content. using Visual .NET? [ Team LiB ] 17: How do you establish user rights? Chapter Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Setting Up Publishing Tasks Publishing tasks displayed to authors in the Authoring Connector Wizard are defined in a publishing task list that is set up by a site administrator. The publishing task list is an XML file called PublishingTasks.xml, located on the target server. This enables all clients connecting to the server to view the same list of publishing tasks. In order for a specific task list to be displayed in the Authoring Connector Wizard, the author must have rights to the channel and the template that are specified in the PublishingTask.xml document on the server. The default location of the XML document is :\Program Files\Microsoft Content Management Server\Server\IIS_CMS\OfficeWizard\PublishingTasks.xml. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: When multiple servers in a Web farm are used for authoring, copy the same PublishingTasks.xml file on all authoring servers to enforce consistency.
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Publishing Pages: 1136 Tasks Document Structure The XML tasks list document is composed of a root element, , and child elements, . Each element should contain four child elements, as follows: "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The element contains the name of the publishing task; it must be less than 132 —Gary Bushey, SharePoint Server MVP characters in length. Content Management Server (CMS) is fast becoming a vital content-management tool that The <description> element contains a short description of the publishing task; it must be helps administrators and developers handle the ever-increasing amount of content on their less than 1,024 bytes in length. Web sites. However, an authoritative source of product information has been missing . . . until now. The , or , element identifies which template should be used
by the Authoring Connector, by the full path or GUID, respectively. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators developers alike learn how The , or , element identifies and in which channel the will page should to enhance their Web servers' scalability, and extensibility by using CMS features and be created, by the full path or GUID,flexibility, respectively API to manage content on the Microsoft platform. For example, the following task list defines two publishing tasks, for creating a research page This thorough reference explains the product architecture, then shows you how to create and and for creating an article. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used?> throughout the book to illustrate how important CMS features are This task creates a new article and resources? {ECF2A30B-7FBD-4771-B311-6C9551B2C2CF} Chapter 32: How do you publish dynamic data?
[ Team LiB ] {B5626CE8-CFA2-4578-86B8-7C2A2649A6FA}
The schema for the PublishingTasks.xml document is contained in the schema file PublishingTasks.xsd, located by default within the same folder. Each task has to follow the name, description, template, and channel order. The and <description> elements can contain HTML escape markup. However, you need to make sure that all characters are properly escaped; otherwise, the XML document will not be valid. If any of the required elements are not defined or are defined wrongly, an error will occur and no tasks will be shown in the publishing task list. For example, if the element refers to a channel Table that of does not exist, the publishing task will not be displayed to the authors. • Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: Searches by GUIDs are faster and require fewer resources on the server. Therefore, it is more efficient from a performance point of view to provide Publisher: Addison Wesley ChannelGUID and TemplateGUID values, rather than the virtual path locations of the Pub Date: October 31, 2003 channel and the template. Using GUIDs to define channels and templates also ISBN: 0-321-19444-6 ensures that any naming changes to the site do not require modifications to the task Pages: 1136 list.
Whenisyou publishing tasks, ensure that theto task names and "This onecreate of those rare books that you will read learn about thedescriptions product andclearly keep define the tasks for the nontechnical users. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) becoming aTasks vital content-management tool that Creating and Modifying theis fast Publishing helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until The task list is an XML file that can be created or modified in Notepad or any XML editor. Also, now. you can download a GUI tool called the Publishing Task Editor from www.microsoft.com. The Task Editor is shown in Figure 7-21; it enables creation modification theexplains Microsoft Content Management Server 2002: A easier Complete Guideand is the first bookofthat PublishingTasks.xml file. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content Figure on the Microsoft 7-21.platform. Publishing Task Editor This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[There Teamare LiBtwo ] files that are required for the Task Editor: TaskEditor App.exe and tasklist.xsd. These two files must be located in the same directory. Also, CMS 2002 must be installed on the same computer; otherwise, the Task Editor will not function properly.
NOTE: The tasklist.xsd file, which is in the same directory as the Task Editor, is not exactly the same as PublishingTasks.xsd. However, both files adhere to the same standards for specified tasks.
The Task Editor provides the following functionality:
•
Creating, copying, and deleting tasks. Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Selecting a valid channel and template by a path or GUIDs. When the Channel or the the Select a Channel or the Select a Template window appears, which allows navigating to the channel or template, and selecting the format: Path or GUID. For example, the Select a Channel window shown Publisher: Addison Wesley in Figure 7-22 has an Articles channel selected, which is specified by GUID.
ByBill English , Olgabrowse Londer, Shawn , Todd Bleeker Cawood Template buttonShell is clicked in the,Stephen Task Editor, either
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 7-22. Select a Channel window in the Publishing Task Editor
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Checking for duplicate task names that are not allowed. Chapter Howrestrictions do you publish dynamic data? Checking32: length for elements' values.
Validating and saving the XML document. A task file cannot be saved in the Task Editor [ Team LiB ] unless each of the tasks is valid and the generated file is valid.
NOTE: When you save the file in the Task Editor, the .xml extension is not automatically added; you need to type it in manually.
The location of the PublishingTask.xml and PublishingTask.xsd documents can by modified by changing the web.config file in the Authoring Connector Web application. By default, they are located in the same directory as OC.aspx. This directory is mapped to the virtual directory /MCMS/CMS/OfficeWizard. However, for security reasons, it is recommended that you put these two files outside a virtual directory and specify their absolute path in the web.config file. System administrators may also choose to change the names of the files. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
The default location of the Authoring Connector's web.config file is :\Program Files\Microsoft Content Management Server\Server\IIS_CMS\OfficeWizard. The section within the container defines the location and name of the publishing tasks and schema files. If this section is not present, the default location is Publisher: Addison Wesley used. However, the settings can be easily modified; for example:
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Pages: 1136 will read to learn about the product and keep "This is one of those rare books that you rereading to find those tidbits that you missed before."
—Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their The value the key attribute be specified exactly as been in themissing preceding Web NOTE: sites. However, anfor authoritative sourcemust of product information has . . . until now. code. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Restricting Authors to Predefined Publishing Tasks API to manage content on the Microsoft platform.
By default, thereference Authoringexplains Connector authors to manually select the on which This thorough the allows product architecture, then shows youtemplate how to create and the page will be based and the channel into which the page will be posted. However, this edit content and use the workflow. Topic coverage includes CMS administration and security, manual override feature can be options, disabled,site effectively restricting use of the predefined the Publishing API, deployment configuration, and authors templatetodevelopment. A tasks in example the publishing task list. running is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions To disable the manual override option in the Authoring Connector Wizard, you need to make as: changes to the OC.aspx file. Chapter 6: How do you customize workflow? ChapterThe 10:modifications How do you develop for Microsoft Content Management Server (CMS) NOTE: to the OC.aspx file are not supported by Microsoft, which 2002 using Visual Studio .NET? means that changes to the OC.aspx file may be lost when you are applying service packs, hotfixes, or upgrades. Therefore, back up the original and modified version of Chapter 17: file Howbefore do you establish user rights? the OC.aspx proceeding with any CMS update. After the update has been completed, you may be able to reapply your modifications in the appropriate sections. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 32: How dooryou publish dynamic data? UsingChapter Visual Studio .NET a text editor, open the :\Program
[Files\Microsoft Team LiB ] Content Management Server\Server\IIS_CMS\OfficeWizard\OC.aspx file, and then locate and modify line 145 by adding the keyword disabled, so that it reads as follows:
| After you make this change, the "Manual entry of channel and template" check box in the Authoring Connector Wizard will be disabled, as shown in Figure 7-23.
Figure 7-23. Manual override disabled •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, [ Team LiB ] the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we looked into the architecture, functionality, and usage of the CMS Authoring Connector component. The Authoring Connector enables content creators to create and modify CMS pages without leaving Word XP. After the new page has been created or modified, in order for it to be available on the live site, it has to be approved by the editors and moderators assigned to the channel to which the page has been published. This chapter completes the Content Authoring and Publishing part of the book. In the next part, we will look into creating and developing a CMS-based Web site. We will start with creating an infrastructure for of a new CMS site. • Table Contents Microsoft Content Management Server 2002: A Complete Guide By Bill English [ Team LiB ,]Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part III: Creating Site Framework Chapter 8. Creating a New CMS Site Chapter 9. Setting Up Site Structure Chapter 10. Developing for CMS Using Visual Studio .NET Chapter 11. Template-Based Page Processing •
ChapterTable 12. ofDesigning Contents Templates
Microsoft Content Management Server 2002: A Complete Guide
Chapter 13. Working with Placeholders in Visual Studio .NET
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Chapter 14. Creating Dynamic Navigation Publisher: Addison Chapter 15. Wesley Connected Postings Pub Date: [ Team LiB ]October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 8. Creating a New CMS Site Overview Creating and Configuring a New Database Creating a New Virtual Web Site Using the Database Configuration Application •
Table of Contents
Configuring an IIS Site as a 2002: CMS-Enabled Site Microsoft Content Management Server A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Adding Virtual Directories Manually
Accessing the CMS Site by a Root URL Publisher: Addison Wesley Pub Date: October 31, 2003 Creating a CMS Site
with Shared Resources
ISBN: 0-321-19444-6
Summary Pages: 1136 [ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview During CMS installation, one of the IIS virtual sites is selected to become a CMS-enabled site. However, after the installation, it is often necessary to create another CMS site on the same machine. There are several configuration issues to consider before you start creating a new site:
•
A CMS site is a Web application. It can be installed at the root of a virtual IIS site and accessed using the root URL http://, or it can be installed in a virtual directory Table of Contents off the root and accessed using the nonroot URL http:///.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English , Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood The site information is stored in the Content Repository,
which is a SQL database. This database may be dedicated or may be shared between several sites within the same CMS installation.
Publisher: Addison Wesley
CMS allows Pub Date: Octobermultiple 31, 2003
CMS sites to be hosted on the same machine; each is accessed using itsISBN: own0-321-19444-6 root URL http://. This configuration may require HTTP host headers to be enabled in IIS. All sites share the same database. Pages: 1136
Based on the configuration decisions you make, there are different ways to set up a new CMS site. "This is one of those rare books that you will read to learn about the product and keep rereading to find those that you missed The new CMS site tidbits will use a dedicated IISbefore." virtual site and a dedicated database; the site —Gary Bushey, SharePoint will be accessed using Server the rootMVP URL http://. Content Server is fast a vital content-management toolsite that TheManagement new CMS site will be(CMS) installed as abecoming Web application off the IIS site root; the will helps be administrators andthe developers handle the ever-increasing of content on want their this accessed using nonroot URL http:///. If you Web sites. an authoritative source of product information been missing . . . until site toHowever, be accessed using the root URL, you will have to write ahas redirection page or now. configure the redirection on IIS. Microsoft 2002:IIS A Complete is the first book that explains The Content new CMSManagement site will use Server a dedicated virtual siteGuide but will share the database with how to effectively unlock CMS. Administrators and developers alikesite>. will learn how other CMS sites; thethe sitepower will beofaccessed using the root URL http:// Programs > Microsoft Content Management Server > Publisher: Addison Wesley Database Configuration Application. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 After you've launched the DCA, click Next in the Welcome screen. In order to perform configuration, the DCA needs to stop the IIS. It displays a "Stop service?" dialog box asking Pages: 1136 you to confirm the IIS stop (Figure 8-9). If you click No, the DCA will display a Confirm Exit dialog box (Figure 8-10). If you choose No, the DCA will go back to the Welcome screen; if you choose Yes, the DCA will exit.
"This is one of those rare books that you will read to learn about the product and keep Figure 8-9. DCA "Stop service?" dialog rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Figurescalability, 8-10. DCA Confirm Exit dialog to enhance their Web servers' flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
To carry on with the configuration, select Yes in the "Stop service?" dialog box, shown in Figure Chapter 17: How do you establish user rights? 8-9. After the IIS has been stopped, a Select MCMS Database screen is displayed (Figure 811). The screen shows theyou current database in the format <SQL server name>./<user name> . You need to type it in; there is no browsing available. For example, the CMS administrator account for our site is MCMS/MCMSadministrator (Figure 8-17). That's all the information required by the DCA. Before finishing, it asks you to confirm the start of SQL Server Agent for background processing jobs (Figure 8-19). The background job configured atTable this of stage is the CMS database purging job called BGP-. You • Contents can see it in SQL Server Enterprise Manager if you open <SQL server> > Management > SQL Microsoft Content Management Server 2002: A Complete Guide Agent > Jobs and then double-click the job name in the right-hand pane (Figure 8-20). Note ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood that the owner of this job is the user account that is currently running the DCA. You can change the job ownership if required. Publisher: Addison Wesley
Figure 8-19. DCA SQL Server Agent dialog
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint ServerDatabase MVP Figure 8-20. purging job properties Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Click OK in the dialog box to start the SQL Server Agent service. If for any reason you are not 10: attempt How do you develop for Microsoft Content Management (CMS) 2002 willingChapter to let DCA to start the SQL Server Agent service, you don'tServer have to. However, using Visual Studio .NET? you will need to start it manually at a later stage; otherwise, the purging job will not run and the database can grow unnecessarily large, affecting the performance of your CMS site. Chapter How doyou youmake, establish rights? the completion screen (Figure 8-21). If Regardless of 17: the choice the user DCA displays you are ready to proceed to configuring your CMS server using the Server Configuration Chapter 22: How do you best deploy CMS according to your organization's needs, size, Application, just click Finish; if you are going to configure the server later, clear the SCA check and resources? box and click Finish. Chapter 32: How do you publish dynamic data?
Figure 8-21. DCA final screen
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
When you click Finish, the DCA restarts the IIS. If it encounters problems with starting IIS sites, it displays the warning shown in Figure 8-22. Click OK, then go to the IIS snap-in, and make is sure Web sites are up and where SCA and is installed "This oneall of IIS those rare books that yourunning. will readThe to Web learn site about the the product keep is very often the culprit; you need to start it manually (right-click the site and select Start). However, rereading to find those tidbits that you missed before." sometimes all Web sites areServer up andMVP running, although the warning is still displayed by the DCA. —Gary Bushey, SharePoint Don't close the IIS snap-in yet; we will use it in the next step. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators developers handle ever-increasing amount of content on their Figureand 8-22. Unable tothe start Web service message Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, [ Team LiB ] API, deployment options, site configuration, and template development. A the Publishing running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Configuring an IIS Site as a CMS-Enabled Site The next task is to configure the virtual IIS site as a CMS site using the Server Configuration Application. The SCA is a Web-based configuration utility. There are many CMS settings that can be set up using the SCA; these are discussed in granular detail in Chapter 18, Using the Server Configuration Application. We are going to concentrate on how to configure the IIS virtual Web site to become a CMS Web entry point. When an IIS site is configured as a CMS entry point, CMS checks all requests to the site in order to determine whether they are CMS requests. It then processes the CMS requests to generate content; non-CMS requests are processed by IIS as usual. •
Table of Contents
By default, the SCA is launched after the Microsoft Content Management Serverautomatically 2002: A Complete Guide
DCA has completed (Figure 8-23); however, if you cleared the SCA launch check box in the DCA, you can start it manually later ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood on. Locally, the SCA can be started using the Start menu shortcut (Start > Programs > Microsoft Content Management Server > Server Configuration Application); remotely, you can start it from the browser using http://<SCA installation Web site >/NRConfig. The SCA screen Publisher: Addison Wesley consists of two panes: The top pane displays information about the current installation that Pub Date: October 31, 2003 cannot be changed; the bottom pane presents six tabs that contain configuration options. ISBN: 0-321-19444-6 Pages: 1136
Figure 8-23. SCA default screen
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
SelectChapter the Web tabHow (Figure 8-24); the table displayed shows Management information about all(CMS) IIS virtual 10: do you develop for Microsoft Content Server 2002 Web sites, IP address, using such VisualasStudio .NET? TCP port, and host header name if it is set up. The last column is labeled "MCMS?". This column shows whether the site is configured as a CMS site. For example, we can Figure 8-24 that BOTS CMS site that we created earlier is shown Chapter 17: see Howfrom do you establish userthe rights? as not CMS-enabled. We know that this is a newly created IIS site that is currently empty. To HowCMS do you best deploy according to your needs, size, set upChapter the site22: as the entry point, clickCMS Configure; in the Weborganization's Server Configuration screen, resources? in theand MCMS? drop-down list for your site, select Yes - Read Write (Figure 8-25). The SCA displays a dialog box informing you that it will stop and restart the affected Web site; click OK, Chapter 32: How do you dynamic data? and then OK again to close thepublish Web Server Configuration screen.
Figure 8-24. SCA Web tab
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 8-25. Configuration screen "This is one of those rare booksSCA that Web you willServer read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
NOTE: We are creating a new CMS site with authoring enabled. Therefore, we Chapter the 6: How you customize selected ReaddoWrite setting for workflow? the site. After the site has been developed, if you want to disable authoring, you may reconfigure the site to be Read Only. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 17: Howand do you user rights? CMS site. Several new virtual directories Go toChapter the IIS snap-in openestablish the newly configured and applications have been configured, as shown in Figure 8-26, for the CMS site on IIS 5. 22: provide How do CMS you best deploy CMS according to for your organization's needs, size,For TheseChapter directories functionality as well as cache the CMS-generated pages. and resources? example, /MCMS/CMS/WebAuthor contains files for the Web Author console. Chapter 32: How do you publish dynamic data?
Figure 8-26. CMS Web entry point structure, as configured by SCA
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The next task is to enable guest access to your new site. All access in CMS is authenticated; to —Gary Bushey, SharePoint Server MVP provide anonymous access for the site users, we need to set up a guest account. To specify the guest account, in the SCA select the Security tab (Figure 8-27). You can see that there is no Content Management Server (CMS) is fast becoming a vital content-management tool that guest account set up as yet. Click Configure; in the Security Configuration window in the Allow helps administrators and developers handle the ever-increasing amount of content on their Guests On Site drop-down list, select Yes; then either type in the guest account user name in Web sites. However, an authoritative source of product information has been missing . . . until the format <domain name>/<user name> (Figure 8-28) or browse to it; then click OK. Notice now. that the guest login account is now displayed in the Security tab. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and tab developers alike will learn how Figure 8-27. SCA Security to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 8-28. SCA Security Configuration window "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
[ Team LiB ] 6: How do you customize workflow? Chapter Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Adding Virtual Directories Manually There are two virtual directories called CMS and webctrl_client that we need to manually add to our CMS Web site. These directories are required to support Web-based authoring and site development. The CMS virtual directory must be located inside the Web application that will contain our CMS site. It should point to the physical directory /Program Files/Microsoft Content Management Server/Server/IIS_CMS. If you are creating a CMS site installed at the root of the IIS site, then the full name of this virtual directory will be /CMS; if you are installingTable a CMS site as a Web application off root, then it will be //CMS. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
To create a CMS virtual directory, in the IIS snap-in right-click the Web site (or the virtual directory containing the site if CMS is installed as an off-root Web application), select New > Virtual Directory and click Next in the Virtual Directory Creation Wizard Welcome screen; type CMSPublisher: as the Addison virtual Wesley directory alias and click Next; in the Web Site Content Directory screen Pub Date: October 2003 navigate to /Program Files/Microsoft Content Management ISBN: 0-321-19444-6 and click Next; in the Access Permissions screen select Execute Server/Server/IIS_CMS Pages: in 1136 permission addition to Read and Run Scripts, and click Next; click Finish. After the wizard has completed, in IIS 5 the /CMS virtual directory is configured as a separate application starting point; we need to remove it. Right-click CMS and select Properties; in the Virtual Directory tab in the Application Settings area, click Remove (Figure 8-29); then click OK.
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbitsFigure that you8-29. missed CMS before." properties —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
NOTE: The last step is not required in IIS 6, because IIS 6 does not configure new virtual directories as application starting points by default; therefore, the /CMS virtual directory has been configured as a directory, not an application, which is exactly what we need.
The /webctrl_client virtual directory should be located at the root of the IIS site, configured as a CMS Web entry point. It should point to /Inetpub/wwwroot/webctrl_client. To create the /webctrl_client virtual directory, repeat the preceding process, but type webctrl_client as the virtual directory alias, point to /Inetpub/wwwroot/webctrl_client, and accept the default permissions. If required, Microsoft Content Management Server 2002: A Complete Guide remove the application starting point following the previous instructions. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The site structure for the new CMS site installed at the root of the IIS site is shown in Figure 830; the site structure for the new CMS site installed as the off-root Web application is shown in Publisher: Wesley show the site running on IIS 5). Figure 8-31 Addison (both figures Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 8-30. CMS site structure
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
8-31. CMS Web application Microsoft Content Figure Management Server 2002: A Complete Guide isstructure the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
[ Team LiB ] Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Accessing the CMS Site by a Root URL When the CMS site is installed, you may want to access it by a root URL that contains only the server DNS (or WINS) name (i.e., http://). There are additional configuration steps required to make this happen. These steps are different depending on whether your site is installed at the root of the IIS site or off root. If your new CMS site is at the root of the IIS site, you are likely to expect that your default CMS page will be returned to the user as a result of accessing the URL http://. However, this is not the case; regardless of the IIS default document configuration, to return the default home page, the URL has to specify the name of the default page explicitly • Table of Contents (i.e., http:/// Programs > Microsoft Content Management Server > Site Manager); type in the Pub Date: October 31, 2003 initial CMS administrator credentials; right-click the Channels node in the middle pane ISBN: 0-321-19444-6 (Figure 8-33) and select New Channel. In the Name box, type the DNS name for your Pages: 1136 CMS site (for example, www.botsconsulting.com), and click OK (Figure 8-34). Close the Site Manager.
Figure 8-33. Creating a new top-level channel in the Site
"This is one of those rare books that you will read to learn about the product and keep Manager rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Figure 8-34. Top-level channel that is mapped to the HTTP host header Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
NOTE: We will look into creating channels in the Site Manager for the new CMS site in Chapter 9. Refer to Chapter 16 for a detailed discussion about working with channels. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
We configured your newShell CMS siteBleeker to return the home By Billhave English , Olga Londer , Shawn , Todd , Stephen Cawoodpage
to the root URL.
If your new CMS site is an off-root Web application, your default CMS page will be returned to the Publisher: user as Addison a resultWesley of accessing the URL http:///. This is expected behavior; however, you may want to change it. In this scenario, the request to the Pub Date: October 31, 2003 root is handled by IIS. If you want the user to access your CMS site by the root URL ISBN: 0-321-19444-6 http://, you will have to provide redirection from the root to /. Pages: 1136
[ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating a CMS Site with Shared Resources So far we have focused on creating a new CMS site that has its own database. The site can be installed at the root of the Web site or as an off-root Web application. In this configuration, one IP address and one registered DNS name are required. However, it is sometimes necessary to share the resources, especially in a development environment. For example, you may need to have several independent CMS sites sharing the same IIS site and the same database; or your environment may already have multiple IIS sites that you would like to become CMS sites that share the same database; or it may be required in the development environment that CMS sites share the IIS site, with each site having its own • Table of Contents database. All these solutions are possible. We willGuide now determine the setup steps for each of Microsoft Content Management Server 2002: A Complete these configurations. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Multiple Sites Sharing an IIS Site and a Database Publisher: CMS Addison Wesley Pub Date: October 31, 2003
You can have several CMS sites sharing the same database and the same IIS site. Each site is ISBN: 0-321-19444-6 identified by1136 an independent URL, http://. Each site has its own DNS name; the Pages: fact that they share a server infrastructure is transparent to the user. One IP address and several registered DNS names are required; all DNS names point to the same IP address mapped to the IIS site. All sites share the same CMS administrator and guest accounts; they also share the same administration tool and the user groups. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Assuming that the first CMS site is installed at the root of an IIS site and has already been —Gary Bushey, SharePoint Server MVP configured using the steps we have discussed, to add a new CMS site, you need to do the following: Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. an authoritative product information has been . . . until Using However, the IIS snap-in, add a hostsource headerof to the existing IIS missing site, as shown in now. Figure 8-35. (Right-click the IIS site; select Properties; in the Web Site tab in the Web Site Identification section, click Advanced; in the Advanced Multiple Web Site Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Configuration dialog in the Multiple Identities table, select your IIS site; in the Advanced how to effectively unlock the power of CMS. Administrators and developers alike will learn how Web Site Identification dialog, type in the host header name, which is the site DNS name.) to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Figure 8-35. Adding HTTP host headers
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missedNames before." Usingtothe SCA, verify that Map Channel to Host Header Names is set to Yes. —Gary Bushey, SharePoint Server MVP Using the Site Manager, create a new top-level channel called (Figure 8-36). Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Figure 8-36. Multiple top-level channels mapped to HTTP host Web sites. However, an authoritative source of product information has been missing . . . until headers now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Using Windows Explorer, create a separate subdirectory in the home directory of the IIS site that you will use to store the files for your new site. This step is optional; however, it is highly 6: advisable it will allow you to separate the site files and avoid confusion Chapter How dobecause you customize workflow? in the future. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 In this scenario, of .NET? the sites can use Secure Sockets Layer (SSL) because HTTP host using Visualnone Studio headers that identify different sites are included in the encrypted client request, and therefore Chaptercannot 17: How do place. you establish user rights? the mapping take Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? NOTE: Refer to Chapter 18 for a full explanation of how this setup works. Chapter 32: How do you publish dynamic data?
[ Team LiB ] Sometimes, a developer working on several CMS projects on one machine may want to move from one project to another without reconfiguring the environment. This is usually achieved by creating several CMS Web applications on one IIS site. Each Web application is installed in the virtual directory off the IIS site root; they all share the same database. Each CMS project is identified by a URL pointing to the separate CMS Web application, http:///. The CMS site name is the name of a Web application hosted by the IIS Web site; each site is a separate Web application.
In this scenario, one IP address and one DNS name for the IIS site are required. You don't have to enable host headers on the IIS site, and the host headers mapping is disabled in CMS. Assuming that the first CMS Web application is installed off an IIS site root, to create a new CMS site in this way, perform the following tasks: •
Table of Contents
Create a directory on the hard disk that will be the home directory for a Web application that will contain your CMS site.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Configure the virtual directory on the IIS site to point to this physical directory. Make sure it is configured as a Web application. Publisher: Addison Wesley
Create the /CMS virtual Pub Date: October 31, 2003
directory under your Web application (i.e., //CMS, ISBN: 0-321-19444-6 which points to the physical directory /Program Files/Microsoft Content Management Server/Server/IIS_CMS). Pages: 1136 Check that the /webctrl_client virtual directory exists at the root of the IIS Web site; if it doesn't, create it and point it to /Inetpub/wwwroot/webctrl_client.
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Multiple CMS Sites Each an Independent Dedicated IIS site, —Gary Bushey, SharePoint Server Using MVP
Sharing a Database
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their You can have multiple CMS sites on the same machine that each use a dedicated IIS site while Web sites. However, an authoritative source of product information has been missing . . . until sharing the same database. Each CMS site is identified by an independent URL, http://. Each IIS site has its own DNS name; it may have its own IP address and port number, or they may Content be shared. If they areServer shared, then Aeach site is Guide identified by first an HTTP Microsoft Management 2002: Complete is the bookhost thatheader. explainsAs before, the fact that the sites share a server infrastructure is transparent to the user. Because how to effectively unlock the power of CMS. Administrators and developers alike will learn how all enhance sites share theWeb database, the sites share the same CMS administrator and guest accounts; to their servers' scalability, flexibility, and extensibility by using CMS features and theyto also share content the same tool and the user groups. API manage onadministration the Microsoft platform.
Assuming that reference the first CMS site is installed the root of an IISshows site and has already beenand This thorough explains the productatarchitecture, then you how to create created using the steps we have discussed, to add a new CMS site, you need to do the edit content and use the workflow. Topic coverage includes CMS administration and security, following: the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Webcreate site development. Inside you'll findbe answers to such questions Using Windows Explorer, a physical directory that will the home directory for the as: new site. Using the IIS snap-in, create a new virtual IIS site; the home directory for this site should Chapter 6: How do you customize workflow? point to a physical directory you've created. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Using the SCA, configure the new IIS site as a CMS Web entry point. Verify that Map using Visual Studio .NET? Channel Names to Host Header Names is set to Yes. Chapter 17: How do you establish user rights? Using the IIS snap-in, add the /CMS and /webctrl_client virtual directories to your IIS site; they22: should to best the physical directories /Program Chapter How point do you deploy CMS according to your organization's needs, size, Files/Microsoft Content Management Server/Server/IIS_CMS and /Inetpub/wwwroot/webctrl_client, respectively. Chapter 32: How do you publish dynamic data? Using the Site Manager, create a new top-level channel called .
[ Team LiB ]
Multiple CMS Sites Sharing an IIS Site, Each Using an Independent Dedicated Database In a development environment, developers are often required to work on several independent CMS projects. Sometimes, they must have an independent dedicated database for each project. Usually, these requirements come from the organization's security policy. You can have several independent CMS sites that share one IIS site, with each having its own database. Each site is identified by a URL pointing to the separate CMS Web application, http:///. The CMS site name is the name of a Web application hosted by the IIS Web site; each site is a separate Web application. CMS can only use one database at a time. Therefore, you will have to switch between the databases using the DCA. •
Table of Contents
One IP address and one DNS name for the IIS site are required. You don't need to enable HTTP host headers on the IIS site, and host headers mapping is disabled in CMS in this scenario.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
To create a new CMS site in this way, perform the following tasks, using the detailed instructions provided at the beginning of the chapter: Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Create a new database and assign permissions to the CMS system account. Pages: 1136
Create the directory on the hard disk that will be the home directory for a Web application that will contain your CMS site. Configure the virtual directory on the IIS site to point to this physical directory. Make sure it is a Web application. "This is one of those rare books that you will read to learn about the product and keep Run the DCAthose to configure the you database asbefore." the CMS database and to assign an initial CMS rereading to find tidbits that missed administrator account.Server MVP —Gary Bushey, SharePoint RunManagement the SCA to check that the IIS sitebecoming is configured as content-management a CMS Web entry point with Content Server (CMS) is fast a vital tool that read/write permissions, and to assign a CMS guest account. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Create the /CMS virtual directory under your Web application (i.e., //CMS, which points to the physical directory /Program Files/Microsoft Content Management Server/Server/IIS_CMS). Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Check their that the virtualflexibility, directoryand exists at the rootby ofusing the IIS Web site; if and it to enhance Web/webctrl_client servers' scalability, extensibility CMS features it and point it to /Inetpub/wwwroot/webctrl_client. API todoesn't, managecreate content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and [ Team LiB ] and use the workflow. Topic coverage includes CMS administration and security, edit content the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we looked into the options for creating a new CMS site. To start with, we focused on a CMS site with a dedicated database that can be installed at the root of an IIS site or as an off-root Web application. To create the site, we performed the following tasks: created a new database and configured MCMS system account permissions for this database; set up an IIS site; configured the new database as a CMS database and specified the CMS administrator account; configured the IIS site to become a CMS site, enabled guest access, and specified the CMS guest account; and added virtual directories manually. We also looked into enabling root URL access to our new CMS site so that users can access it by the URL http://. •
Table of Contents
We created a new empty site that2002: is authoring-enabled. Microsoft Content Management Server A Complete Guide
You can use the same process to create read-only sites after you have deployed your content.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
We also defined the process for creating CMS sites that share resources, which can be an IIS site and/or a database. These configurations are particularly useful in a development Publisher: Addison Wesley environment. Pub Date: October 31, 2003 ISBN: chapter, 0-321-19444-6 In the next we will create the structure for a new site. Pages: 1136
[ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 9. Setting Up Site Structure In the previous chapter, we created a new CMS site. In this chapter, we will set up a site structure for the new site, including channels, template galleries, and resource galleries, and then assign permissions for the guest users and the site developers. We will base the CMS site structure on the information architecture of the site.
NOTE: In this chapter, we will focus on setting up the structure for the new site. Table Contents Chapters 16 of and 17 provide a detailed discussion of all options available for Microsoft Content Management Server 2002: A Complete Guide configuration of the CMS publishing environment. •
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
A well-planned information architecture is beneficial for both site users and site creators. If the Publisher: Addison Wesley information on the site is well organized, users can understand the site organization Pub Date: October 31, 2003 effortlessly, even when they access the site for the first time. Even if the content on your site is ISBN: 0-321-19444-6 well written and accurate, your site needs logical organization of information. Users want to Pages: 1136 find information quickly and easily, and they do not like to get lost in chaotic cross-referenced Web sites. Poor information architectures make users confused and frustrated. Site creators also benefit from a logically organized site; for example, they don't have to change the existing content and site structure to place new content on the site. A CMS site is no exception and will "This is greatly one of those books that youinformation will read toarchitecture. learn about the product and keep benefit from arare well-thought-out rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Navigation and Channels Most Web sites use hierarchical organization schemes—all site content starts from the home page. Information hierarchies provide one of the best ways to organize complex bodies of information. Most users are familiar with the hierarchical approach and find it easy to understand the hierarchical site structure. Effectively employing a hierarchical structure requires a thorough analysis of how to best organize your content. The information architecture defines your site's navigation. If your site is well organized, it makes it easier for users to navigate their way around it. Navigation is one of the most critical aspects of any Web site. Regardless of how much useful information a site provides and how • Table of Contents good it looks, if Management it doesn't have a 2002: logical, easy-to-understand navigation scheme, it will confuse Microsoft Content Server A Complete Guide users and may chase them away. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Another critical aspect of any Web site is security. Security requirements must be taken into account when you design your site's architecture since you may require additional structures to Addison Wesley dealPublisher: with security issues. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 There are several basic steps in organizing your information. First of all, you need to divide information into logical units; second, you establish a hierarchy of these units and structure the Pages: 1136 relationships between them. The logical units provide containers for your site's content. In a classic Web site, these containers are virtual directories that provide storage for Web pages; the information architecture is implemented using the virtual directories hierarchy. In a CMS Web site, pages are built from the data in the the CMS database; "This is one of those rare dynamically books that you will read tostored learn about product and they keep are not stored in the virtual directories but instead are organized using virtual storage spaces called rereading to find those tidbits that you missed before." channels. In CMS, the channel is the most granular object to which security can be applied. —Gary Bushey, SharePoint Server MVP Therefore, the channels hierarchy implements the information architecture of your CMS Web site. Content Management Server (CMS) is fast becoming a vital content-management tool that
helps administrators and developers handle the ever-increasing amount of content on their Let's sites. consider the BOTS Consulting Web site.of The information architecture for missing the site .is. shown Web However, an authoritative source product information has been . until in Figure 9-1. On the first level, there are five logical units that may contain other logical units now. and pages: Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how About Us to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toOffices manage content on the Microsoft platform. This thorough Services reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Knowledge running example is used throughout the book to illustrate how important CMS features are implemented Careers in real-world Web site development. Inside you'll find answers to such questions as:
Figure 9-1. Information architecture diagram for the sample site Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
One of the first-level units—Offices—contains pages with information about local offices, while the other four top-level units—About Us, Services, Knowledge, and Careers—contain more logical units. Each of the logical units will become a channel in our site structure; the users will be able to navigate the site using URLs that reflect the hierarchical channels structure. For Publisher: Addison Wesley example, http://www.botsconsulting.com/services would take the user to the services channel, Pub Date: October 31, 2003 which represents the Services logical unit within our site.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
ISBN: 0-321-19444-6 1136 descriptive text as a link for the logical unit of information represented by a Often,Pages: we need channel. Such text may be too long or otherwise unsuitable to be used as part of the URL. For example, we could use "Pharmaceuticals" for the link and http://www.botsconsulting.com/services/pharma as the URL. To this end, CMS provides two different name properties for a channel: is used asproduct part of the "This is one of those rare books that you the will channel read to name learn about the andURL, keepand the channeldisplay name provides text you for the link to this channel. In our example, "pharma" is the rereading to find those tidbits that missed before." channelBushey, name, and "Pharmaceuticals" —Gary SharePoint Server MVPis the channel display name.
The channels structureServer that is(CMS) mapped to the information architecture for the BOTStool Consulting Content Management is fast becoming a vital content-management that site is shown in Figure 9-2. You can see that the names of the channels are sometimes helps administrators and developers handle the ever-increasing amount of content on their different from the names of the logicalsource units in information architecture diagram Web sites. However, an authoritative of the product information has been missingin. Figure . . until 9-1. The reason is that Figure 9-2 shows channels by their names that are used in the URLs; now. when a link to a channel is displayed on the site, it is presented using the channel's display name. Each page on the BOTS Consulting siteAwill have a Guide global is navigation bar atthat theexplains top of the Microsoft Content Management Server 2002: Complete the first book page showing links to the first-level channels by their display names (Figure 9-3), and the how how to effectively unlock the power of CMS. Administrators and developers alike will learn drop-down will servers' further show the structure of and eachextensibility channel. by using CMS features and to enhance menus their Web scalability, flexibility, API to manage content on the Microsoft platform.
Figure 9-2. Channels structure for the sample site
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Figure 9-3. Global navigation of the sample site
•
NOTE: Creating dynamic navigation for a CMS site is discussed in detail in Chapter 14. Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Creating channels is the first step in setting up the CMS site structure. To set up the site structure, we will use the CMS Site Manager. Publisher: Addison Wesley
Pub Date: October 31, 2003
[ TeamISBN: LiB ]0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Using the Site Manager The Site Manager is a Win32 application called NRclient.exe. It is located at :\Program Files\Microsoft Content Management Server\Client\. The Site Manager is launched using the shortcut from the Start menu (Start > Programs > Microsoft Content Management Server > Site Manager).
NOTE: The shortcut points the Site Manager application on the local machine to the login ASP page on the CMS server box, as follows::\Program • Table of Contents Files\Microsoft ContentServer Management Server\Client\NRclient.exe http://:<port number>/NR/System/ClientUI/login.asp. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Addison Wesley ThePublisher: Site Manager can be installed on any computer running Windows 2000/XP. It uses HTTP as Pub Date: October 31, 2003 to the CMS server, so HTTP access is required between the the protocol for connecting ISBN: 0-321-19444-6 computer where the Site Manager is installed and the CMS server. Although the Site Manager Pages:to 1136 uses HTTP connect to the CMS server, it doesn't have a browser interface; the HTTP access is implemented by a proxy.
"This is one of those rare books that you will read to learn about the product and keep NOTE: thethose Site Manager cannot be launched on the client, check that the URL rereading to If find tidbits that you missed before." http://:<port number>/NR/System/ClientUI/login.asp is —Gary Bushey, SharePoint Server MVP accessible from the browser on the client machine. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until The Site Manager is an administration tool; therefore, only authorized users have access to it. now. When you start the Site Manager, the authentication dialog is always displayed (Figure 9-4). There areContent two choices: "Log on Server as <user name>" providesGuide the credentials the that currently Microsoft Management 2002: A Complete is the firstof book explains logged-on user to the CMS server; "Log on as the following user" requires specifying the how how to effectively unlock the power of CMS. Administrators and developers alike will learn domain, user name, password explicitly. to enhance their Weband servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Figure 9-4. Site Manager authentication dialog
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 NOTE: The credentials of the currently logged-on Windows user are not sent to CMS automatically; you have to select the first option in the authentication dialog for this to happen.
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." When you start the Site Manager the first time after creating a new CMS site, only the CMS —Gary Bushey, SharePoint Serverfor MVP administrator account specified in the DCA is authorized to access the Site Manager. As shown in Figure Management 9-4, you needServer to type in theisCMS credentials and click Start.tool that Content (CMS) fast administrator becoming a vital content-management helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: It is a good practice for the CMS administrator account to be different from the system Microsoft Contentadministrator Managementaccount. Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The Site Manager window consists of three panes (Figure 9-5). The left pane provides the ability to switch betweenexplains configuring resource galleries, template galleries, and and user This thorough reference the channels, product architecture, then shows you how to create roles. Depending on which icon you select in the left pane, the middle and the right pane will edit content and use the workflow. Topic coverage includes CMS administration and security, show the appropriate information. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in 9-5. real-world site development. Inside you'll find to such questions Figure SiteWeb Manager window showing a answers new empty site as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
When you select the Channels icon, the middle pane shows the channel structure, while the right pane shows pages within a selected channel. When you start the Site Manager, the Publisher: Addisonthe Wesley channels hierarchy is displayed by default. For each page within a channel, several properties Pub Date: October 31, 2003 are displayed in the right pane: the page name, whether the page has been flagged as ISBN: 0-321-19444-6 Important, the locking owner, the start date, the expiry date, and the date and time when the Pages: 1136 page was last modified. When you select the Resource Gallery icon, the middle pane shows the resource galleries structure, while the right pane shows resources within a selected gallery. For each resource, the following properties are displayed: the resource name, the locking owner, the file size, the file MIME type, and when the file was last modified. When you select the "This is one of those rare that youshows will read learn about the structure, product and keep Template Gallery icon, thebooks middle pane the to template galleries while the right rereading to templates find those within tidbitsathat you missed pane shows selected gallery.before." Each template has the following properties —Gary Bushey, SharePoint Server displayed: the template name, the MVP locking owner, and when it was last modified. Content (CMS) isgalleries fast becoming vital content-management tool that ChannelsManagement and templateServer and resource containaother data; within the CMS environment helps administrators and developers handle the ever-increasing amount of content on their they are collectively known as containers. Web sites. However, an authoritative source of product information has been missing . . . until now. The Site Manager interface uses the familiar Windows Explorer-type metaphor. We can cut, copy, paste, and delete objects displayed in the middle and the right panes in the usual way. Microsoft Content Management Server 2002: A Complete is the The first four buttons on the Site Manager toolbar provideGuide shortcuts forfirst thebook Cut, that Copy,explains Paste, how to effectively unlock the power of CMS. Administrators and developers alike will learn how and Delete operations. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manage the Microsoft platform. The to next buttoncontent on the on toolbar is the shortcut for Global Refresh. When we work on the site structure using the Site Manager, the objects and the settings we configure are stored in the This therights product then shows you how to create and CMS thorough database.reference However,explains only user are architecture, updated in the database immediately. All other edit content and use the Topic coverage CMS administration andinsecurity, settings are first put in a workflow. cache. This cache resides includes on the client; it is implemented the proxy. the Publishing API, deployment site configuration, template development. A away. We actually change the settingsoptions, on the cached objects; theand database is not updated right running example is used throughout the book to illustrate how important CMS features are Caching is used to increase Site Manager performance and to prevent the database objects implemented in real-world Web site development. Inside you'll find answers to such questions from being locked. However, sometimes when multiple users are creating objects or changing as: the settings, the cached objects can become out of sync with the database. To synchronize the Site Manager cache with the CMS database, use the View > Global Refresh menu command or the Global Refresh button on the toolbar. You can individually synchronize each object by Chapter 6: How do you customize workflow? selecting Refresh from the object's shortcut menu. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
NOTE: If, for any reason, an individual object is locked in the CMS database, to Chapter 17: How do you establish user rights? release the lock you can use the Kill Lock command from the object's shortcut menu. To release the lockdo foryou all best objects in the CMS database, Tools > Kill Lock Chapter 22: How deploy CMS according to use yourthe organization's needs, size, menu command. The Kill Lock command is available to users with administrative and resources? rights, such as CMS administrators and channel managers. Chapter 32: How do you publish dynamic data?
[The Team ] lastLiB button on the toolbar is the Properties button; it displays the properties dialog for an object selected in the middle pane.
NOTE: All buttons on the toolbar are available when you select the Channels, Resource Gallery, or Template Gallery icons in the left pane. Only the Global Refresh button is available when you select User Roles.
All objects presented in the Site Manager are uniquely identified within the CMS database by their Globally Unique Identifier (GUID). Object names do not act as unique identifiers; therefore, we can have objects with the same names if required. For example, to provide a seamless consecutive update for a page, you can have two pages with the same name within • Table of Contents the same channel. The expiration date of one version of the page should be set as the start Microsoft Content Management Server 2002: A Complete Guide date of the other version; both pages have to be approved using the Web Author console. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Wesley NOTE:Addison CMS does not
objects with the same Pub Date: October 31, 2003
enforce uniqueness for the object names. We will discuss names in more detail in Chapter 16.
ISBN: 0-321-19444-6 Pages: 1136
When an object in the middle or the right pane is deleted, it is moved into the Deleted Items container displayed in the middle pane. The channels, resource galleries, and template galleries hierarchies have their own Deleted Items container, which acts as a Recycle Bin for the "This is oneyou of those rare books that youthere will read to learn about the product and keep hierarchy; can restore objects from or clear the deleted items. rereading to find those tidbits that you missed before." —Gary Bushey, MVPthe Site Manager displays a warning message. If you By default, whenSharePoint a channel Server is deleted, don't want this warning to be displayed, in the Tools > Options dialog clear the Delete Channel Content Management Server Notice check box (Figure 9-6).(CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Figure 9-6. Site Manager Options now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, Server MVP Creating theSharePoint Channels Hierarchy Content Management Server (CMS) is fast becoming a vital content-management tool that To create a new channel, in the Site Manager, the channels hierarchy by clicking the helps administrators and developers handle thedisplay ever-increasing amount of content on their Channels icon in the left pane of the Site Manager window; right-click the channel where Web sites. However, an authoritative source of product information has been missing . . .you'd until like the new channel to be created, and select New Channel. Since we are creating the first now. channel for the site, right-click the root node in the hierarchy called Channels, and then select New Channel. The Management New ChannelServer dialog 2002: box is A displayed, shown Figure 9-7. It contains Microsoft Content Completeas Guide is in the first book that explains several fields at the top of the dialog and several tabs underneath. Let's look into the Name, how to effectively unlock the power of CMS. Administrators and developers alike will learn how Display Name, Description, andscalability, Parent Channel fields. to enhance their Web servers' flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Figure 9-7. New Channel dialog box
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators andour developers handle the ever-increasing We will start with giving new channel a name. This name willamount be usedofascontent part ofon thetheir Web sites. However, anpages authoritative source of in product information has been missing name . . . until hierarchical URL for all and subchannels the new channel. When the channel is now. used in the URL, it is URL-encoded. If special characters are used in the channel name, the URL can become very user unfriendly. For example, a space character in a channel name is replaced Microsoft Server 2002: Complete Guide is thespaces first book that explains by a plus Content sign (+) Management in the URL; therefore, it's aAgood practice to avoid in channel names. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' flexibility, and extensibility by using CMS features and There are restrictions on what scalability, a channel name can contain. These restrictions are listed in the API to manage content on the Microsoft platform. sidebar. This thorough explains architecture, then shows you how to create and For the samplereference site, we will namethe theproduct top-level channel "bots consulting." edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are NOTE: Our sample Web site is development. installed as a Web application a virtualtodirectory off implemented in real-world Web site Inside you'll findinanswers such questions as: the root of an IIS virtual Web site. As we discussed in Chapter 8, if you'd like your CMS site to be in the root of a Web site, the top-level channel name should be mapped to the HTTP host header; in our example, it would be Chapter 6: How do you customize workflow? www.botsconsulting.com. Both approaches are perfectly viable. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Naming Channels Do: Use English letters and numbers [a–z, A–Z, 0–9] as well as four special characters: dash, underscore, and left and right parentheses [–, _, (, )]. Give channels unique names within a site. Don't: •
Table of Contents Use non-US-ASCII alphanumeric characters.
Microsoft Content Management Server 2002: A Complete Guide
Use the sixLonder special characters #, Bleeker &, %, ,+, /, |. Cawood ByBill English , Olga , Shawn Shell, Todd Stephen Use long names. A channel name must be less than 100 characters in length. Publisher: Addison Wesley
Use two consecutive periods.
Pub Date: October 31, 2003
ISBN: 0-321-19444-6 Use a period as a last character. Pages: 1136
Use NR for a name—this is a reserved name for the root virtual directory in CMS (the name denotes the origins of CMS as an NCompass Resolution [NR] server). "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint The Display Name property Server doesn'tMVP have the same restrictions as the Name property. It can contain non-US-ASCII as well as spaces. As we have mentioned already, the display name is a Content Management is for fastabecoming a vital content-management that is user-friendly alias thatServer is used(CMS) as text link pointing at your channel when the tool channel helps administrators and developers ever-increasing amount of content their presented to the users—for example,handle within the a navigational structure for your site inon a browser, Web sites. However, an authoritative source of product information has been missing . . . until or within the Web Author console or the Authoring Connector. The Display Name property can now. be set up in any language because it can include non-US characters, including double-byte characters. This is particularly useful for multilingual sites. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how toare effectively unlock the power of to CMS. Administrators developers alikecan willclick learn how If you happy for the display name be identical to the and channel name, you the to enhance theirbutton Web servers' flexibility, and extensibility using CMSthe features Same as Name (Figure scalability, 9-7). For the "botsconsulting" channel,by we will use displayand API to BOTS manage content on the Microsoft platform. name Consulting. This thorough reference explains product architecture, then shows you howdescription to create and The Description field is an optionalthe field that allows us to provide a meaningful for edit content and workflow. coverage CMS andcharacters. security, the channel. It isuse not the normally usedTopic outside the Siteincludes Manager andadministration can contain any the API, is deployment sitebe configuration, andcharacters template development. A The Publishing only limitation its size—it options, should not more than 255 in length. running example is used throughout the book to illustrate how important CMS features are implemented in real-world site development. Inside you'll find answers such questions The Parent Channel field is Web a read-only field that displays the full path to theto parent channel as: from the root of the channels hierarchy. We are creating the first channel for the site; therefore, the parent channel is the root identified as /Channels. For example, when you create a first-level channel, such as the "knowledge" channel in our sample site, the parent channel 6: as How do you customize workflow? will beChapter identified /Channels/botsconsulting/knowledge. 10: How do you develop Content Management Server (CMS) 2002 ThereChapter are several configuration tabs in for theMicrosoft New Channel dialog box: Rights, Rendering, using Visual Studio .NET? Lifetime, Web Authoring, and Options. We don't need to use them now; after the channel has been created, the same configuration options are available from the Channel Properties dialog Chapter 17: How you establish user rights? box. In this section, wedo concentrate on creating the channels structure for our site; all channel configuration options are discussed in detail later in the book in Chapter 16. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? NOTE: If you'd like to know more about channel configuration options now, refer to
Chapter [ Team LiB ] 16, and then come back to this chapter.
To save the newly created top-level channel, click OK in the New Channel dialog box. We will carry on with creating the channels hierarchy for our sample site using the names and display names that are listed in Table 9-1.
NOTE: >When you create multiple subchannels within a channel, by default the subchannels are sorted and displayed in alphabetical order. To change the sorting order within a channel, right-click the channel in the Site Manager, select Properties, choose the Sorting tab, and arrange the subchannels in the required order. This is important for dynamic navigation generation. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
After all channels have been created, the channels hierarchy in the Site Manager appears as shown in Figure 9-8. Publisher: Addison Wesley
Figure 9-8. Channels hierarchy for the sample site
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: The channels we have created don't contain any pages. Let's see what is displayed in the browser if we access one of the channels we've just created—for example, Services. Because the sample site created as a Web application off the root of the IIS virtual server, this Chapter 6:has Howbeen do you customize workflow? channel is accessible using the URL http://www.botsconsulting.com/botsconsulting/services. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
NOTE: the How sample site establish were created the root of the IIS virtual server, the URL ChapterIf17: do you user in rights? for the services channel would be http://www.botsconsulting.com/services. Refer to Chapter 822: do you best deploy according to your organization's needs, size, Chapter forHow options for creating CMSCMS sites. and resources? Chapter 32: How do you publish dynamic data? After we've typed the URL in the browser, CMS displays the default authentication page (Figure
[9-9). Team LiB ]
Figure 9-9. CMS authentication page
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Table 9-1. Sample Site Channel Names and Display Names
First-Level Channel Name Second-Level Channel Name Channel Display Name "This is one of those rare books that you will read to learn about the product and keep about About Us rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP firm Our Firm Content Management Server (CMS) is fast becoming a vital content-management tool that consultants Our of Consultants helps administrators and developers handle the ever-increasing amount content on their Web sites. However, an authoritative source of product information has been missing . . . until history History now. press 2002: A Complete Guide is the Infirst the book Pressthat explains Microsoft Content Management Server how to effectively unlock the power of CMS. Administrators and developers alike will learn how offices Offices to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. services Services This thorough reference explains the product architecture, then shows you how to create and technology Technology edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A manufacturing Manufacturing running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions construction Construction as: pharma Pharmaceuticals Chapter 6: How do you customize workflow? knowledge
Knowledge
Chapter 10: How do you develop for Microsoft Content Management casestudies Case Server Studies(CMS) 2002 using Visual Studio .NET? articles Articles Chapter 17: How do you establish user rights? research Research Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? careers Careers Chapter 32: How do you publish dynamic data? working
Working at BOTS
[ Team LiB ]
people
Our People Matter
growth
Growth Opportunities
applying
Applying to BOTS
NOTE: The default authentication page is an ASP page called Manual Login.asp, located in the folder :\Program Files\Microsoft Content Management Server\Server\IIS_NR\System\Access\.
We have to type in the CMS administrator credentials because this account is currently the only Table of Contents one that exists in CMS. Then the CMS default channel page is displayed (Figure 9-10). This Microsoft Content Management Server 2002: A Complete Guide page shows the links to the parent channel, the same-level channels, and the child channels for ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood the services channel. The Switch to Edit Site link is displayed because the CMS administrator by default has authoring rights in all channels. •
Publisher: Addison Wesley
Figure 9-10. CMS channel default page
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment configuration, templatelocated development. NOTE: The channel defaultoptions, page is site an ASP page calledand Cover.asp, in the A running example is used throughout the book to illustrate how important CMS features are folder :\Program Files\Microsoft Content Management implemented in real-world Web site development. Inside you'll find answers to such questions Server\Server\IIS_NR\Shared\. as: Chapter 6: How do you customize workflow?
Creating the Template Galleries Hierarchy
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Just as channels provide a way to organize pages, template galleries allow us to organize templates. A template contain templates Chapter 17: How gallery do you may establish user rights? and other template galleries. A template galleries hierarchy is an integral part of the CMS site structure. Template galleries can be created in the 22: SiteHow Manager and in Visual .NET (VS.NET); are created Chapter do you best deployStudio CMS according to yourtemplates organization's needs, using size, VS.NET only. and resources?
Usually, site developers create templates and template Chapter 32: How do you publish dynamic data? galleries in VS.NET; we will look into that in the next chapter. However, you may need to create a template gallery using the Site
[Manager; Team LiBlet's ] do it.
To create a new template gallery in the Site Manager, click the Template Gallery icon in the left pane to display the template galleries panes; then right-click the gallery where you'd like the new gallery to be created and select New > Gallery. We are creating the first template gallery for the site; therefore, right-click the root node in the tree called Templates and select New > Gallery. The New Template Gallery dialog box appears (Figure 9-11).
Figure 9-11. New Template Gallery dialog box
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Using the NewinTemplate Gallery dialog box, we canInside nameyou'll the new gallery provide implemented real-world Web site development. find template answers to such and questions a description for it. The name should be easily understood by the content authors. The as: description is optional and is limited to 255 characters in length. Parent Gallery is a read-only field that shows the full path to the parent gallery from the root of the template galleries Chapter you the customize hierarchy. We6: willHow talkdo about Rights workflow? tab later; click OK to create the new gallery. Chapter 10: How youcreated developafor Microsoft Content Management Server(Figure (CMS) 9-12). 2002 For our sample site, wedo have template gallery called BOTS Consulting using Visual Studio .NET?
Figure 9-12. Template gallery hierarchy for the sample site
Chapter 17: How do you establish user rights?
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating the Resource Galleries Hierarchy A resource gallery provides the ability to organize resources for our site. The resource gallery • Table of Contents can contain individual files—for example, images—as well as other resource galleries. A Microsoft Management 2002: A Complete Guide resourceContent galleries hierarchyServer is part of the CMS site structure.
Resource galleries are created the Resource Manager in the
using the Site Manager but are populated with resources using By Bill English , Olga Londer, Shawn Shell , Todd Bleeker , Stephen Cawood Web Author.
To create a Addison new gallery, Publisher: Wesley click the Resource Gallery icon in the left pane to display the resource galleries panes; then right-click the gallery where you'd like the new gallery to be created and Pub Date: October 31, 2003 select New > Gallery. We are creating the first resource gallery for the site; therefore, rightISBN: 0-321-19444-6 click the root node in the tree called Resources and select New > Gallery. The New Resource Pages: 1136 Gallery dialog box appears (Figure 9-13).
Figure 9-13. New Resource Gallery dialog box "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. To name the new gallery, in the New Resource Gallery dialog box type in the Name field. The name should be meaningful for the content authors. The description is optional and, similar to Microsoft Content is Management Server 2002: A is the first book that explains other containers, limited to 255 characters in Complete length. AsGuide with template galleries, Parent how to effectively unlock power of the CMS. and developers alike how Gallery is a read-only fieldthe that shows fullAdministrators path to the parent gallery from thewill rootlearn of the to enhance their Web servers'We scalability, flexibility, and extensibility by using features and resource galleries hierarchy. will talk about the Rights tab later; click OK toCMS create the new API to manage content on the Microsoft platform. gallery. This thorough explains thecreated productaarchitecture, thencalled showsBOTS you how to create and Again, for our reference sample site, we have resource gallery Consulting (Figure edit content and use the workflow. Topic coverage includes CMS administration and security, 9-14). the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Figure 9-14. Resource Gallery hierarchy for the sample site implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 32: How do you publish dynamic data? UserChapter Rights
and [Channels Team LiB ] template and resource galleries form the structure for the CMS site. However, at the moment, this structure is only accessible to one user—the CMS administrator. This is not sufficient; therefore, we need to assign CMS permissions on our site to other users. In the CMS environment, there are eight predefined user roles: administrators, channel managers, template designers, resource managers, authors, editors, moderators, and subscribers. We have already come across the subscribers, authors, editors, and moderators roles. For example, in Chapter 6, we have seen the user roles involved in the publishing workflow, such as authors, editors, and moderators. The other four roles—administrators, channel managers, template designers, and resource managers—perform various tasks in site development and administration. Administrators have permissions to perform any tasks in the CMS environment; channel managers are responsible for administration of the channels they are assigned to; template designers develop templates; and resource managers look after resources in the resource galleries they are assigned to. • of Contents We will haveTable a detailed discussion focused on user roles and setting up user rights in the CMS Microsoft Content Management Server A Complete Guide environment later in the book, in 2002: Chapter 17. However,
there are two groups of users that development stage: the subscribers and the template designers. In this section, we will concentrate on assigning rights for these two types of users.
need to have appropriate permissions the ,site during the By Bill English , Olga Londer, Shawn Shell, Todd on Bleeker Stephen Cawood
Publisher: Addison Wesley
To access the user roles panes in the Site Manager, click the User Roles icon in the left pane Pub Date: October 31, 2003 (Figure 9-15). Assigning permissions to user accounts involves several steps, which include ISBN: 0-321-19444-6 adding a user account to a CMS rights group within a role and then assigning this group to the Pages: 1136 appropriate containers.
Figure 9-15. User roles within the Site Manager "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Let's start with subscribers. Subscribers are ordinary users who are allowed to browse our site. In the CMS environment, there is no anonymous access to the site; all access must be authenticated. In Chapter 8, we have already enabled a guest account to be used for Chapter 6: How customize workflow? anonymous access to do theyou site; we now need to provide subscriber permissions for this account. Chapter How do you adevelop for Microsoft Content Management Server (CMS) First of all, we10: need to create subscribers rights group. Right-click the Subscribers role 2002 in the using Visual Studio .NET? middle pane and select New Rights Group. The group called New Rights Group is created and is displayed in the right pane; right-click it, select Rename, and give it a meaningful name. For Chapter 17:we How you user Consulting rights? our sample site, willdo call theestablish group BOTS Subscribers (Figure 9-16). Chapter 22: How do you best deploy CMS according to your organization's needs, size, 9-16. Subscribers rights group for the sample site andFigure resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Second, we need to add the CMS guest account to this group. To add the account to the group, right-click the group, select Properties, and choose the Group Members tab. The Rights Group Members listAddison is currently Publisher: Wesley empty; there are no group members. Click the Modify button; in the Group or User Name Pub Date: October 31, field, 2003 type the guest account name using the format WinNT://<domain name>/—for example, WinNT://MCMS/MCMSguest (Figure 9-17). If you don't ISBN: 0-321-19444-6 want to type a name, you can select a domain from the list called NT Domains, then from the Pages: 1136 top drop-down list choose Select from a list of all groups and users, and then browse to the guest account. Don't be confused by the label NT Domains. It is inherited from the previous version of CMS; in fact, Windows 2003, 2000, and NT domains are listed. After you've specified the guest account either by typing or by browsing, click Add and then OK. The guest account "This is one of those rare books that youlist will read to learn about the product and keep has been added to the group members (Figure 9-18). rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Figure 9-17. Specifying the group member account
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Servermembership MVP Figure 9-18. Guest user of the Subscribers rights group Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
The third step32: is toHow assign permissions to the new group. To assign permissions for multiple Chapter do you publish dynamic data? containers, we will use the group's Properties > Group Rights tab. The tab displays the
The red X beside a container name indicates that the group does not [containers Team LiB hierarchies. ] have permissions for this container. To assign one container to a rights group, you need to click once the name of the container. The red X beside the container name changes to a green check mark, which means that the group has permissions on the container. The actual permissions are defined by the subscribers role. In order for our users to browse the whole site, they need to be able to view content in all channels and galleries; this means that the subscribers group must be assigned to all containers. By default, the child containers don't inherit the rights from the parent container. However, you'll be relieved to know that we don't have to change the red Xs to the green check marks for each container individually. Instead, we can assign the permissions to the root containers and propagate them to the rest of the hierarchy. For example, click the Channels root container to assign permissions for it, then right-click the container, and select Propagate Rights to Children. Each red X beside the container and all its children changes to a check mark. Repeat the same process for the Resources and Templates root containers (Figure 9-19); click OK. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Figure 9-19. Subscribers group rights for the sample site containers
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: NOTE: To assign permissions individually for each container, use the Rights tab in the
container's Properties dialog box. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 We have enabled the users to browse the site without authentication. However, at the moment using Visual Studio .NET? there is nothing for them to browse, because the site is empty. The content for the new site will be provided theHow sitedo authors. In orderuser to be able to provide the content, the site authors Chapterby17: you establish rights? need the templates on which to base their pages. The templates for our new CMS site must be created by the22: siteHow developers; without theCMS templates, there will be no content and therefore Chapter do you best deploy according to your organization's needs, size, no site. Inresources? order for the developers to be able to create CMS templates, they must be assigned and the appropriate permissions. That's what we will do next. Chapter 32: How do you publish dynamic data? A template designer is a special user role within the CMS environment for the site developers.
template designers group is assigned to a container, the members of this group can [When Teama LiB ] create new containers within this container and assign rights to these new containers, including channels, template galleries, and resource galleries. When a template designers group is assigned to a template gallery, within this gallery the members of the group can create and edit templates as well as delete the templates they own. To test their work, they have the subscribers, authors, editors, moderators, and resource managers permissions within the containers where they have rights. To assign the permissions for the template designers, create the rights group within the template designers role, add the developers accounts to this group, and then assign the group to the appropriate containers. You can have more than one template designers group with permissions assigned for different site containers. For our sample site, we will create one group called BOTS Consulting Developers within the template designers role (Figure 9-20), add the developers accounts to it, and then assign the group to all containers within the site (Figure 9-21). • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
Figure 9-20. Template designers rights group for the sample site
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains howFigure to effectively unlock the powerdesigners of CMS. Administrators and developers will learn how 9-21. Template group rights for thealike sample site to enhance their Web servers' scalability,containers flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we created the site structure for the new CMS site. We started with understanding the information architecture for the site; we then created a channels hierarchy mapped to the information architecture. Channels are virtual containers that provide the ability to organize content for the site; thus, the channels structure allows us to create global navigation for the site. The site structure is set up using the CMS Site Manager application; we discussed how the Site Manager works. We created a channels hierarchy as well as resource and template galleries hierarchies for theofsite. Then we assigned permissions for the site users and site developers. • Table Contents This is the minimum set of Server permissions are likely Microsoft Content Management 2002: Ayou Complete Guideto need for the site development stage. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: To set up the publishing environment for your users, you need to assign other CMS permissions in addition to those for subscribers and template designers; the full Pub October 31, roles 2003 and their rights is discussed in Chapter 17. setDate: of CMS user
Publisher: Addison Wesley
ISBN: 0-321-19444-6 Pages: 1136
As we have mentioned previously, our site currently doesn't have any content. In order for the site authors to create pages for the new site, the templates for these pages have to be developed. next chapter, to use Studio .NET for CMS "This is oneIn of the those rare books we thatwill youstart will looking read to into learnhow about the Visual product and keep development. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 10. Developing for CMS Using Visual Studio .NET Overview How Is a CMS Project Different from Regular Web Projects? Creating a New CMS Project •
Table of Contents Template Gallery Items
Microsoft Content Management Server 2002: A Complete Guide
Creating a Londer TGI ,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill English , Olga Adding Placeholder Definitions to Your TGI Publisher: Addison Wesley
Adding Custom Properties
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Summary Pages: [ Team LiB ]1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview When CMS 2002 was released, there was one very significant change in the product: direct integration with an integrated development environment (IDE). In this case, the IDE was Visual Studio .NET (VS.NET). This change in the product has had a great and profound effect on the way you develop solutions based on CMS. First and foremost, from a developer's perspective, you have everything you need to create a new site from within the IDE. Very few times will you have to leave the IDE to accomplish a task; and even in those instances when you do leave the IDE, Microsoft has provided access right from Visual Studio. In this chapter, we'll examine how Visual Studio integrates with CMS. In addition, we'll discuss how to create new template galleries andTable template gallery items (TGIs). • of Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
How Is a CMS Project Different from Regular Web Projects? Although CMS is based on .NET and uses ASPX pages, CMS projects are different from typical Web projects. Most importantly, the ASPX pages that support a CMS site aren't run as themselves. What we mean by this is that the ASPX pages are run in the context of a posting (a Web page) within your site. When a user looks at a CMS-based site, they're really looking at postings, which are supported by templates. Templates, as we will see, are in part the ASPX files you'll be creating later and in part a template gallery item (covered later in this chapter). As a result ofTable these differences, debugging your projects is a little different as well (we'll learn • of Contents more about thatManagement in ChapterServer 12). Finally, you create a new CMS Web application, a user Microsoft Content 2002: A when Complete Guide control is automatically added to the project; this user control is the administrative functions ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood provided by CMS and is referred to as the default console. As we mentioned, CMS projects are not like normal ASP.NET Web applications, primarily Publisher: Addison Wesley because the ASPX pages aren't run directly. In CMS terms, the ASPX pages are essentially the Pub Date: October 31,added 2003 by a content contributor. Although, in truth, the ASPX pages are support for postings ISBN:as 0-321-19444-6 processed they normally would be end users who view a CMS-based site never actually "see" Pages: the ASPX file1136 directly. Instead, they see the posting. For most Web applications, the developer chooses which ASPX page is shown to the end user. ASP.NET Web applications typically have one "container" (an ASPX page), hiding and unhiding controls based on events operations. a CMS-based site, content contributors choose which "This is one of those rare or books that youInwill read to learn about the product and keep ASPX page (in the form of a template) they want to use when they create a posting. It's the rereading to find those tidbits that you missed before." choice of the content contributor which "container" is used to display content or functionality —Gary Bushey, SharePoint Server MVP within a site. As a result, a developer has less control over what ASPX page is used and when. When that posting is displayed to some endbecoming user, its content is combined with the tool ASPX page Content Management Server (CMS) is fast a vital content-management that and then rendered to the end user (we'll learn more about this processing in the next chapter). helps administrators and developers handle the ever-increasing amount of content on their So, unlike typical ASP.NET application, yourofCMS project will probably have multiple Web sites. aHowever, an authoritative source product information has been missing . . . until containers (ASPX pages), each possessing a unique content format or functionality mix. For now. some of you, this is a pretty big shift in the way that you need to think about developing Web applications. However, understanding concept is key to creating effective CMS-based Microsoft Content Management Serverthis 2002: A Complete Guide is the first book that explains solutions. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and As ato result of this "thereon but not seen" environment API manage content the Microsoft platform. that an ASPX page operates in, debugging is a little different. We'll go through a couple of debugging scenarios in Chapter 12, but it's important to understand that although debugging in VS.NET works justyou fine,how youtowill startand the This thorough reference explains the product architecture, then shows create debugging process differently with CMS projects. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Lastly, aexample CMS project includes a special Similarly how a typical Web running is used throughout theuser bookobject. to illustrate howtoimportant CMS ASP.NET features are application has default webform1.aspx file automatically inserted into the project, CMS implemented in areal-world Web site development. Inside you'll find answers to such questions projects come with a user control called "defaultconsole." Unlike the generic webform1.aspx as: file, however, this user control is one of the core components you'll add to almost every template file you create. This user control will be created in a folder in your solution called Chapter 6: How do you customize workflow? "console." Chapter develop for Microsoft Content Server (CMS) 2002 In Figure 10-1,10: youHow can do seeyou what the Solution Explorer showsManagement after we've created our CMS using Visual Studio .NET? project. Chapter 17: How do you establish user rights?
Figure 10-1. A typical CMS project
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: [ Team LiB ]Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating a New CMS Project Now that you have a little background on how a CMS project is different from a typical ASP.NET application, let's create a new CMS project. Before we begin, make sure that you have the following installed on your development machine: Visual Studio .NET Content Management Server 2002 •
IIS
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Content Management Server 2002 Site ,Manager ByBill English , Olga Londer, Shawn Shell, Todd Bleeker Stephen Cawood
Publisher: Addison Wesley
NOTE: CMS requires Pub Date: October 31, 2003
a SQL server to house the repository. The SQL server does not have to run on the same server/PC that you're developing on, but you will need ISBN: 0-321-19444-6 access to one. Pages: 1136
Once you have the components installed and running on your machine, follow these steps to "This one new of those books that you will read to learn about the product and keep createisyour CMSrare project. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP 1. Open Visual Studio and click the Content Management Server (CMS) is File fastmenu. becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their 2. sites. From However, the list of an options, pick New and then pick Project. Web authoritative source of product information has been missing . . . until now. 3. After you've done this, you will see a dialog like the one pictured in Figure 10-2. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the10-2. power of CMS. Administrators developers alike will learn how Figure The New Project and dialog in VS.NET to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
4.
Pages:the 1136list From
of project types, click the plus (+) sign next to the Content Management
Server type. 5. Under Content Management Server will be the choice of two different project types: one C# of and one rare for VB.NET. In this all examples will be in product C# (which how we "This for is one those books that youbook, will read to learn about the andiskeep created our those project). However, you can choose either language. rereading to find tidbits that you missed before." —Gary Bushey, SharePoint Server MVP 6. Once you've chosen your language preference, you can choose from one of three types of CMS projects: MCMS Web Application, MCMS Web Service, and MCMS Empty tool Webthat Project. Content Management Server (CMS) is fast becoming a vital content-management All the project types listed are similar to their non-CMS counterparts, except that they helps administrators and developers handle the ever-increasing amount of content on their automatically include referencessource to the appropriate Microsoft.ContentManagement Web sites. However, an authoritative of product information has been missing . . . until now. namespaces and have the defaultconsole user control added, as we discussed earlier. For our project, click the MCMS Web Application. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains 7. to Ineffectively the Location field,the type in the your CMS application. In thisalike book,will we'll be how how unlock power ofname CMS. of Administrators and developers learn using "botsconsulting" as scalability, the projectflexibility, name. and extensibility by using CMS features and to enhance their Web servers' API to manage content on the Microsoft platform. 8. Once you've changed the name of the project in the Location field, click OK. This thorough reference explains the product architecture, then shows you how to create and 9. content After about 10 to 20workflow. seconds (depending on your machine), your new CMSand project will be edit and use the Topic coverage includes CMS administration security, created. API, deployment options, site configuration, and template development. A the Publishing running example is used throughout the book to illustrate how important CMS features are Now that we have our project, let's examine the various new features that CMS adds to the implemented in real-world Web site development. Inside you'll find answers to such questions VS.NET environment. as: If you click the Tools menu in VS.NET and you're familiar with VS.NET, you'll notice that there is an Chapter entry for6: Content Server. If you choose that option, you'll notice that there How doManagement you customize workflow? are quite a few tools listed. All the tools listed are external to VS.NET, but having them in the Tools Chapter menu provides a do very convenient way to get to each ofManagement them. FigureServer 10-3 shows new 10: How you develop for Microsoft Content (CMS)the 2002 tools using addedVisual to theStudio Tools menu. .NET? Chapter 17: How do you 10-3. establishThe user Tools rights? Figure
menu in VS.NET
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: to 1136 addition the
In new tools, there's an important window addition to VS.NET: the Template Explorer window. This new window is one that you will probably use regularly as you develop your CMS solution. The Template is one of that the views directly into the about CMS repository. It and shows all the "This is one of Explorer those rare books you will read to learn the product keep template galleries and template gallery items defined within CMS (we'll learn more about each rereading to find those tidbits that you missed before." in this chapter). It is also the way that —Gary Bushey, SharePoint Server MVPyou can create new template galleries and template gallery items as you need them for your project. To show the Template Explorer window, click the View Management menu from within VS.NET. the Othera Windows option and then MCMS Content Server (CMS) Choose is fast becoming vital content-management tool that Template Explorer, as shown in Figure 10-4. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Figure 10-4. Choosing the CMS Template Explorer from the View
menu
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ] Once you've chosen this option, you'll see the Template Explorer window appear in your VS.NET environment (shown in Figure 10-5).
Figure 10-5. The CMS Template Explorer window
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
In ourisenvironment, docked the Template in the sameand place that our "This one of those we've rare books that you will readExplorer to learnwindow about the product keep Class Viewto and Explorer may before." wish to dock the window elsewhere in your rereading findSolution those tidbits thatlive. youYou missed VS.NET Bushey, environment. However, all MVP subsequent screen shots will show the Template Explorer —Gary SharePoint Server docked with the Solution Explorer and the Class View. Content Management Server (CMS) is fast becoming a vital content-management tool that Now that you've created CMS project have your Template window helps administrators and your developers handleand theyou ever-increasing amount Explorer of content on their shown, let'sHowever, examine an template gallerysource items. of product information has been missing . . . until Web sites. authoritative now. [ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Template Gallery Items In CMS 2002, templates are split into two parts. All the information about a template is stored in an object called a template gallery item (TGI), and the physical code is stored in an ASPX file (and the matching code-behind). In this section, we'll examine the TGI and how to change its properties, including adding placeholders and custom properties.
What Are They? •
Table of Contents
A TGI, in essence, is a list of all the properties or metadata for a given template. It contains all the information that CMS knows about a template, including the definition for all placeholders in By Billtemplate, English, Olga Londer , Shawn Shell, Toddand Bleeker the the custom properties, the,Stephen locationCawood of the physical template file. Further, when your content contributors choose a template, they're actually looking at the list of TGIs that exist within the gallery they've chosen. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Pub Date: [ Team LiB ]October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating a TGI To begin the process of exploring TGIs, let's first create a new template gallery and a new TGI. To create your new gallery and TGI, follow these steps.
1. While viewing the Template Explorer, right-click the Templates template gallery. 2. From the context menu, pick New Gallery. • 3. After CMS Table of Contents has created the new template gallery, it will highlight the name and allow you Microsoft Content Management Server 2002: A Complete to change it. By default, CMS names all newGuide galleries
"New Template Gallery." In our so our new template gallery will
examples, working behalf of ,BOTS Consulting, ByBill English , Olga we'll Londerbe , Shawn Shellon , Todd Bleeker Stephen Cawood be called "BOTS Consulting."
4.Publisher: Once you've your template gallery, right-click it and, from the context menu, pick Addison created Wesley New Template. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
5. As with the new gallery, CMS places a new TGI in your gallery and names it "New Pages: 1136 Template" by default. You can name your template anything you'd like. For the purposes of this exercise, we're going to call our new template "Generic." If all has gone well, your Template Explorer should show you something similar to Figure 10-6. "This one that of those rare books the thatsample you willsite read learn theso product and keep Pleaseisnote we've installed onto our CMSabout server, in addition to our new rereading to find tidbits that you missedIfbefore." gallery, you'll seethose the WoodgroveNet gallery. you've installed the sample site, you will also —Gary Bushey, SharePoint have that template gallery. Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that Figure 10-6. The Template Explorer with the new gallery and helps administrators and developers handle the ever-increasing amount of content on their template added Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, You'll and notice that the names of your new gallery and template are both shown in bold. Also, resources? you'll notice that next to your template is a "broken" icon with a red check mark. We'll discuss the "broken" check mark dynamic later. However, Chapter icon 32: and How the do you publish data? let's address the use of bold now.
useLiB of bold on each object indicates that neither object has been "saved" to the repository. [The Team ] If you open the Site Manager and look in the template gallery, you'll notice that the objects exist, but their names have not been updated with the values you gave them (you may have to click the circular arrow button—Global Refresh—to see the new objects). In Figure 10-7 you'll see what we're talking about.
Figure 10-7. The Site Manager shows the new objects, but without the updated names.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their In order to for your name changes to appear properly in the repository, you must save the Web sites. However, an authoritative source of product information has been missing . . . until changes to the gallery and TGI. To save the changes, simply right-click the object and select now. Save.Figure 10-8 shows this operation on the TGI. Be sure to perform the same operation on the gallery as well. Once you've saved the changes, you can go back to the Site Manager, click Microsoft Content Management Server 2002: A Complete Guide is the first book that explains the Global Refresh button, and see the objects with the names you gave them in VS.NET. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Figure 10-8. Right-click the object API to manage content on the Microsoft platform.and pick Save to commit the new
name to the repository. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Now, remember the check mark and the "broken" icon on your TGI? The check mark indicates that the template is "checked out." A checked-out TGI can be edited by only one person. If you were in a multideveloper environment, this mechanism would allow your colleagues to see the TGI and view its properties, but would not allow them to modify it until you have checked it "This is one of those rare books you will that read this to learn aboutnot thehave product and keep back in. As for the "broken" icon,that it indicates TGI does a template file rereading findit.those that you missed before."13, so for now, your TGI will remain associatedto with We'lltidbits address that issue in Chapter —Gary broken.Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web NOTE: sites. However, an authoritative source of product information has been missing . . . until In the preceding examples, we demonstrated how to create one template now. gallery. Ultimately, once you begin developing your CMS site, you'll probably want to create one or more subgalleries to logically group your templates for your content Microsoft Content Management Server 2002: A Complete Guide is the first book contributors, or create multiple galleries representing the different sites youthat mayexplains how to effectively unlock power of CMS. Administrators and developers alike will learn how potentially run in onethe CMS implementation. At BOTS Consulting, the development to enhance their Web servers' using team has created a singlescalability, gallery for flexibility, their site. and Howextensibility you choose by to set upCMS yourfeatures and API to manage content on the Microsoft platform. galleries will be based on a logical layout for galleries and any security requirements
you may have. Since different user groups can be granted access to different This thorough explains the product architecture, thenthe shows you how to create and galleries, reference creating various galleries may provide you with flexibility of creating edit content and use the workflow. Topic coverage includes CMS administration and security, "advanced" templates, which are offered to only a few content contributors. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Adding Placeholder Definitions to Your TGI One of the unique elements in all the templates you create will be the template's placeholders. As you inventory your content and analyze the various page types, you should really study the content itself—not just the layout, but the content types (text, images, files) and what attributes are applied to the content (bold, tables, hyperlinks). As content contributors add content to the site, they are actually adding that content to placeholders defined in the TGI. As you study the content, you should be thinking about what kinds of placeholders you'll need in each template that you develop. As we mentioned, TGI contains the definitions for all the placeholders in the template. As • Table ofthe Contents you create yourManagement placeholderServer definitions, have to decide Microsoft Content 2002: A you'll Complete Guide
what kinds of content each placeholder will store and what flexibility that placeholder will allow the content contributor. By ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood flexibility, we mean what kinds of formatting they can apply, as well as what types of content can be contributed to the placeholder itself. For example, Figure 10-9 depicts a press release in the BOTS Consulting Web site. You'll notice that there are primarily two text elements to the Publisher: Addison Wesley release: the body copy and the call-out text. Scanning further, you'll notice that the release Pub Date: October 31, 2003 does not have any special attributes or HTML constructs (such as tables). In other words, the 0-321-19444-6 text is ISBN: primarily a plain Verdana font with bold applied only in certain areas. From this example, Pages: 1136 we can gather that we may only need two placeholders, and those placeholders will only need to allow plain text and bold.
Figure 10-9. A BOTS Consulting press release
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Now, if we were to try to create a TGI to match the format and layout of this page, we would have Chapter to create17: placeholders that fit the descriptions How do you establish user rights? we just provided. In Figure 10-10, you'll see the Properties view of a TGI. The Properties view allows you to change the various elements of a 22: TGI,How including the custom property and placeholder definitions, as needs, well as size, which Chapter do you best deploy CMS according to your organization's ASPX and page is tied to this TGI. To see the properties of any TGI, simply click the TGI in the resources? Template Explorer view. Chapter 32: How do you publish dynamic data?
Figure 10-10. TGI Properties view in VS.NET
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their In your TGIHowever, Properties locate the Placeholder Definitions property. This property Web sites. anview, authoritative source of product information has been missing .allows . . until you to get to the designer, where you can define the various placeholder definitions your now. template will have. Very much as a TGI is the definition of a template and ultimately ties back to an ASPX page, aManagement placeholder Server definition is the metadataGuide about is a placeholder. Microsoft Content 2002: A Complete the first bookOnce that this explains information is defined, you can then bind a placeholder control within the ASPX file the how how to effectively unlock the power of CMS. Administrators and developers alike willtolearn definition in their the TGI. createscalability, a new placeholder definition, click the by Placeholder Definitions to enhance WebTo servers' flexibility, and extensibility using CMS features and property. Then click theon ellipsis that appears. Figure 10-11 shows this operation. API to manage content the Microsoft platform. This Figure thorough 10-11. referenceYou explains the the product architecture, then shows you how to create and click ellipsis to define your placeholders. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Once you've clicked the ellipsis, you get the Placeholder Definition Collection Editor, shown in Pages: 1136 Figure 10-12.
Figure 10-12. The Placeholder Definition Collection Editor "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, The Placeholder Definition Collection Editor allows you to create the various placeholder and resources? definitions for your template. Native to CMS are six distinct definitions, each providing varying Chapterand 32:property How do you data? functionality sets.publish The sixdynamic types are:
[ Team LiB ] HTML
XML Attachment Image Office attachment Office HTML When a placeholder control is bound, the definition controls not only the look of the placeholder, but the kind of content that placeholder will accept. We'll discuss each of these placeholders in more depth in Chapter 13. For now, it's important to understand that each of • Table of Contents these placeholder types will play a specific role in your templates. Microsoft Content Management Server 2002: A Complete Guide
To add a new placeholder definition to your TGI, simply click the Add button in the lower left. Once you've clicked Add, CMS will, by default, add an HTML placeholder definition (if you click the down arrow next to the Add button, you can choose a different placeholder type). Looking immediately to the right of the new definition, you'll see its properties. We'll learn more about Publisher: Addison Wesley each of the properties in Chapter 13 as we discuss placeholders in more depth. However, the Pub Date: October 31, 2003 complete placeholder definition collection for the BOTS Consulting press release template is 0-321-19444-6 shown ISBN: in Figure 10-13. You'll notice that there are more placeholders in the definition collection Pages: 1136 than we discussed earlier. As it turns out, the press release could contain content other than what we originally identified. As a result, the BOTS IS/IT department decided to add additional placeholders so that content contributors would have more flexibility in the type of content they could contribute. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits you Consulting missed before."press release placeholder Figure 10-13. Thethat BOTS —Gary Bushey, SharePoint Server MVP ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
definitions
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[[ Team Team LiB LiB ]]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Adding Custom Properties Another element of a TGI is the custom property definitions. Custom properties allow a developer to assign additional metadata to a template, the values of which can be assigned by the content contributor (or the developer, programmatically). These custom properties can then be used in a number of ways, including creating HTML META tags, determining what content to summarize on a posting, searching for specific postings, and determining what content to display to a subscriber. Your design will largely determine whether you need custom properties and how to use them. In BOTS Consulting's case, custom properties are used in the case studies section to allow subscribers to see case studies of a particular type. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: Although custom properties are a terrific way of providing a flexible tagging structure for content in CMS, searching by them is an expensive transaction. Overuse of custom property searches can seriously impact the performance of your CMS site. Publisher: Addison Wesley Good uses for custom properties might be certain metadata about the page, such as Pub Date: October 31, 2003 key words or the GUID of a related posting; you would retrieve the value at the ISBN: 0-321-19444-6 posting level and then search on the GUID, which is a very efficient search. Pages: 1136
As we mentioned earlier, custom properties allow developers to create custom attributes for postings. In of thethose samerare waybooks that placeholder define what each placeholder will accept, "This is one that you willdefinitions read to learn about the product and keep custom properties define whatthat additional attributes a posting can possess and, in some cases, rereading to find those tidbits you missed before." what values canSharePoint be applied to thoseMVP properties. When the content contributors create new —Gary Bushey, Server postings based on the template, the posting will possess the properties defined in the TGI, and the content contributorServer assigns the values. Content Management (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Whensites. you create youranTGI, you have the option of creating a customhas property collection. Web However, authoritative source of product information been missing . . .This until collection will hold the custom properties to which you want the content contributor or some now. automated process to assign values. When you create your properties, you have the choice of two types:Content selection and text. Each type defines the behavior theiscontent will see Microsoft Management Server 2002: A Complete Guide the firstcontributor book that explains when they create a posting based on this template. If you look at Figures 10-14 and 10-15, how to effectively unlock the power of CMS. Administrators and developers alike will learn how you can seetheir the ellipsis that you click to call up the Custom Property Definition Collection Editor to enhance Web servers' scalability, flexibility, and extensibility by using CMS features and and to themanage interface itself (similar to the Placeholder API content on the Microsoft platform. Definition Collection Editor). This thorough the product architecture, thenthe shows you howproperty to create and Figure reference 10-14. explains You click the ellipsis to see custom edit content and use the workflow. Topic coverage includes CMS administration and security, definition interface. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep Figure 10-15. This is the you use to create the custom rereading to find those tidbits that youinterface missed before." —Gary Bushey, SharePoint Server MVP properties in your template. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter custom 22: Howproperty do you best deploy CMS according to your organization's needs, size, The selection allows the developer to create a property and then provide a resources? fixed and number of "allowed" values. Essentially, this creates a drop-down list of values that a content contributor can set when they create a new page. The advantage to a selection custom Chapter How number do you publish dynamic data? can hold. This is especially useful if you property is the32: limited of values the property need to search for a posting using a custom property, since you have to search for an exact
match [value Team LiB ] (there's no facility to search "like" with a custom property), or you need to exactly match a property and value pair. The downside to selection custom properties is that the values cannot be updated programmatically; you must change the allowed values through the VS.NET interface. Keep in mind that you must supply a "default" value for the property. By default, CMS chooses the first property you enter. In Figure 10-16 you can see how the selection custom property appears to the content contributor in the Page Properties dialog. In this case, the Case Study Detail template has one custom property to designate the industry with which the case study is associated. In the BOTS' site, there's only one channel for all case studies, regardless of what practice contributed the study. However, the business users wanted a way to tag each case study so they could visually segment the case studies when being viewed by potential customers.
•
Figure 10-16. The Page Properties dialog is where content contributors can set the value of custom properties. Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: The text custom property allows the business user to fill in a free-form value. Text custom properties are useful when there is no specific set of values a property can have. They are Chapter 6: How you customize workflow? especially useful whendo developers are assigning values to properties programmatically. Chapter 10:TGI Howyou do created you develop for let's Microsoft Server (CMS) 2002 With the Generic earlier, add aContent custom Management property to the custom property using Visual Studio .NET? collection. As shown in Figure 10-14, click the ellipsis. Once you've clicked the ellipsis and you see the Custom Property Definition Collection Editor, click the down arrow next to the Add Chapter How do userbyrights? button (simply17: clicking theyou Addestablish button will, default, create a text custom property). For this example, let's add a selection custom property. After you've completed this step, you should Chapter 22: do 10-17. you best deploy CMS according to your organization's needs, size, see something likeHow Figure and resources?
Figure 10-17. The Custom Definition Collection Editor with Chapter 32: How do you publish Property dynamic data? the new custom property
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." You'll notice that CMS automatically gives the new custom property a name (as it did with the —Gary Bushey, SharePoint Server MVP template and template gallery). To change the custom property name, simply click the Name property and change it. In this example, we'll call our new custom property "sample." Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Because this is a selection custom property, CMS automatically creates a new item in the Web sites. However, an authoritative source of product information has been missing . . . until collection of values. Similarly to adding a new custom property to the TGI, you also can create now. new values in the allowed values collection. The allowed values collection is the list of values that will fill the property's drop-down list in the Page Properties dialog box. For this example, Microsoft Content Management Server 2002: A Complete Guide is the first book that explains we'll add two values: Value1 and Value2 (we're not terribly creative). To add the values, click how to effectively unlock the power of CMS. Administrators and developers alike will learn how the Allowed Values property and click the ellipsis to see the Allowed Values Collection Editor to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and (are you seeing a pattern yet?). API to manage content on the Microsoft platform.
You'll notice that there is already one value in the collection. As mentioned earlier, because you This thorough reference explains the product architecture, then shows you how to create and selected a selection custom property, CMS automatically fills the allowed values collection with edit content and use the workflow. Topic coverage includes CMS administration and security, one member. Since one value already exists, simply click the value's property field to the right the Publishing API, deployment options, site configuration, and template development. A and change the value to "Value1." To add a new value, simply click the Add button and change running example is used throughout the book to illustrate how important CMS features are the value to "Value2." implemented in real-world Web site development. Inside you'll find answers to such questions as: Figure 10-18 shows what you should be seeing in VS.NET once you've completed the preceding steps. Chapter 6: How do you customize workflow?
Figure 10-18. The allowed values you've just added Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep [ Team LiB ] rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we've explored creating a new CMS project in VS.NET. We learned that although there are similarities to a standard Web form project, there are some differences, such as the existence of a default user control and how our ASPX pages are treated. As a result, you will have to take additional steps when debugging your projects. In addition to reviewing how to create a new CMS project, we looked at template gallery items. A TGI is one of two parts of a template within CMS. TGIs define what placeholders and custom properties our template will possess as well as what ASPX file is associated with the template. •
Table of Contents
Finally, we explored how to create placeholder definitions and custom properties. After we created a TGI called "Generic," we added a new HTML placeholder definition and then added a ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood selection custom property with two allowed values. Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 11. Template-Based Page Processing Overview Page Processing in Presentation Mode Page Processing in Authoring Mode •
Table of Contents Summary [ Team LiB ]
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview In CMS, processing a page request consists of multiple steps and involves several layers. All pages in CMS are dynamically built from the information contained in the page template and the placeholder content contributed by the authors. Template metadata is stored in the CMS database, while the template file is stored in the CMS server file system. In the previous chapter, we looked into creating template gallery items (TGIs) that represent the template metadata in VS.NET. In this chapter, we will discuss how a CMS page is processed, from receiving an HTTP request from the browser to sending the HTTP response back. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NOTE: We are going to look into ASP.NET-based processing. For ASP-based processing, refer to the CMS 2002 and CMS 2001 product documentation.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pubauthors Date: October 31, 2003 When create a page, they populate the placeholders in the template with the content ISBN: 0-321-19444-6 and then post the page to a channel. The data corresponding to this posting is stored in the Pages: 1136 database, including the following information:
The posting Globally Unique Identifier (GUID) "This The is one of those books youiswill read to learn about the product and keep template onrare which the that posting based rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP The placeholder content Content Server (CMS) fast becoming a vital content-management tool that TheManagement publishing schedule for theisposting helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an placeholder authoritative source and of product information missing . . . until The posting properties, content, template metadatahas arebeen stored separately and now. are brought together to create a page only during the processing of the posting's template ASPX file. The code in ASPX template files makes use of CMS Publishing API (PAPI) objects to Microsoft Content Server and 2002: A Complete Guidetoisthe thedatabase. first bookThe thatoutput explains read the data fromManagement the CMS database to commit changes of how to effectively the power of CMS. andcache developers alike willback learntohow the ASPX templateunlock processing is a CMS pageAdministrators that is put in the and then sent the to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and user. API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage CMS administration NOTE: Template metadata is usually referred includes to as just a template. As we and havesecurity, the Publishing deployment options, site template development. A discussed API, in Chapter 10, templates are configuration, also known as and template gallery items in running example is used throughout the book to illustrate how important CMS features are VS.NET. implemented in real-world Web site development. Inside you'll find answers to such questions as:
Depending on whether the CMS page is requested for viewing in presentation mode or for Chapter 6: Howcontent do you in customize creating and editing authoringworkflow? mode, the HTML for the placeholders within the page will be different. The placeholders are rendered in different modes by the placeholder server Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 controls that are part of the ASPX template. Depending on the mode, the processing is slightly using Visual Studio .NET? different. Chapter 17: How do you establish user rights? We will start by looking into how the page is processed in presentation mode, and then discuss page Chapter processing authoring 22:inHow do youmode. best deploy CMS according to your organization's needs, size, and resources? [ Team LiB ] Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Page Processing in Presentation Mode When a page is requested by a user in presentation mode, the placeholder content is rendered as part of the resulting page HTML. The user is not aware that some parts of the page are static and others are generated dynamically; the HTML for the page is assembled on the server using a combination of data from the CMS database and the server file system. This process involves several steps.Figure 11-1 shows the logical architecture of the processing and the steps involved. Let's look into these steps.
Figure 11-1. Logical architecture of CMS page processing •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Step 1
The user types a URL, or clicks a link, pointing to a CMS page in a browser—for example, Chapter 6: How do you customize workflow? http://www.botsconsulting.com/offices/uk. It is a user-friendly hierarchical URL. The page request arrives at the 10: IIS site—for example: Chapter How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
:GET Chapter /offices/uk HTTP/1.1 17: How do you establish user rights? Host: www.botsconsulting.com Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
StepChapter 2 32: How do you publish dynamic data?
has LiB the ]CMS server installed, and the virtual Web site has been enabled as a CMS Web entry [IIS Team point. Therefore, the request is passed to the CMS ISAPI filter. The filter is called the Resolution filter and can be found at \Program Files\Microsoft Content Management Server\Server\bin\ReAuthFilt.dll. The Resolution filter analyzes the URL to identify whether the request is for a CMS page or resource. If not, the request is returned to the IIS for processing. If the filter has identified the request as a CMS page request, it searches the database for the information that corresponds to the requested posting. It obtains the posting GUID and follows the posting to the metadata for the template associated with it. The template metadata includes a reference to the name and location of the template ASPX file. The filter gets the template ASPX file name and then constructs a new URL that points to the ASPX file and contains the posting GUID as one of the query string parameters. It looks similar to the following example: [View full width] /botsconsulting/templates/office.aspx?NRMODE=Published&NRNODEGUID= %7b7DE6CC74-73ED-4EBC-BBC0-04714D6EA80A%7d& • Table of Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In this example, the NRMODE parameter specifies that the published version of the page is requested, and the NRNODEGUID parameter identifies the posting GUID. Publisher: Addison Wesley
The filter then passes the transformed URL back to IIS. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: The hierarchical URL in the original request identifies the page location in the channels hierarchy; it is purely a logical path as set up in the CMS server. What the Resolution filter does is convert this logical path to a real URL of a template ASPX file. The parameters identify the will page-specific content processing mode. It is "Thisquery is onestring of those rare books that you read to learn aboutand thethe product and keep this ASPX filethose and the query parameters that CMS server uses to compile the posting rereading to find tidbits thatstring you missed before." forBushey, IIS to serve. —Gary SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Step 3 now.
IIS analyzes the request and passes it to the appropriate workerisprocess processing. This step is Microsoft Content Management Server 2002: A Complete Guide the firstfor book that explains performed differently in IIS 5 and IIS 6 because their architectures are different. In IIS 5, because how to effectively unlock the power of CMS. Administrators and developers alike will learn how theenhance request their is forWeb an ASPX file,scalability, it is passedflexibility, to the ASP.NET ISAPI filterby aspnet_isapi.dll, whichand in turn to servers' and extensibility using CMS features passes it to the content ASP.NETonruntime workerplatform. process, aspnet_wp.exe. In IIS 6, depending on the IIS API to manage the Microsoft isolation mode, the request is either passed to the Web worker process w3wp.exe in IIS 6 isolation modethorough (which inreference turn has explains an ASP.NET ISAPI filter installed),then or the request run to bycreate a worker This the product architecture, shows youishow andprocess within inetinfo.exe in the IIS workflow. 5 isolationTopic mode. edit content and use coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: NOTE: For information about IIS 6 isolation modes, refer to the IIS 6.0 Architecture section in the IIS 6 product documentation. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
Stepusing 4 Visual Studio .NET?
Chapter 17: How do with you establish user The worker process deals the request asrights? with any other ASPX request. First of all, the request goes through the HTTP module pipeline. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? An example of an HTTP module pipeline as defined in a machine. config file is shown in the sidebar, together with an explanation of how HTTP modules work. The modules perform various tasks, Chapter 32: How do management, you publish dynamic data? authentication and authorization. including cache and state and security
[ Team LiB ]
HTTP Pipeline An HTTP pipeline is a sequence of HTTP modules. An HTTP module is a class that implements the System.Web.IHttpModule interface, as follows:
:public interface IHttpModule { void Init(HttpApplication context); void Dispose(); } •
Table of Contents
For eachContent HttpModule in theServer pipeline, the worker process Microsoft Management 2002: A Complete Guide
calls the module's Init and Dispose methods. Init is called when the module is attached to the HttpApplication object, ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood and Dispose is called when the module is detached from HttpApplication. The Init and Dispose methods allow the module to hook into events exposed by HttpApplication, including the beginning of a request, the end of a request, a request for authentication, Publisher: Addison Wesley and so on. Pub Date: October 31, 2003
ISBN:modules 0-321-19444-6 The HTTP in the pipeline are able to modify a request as it goes through. Pages: 1136
Here is an example of an HTTP module pipeline contained in the machine. config file. [View full width] "This is one of those rare books that you will read to learn about the product and keep [ Team LiB/NR/RdOnlyRes/2206150E-E01C-4473AE7F-D3EDAC2DFE99/0/\MSSQL\LOG\sqlagent.out. You can view the SQL Server Agent error log by right-clicking how to effectively unlock the power of CMS. Administrators and developers alike will learn how the SQL Server Agent node and selecting Display Error Log. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and NOTE: In certain situations, you have to manually start SQL Server Agent. For edit content and use the workflow. Topic coverage includes CMS administration and security, example, when you stop SQL Server, SQL Server Agent is stopped as well. However, the Publishing API, deployment options, site configuration, and template development. A when you restart SQL Server, SQL Server Agent is not restarted automatically. running example is used throughout the book to illustrate how important CMS features are Another example is when SQL Server is installed on a remote computer. The DCA implemented in real-world Web site development. Inside you'll find answers to such questions that is installed locally cannot start SQL Server Agent on a remote machine. In both as: scenarios, to enable the background purging of the CMS database, you must start SQL Server Agent manually. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 [ Team LiB Visual ] using Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we looked into administering containers. There are several tools, such as the Site Manager, the Web Author, and Visual Studio .NET, that you can use to perform administrative tasks. Table 16-1 compares the Site Manager with the Web Author and VS.NET, and provides a brief reference to show which tool can be used for which task.
•
Table Comparison of Tools for Administrative Tasks Table16-1. of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
ObjectAddison Wesley Publisher:
Task
Site Manager
Tools Web Author
VS.NET
Pub Date: October 31, 2003
Channel
ISBN: 0-321-19444-6
Pages: 1136
Create a channel
Yes
No
No
Rename a channel
Yes
Yes
No
Editrare channel name Yes and keep No "This is one of those booksdisplay that you will and read to learnYes about the product description rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Edit channel publishing schedule Yes Yes No Content Management Server (CMS) is fast becoming a vital content-management tool that Set up publishing flags: helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative of product information has been . . until Important channel, source Hide when Yes Yes missing . No now. published Microsoft Content Set Management Guide is the first up robots Server flags 2002: A Complete Yes Nobook that explains No how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web flexibility, and extensibility by using Edit servers' channel scalability, rendering properties Yes No CMS features No and API to manage content on the Microsoft platform. Set up default galleries Yes No No This thorough reference explains the product architecture, then shows you how to create and Setthe up workflow. the sortingTopic ordercoverage for the includes Yes No No edit content and use CMS administration and security, itemsoptions, site configuration, and template development. A the Publishing API,channel deployment running example is used throughout the book to illustrate how important CMS features are Assign rights users Yes find answers No to such questions No implemented in real-world Web to site development. Inside you'll as: Set up custom properties Yes No No
Move channel Chapter 6: How doayou customize workflow?
Yes
No
No
a channel YesManagementNo Chapter 10: Copy How do you develop for Microsoft Content Server (CMS)No 2002 using Visual Studio .NET? Delete a channel Yes No No Chapter 17: How do you establish user rights? Restore a channel
Yes
No
No
Chapter 22: How do you best deploy CMS according to your organization's needs, size, Kill lock Yes No No and resources?
Page Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Template gallery
Create a new page
No
Yes
No
Edit a page
No
Yes
No
Move a page
Yes
Yes
No
Copy a page
Yes
Yes
No
Delete a page
Yes
Yes
No
Restore a page
Yes
No
No
Edit page properties
No
Yes
No
Kill lock
Yes
No
No
Yes
No
Yes
a template gallery
Yes
No
Yes
Edit a description property
Yes
No
Yes
Move a template gallery
Yes
No
Yes
Copy a template gallery
Yes
No
Yes
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Create a new template gallery Publisher: Addison Rename Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Delete template No and keep Yes "This is one of those rareabooks that gallery you will read to learnYes about the product rereading to find those tidbits that you missed before." Restore a Server template gallery Yes No No —Gary Bushey, SharePoint MVP Assign rights to users Yescontent-management No Content Management Server (CMS) is fast becoming a vital tool No that helps administrators and developers handle the ever-increasing amount of content on their Kill lock Yes No No Web sites. However, an authoritative source of product information has been missing . . . until now. Template Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Create a new template No No Yes how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using Rename a template No No CMS features Yes and API to manage content on the Microsoft platform. Edit template properties No No Yes This thorough reference explains the product architecture, then shows you how to create and edit content and use the in workflow. Topic includes and security, Check and check outcoverage a template NoCMS administration No Yes the Publishing API, deployment options, site configuration, and template development. A running example is usedathroughout how important No CMS featuresYes are Move template the book to illustrateYes implemented in real-world Web site development. Inside you'll find answers to such questions Copy a template Yes No Yes as:
Delete a template Yes No Yes Chapter 6: How do you customize workflow? Restore a template Yes No No Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Run a dependent report Yes No No using Visual Studio .NET? approved Chapter 17: Revert How dotoyou establish user rights?
Yes
No
No
No Chapter 22: Kill Howlock do you best deploy CMS according Yes to your organization's needs,No size, and resources? Resource gallery Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Create a new resource gallery
Yes
No
No
Rename a resource gallery
Yes
No
No
Edit a description property
Yes
No
No
Move a resource gallery
Yes
No
No
Copy a resource gallery
Yes
No
No
Delete a resource gallery
Yes
No
No
Restore a resource gallery
Yes
No
No
Assign rights to users
Yes
No
No
Yes
No
No
Yes
Yes
No
No
Yes
No
Move a resource
Yes
No
No
Copy a resource
Yes
No
No
Table of Contents
Kill lock
Microsoft Content Management Server 2002: A Complete Guide
By Bill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Resource
Add a resource to a resource gallery Publisher: Addison Wesley Pub Date: October Replace 31, 2003
a resource in a resource
gallery ISBN: 0-321-19444-6 Pages: 1136
Delete resource Yes and keep No "This is one of those rareabooks that you will read to learnYes about the product rereading to find those tidbits that you missed before." Restore a Server resource Yes No No —Gary Bushey, SharePoint MVP Kill lock Yescontent-management No Content Management Server (CMS) is fast becoming a vital tool No that helps administrators and developers handle the ever-increasing amount of content on their Web sites.that However, authoritative of product information been missing .in. . until For tasks can bean performed usingsource different tools, there may be has subtle differences now. implementation of functionality. These differences have been outlined in the chapter where appropriate. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on thethe Microsoft NOTE: Table 16-1 shows use of platform. VS.NET for administrative tasks; we are not talking here about writing code to modify an object's properties programmatically. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running examplewe is focused used throughout the book to illustrate how important CMS features areand In this chapter, on managing containers such as channels, template galleries, implemented in real-world Web site development. Inside you'll find answers to such questions resource galleries. However, to provide a publishing environment for our site, we need to as: assign rights groups to these containers. We will concentrate on this task in the next chapter. [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 17. Setting Up User Rights Authentication, authorization, and security are paramount issues in our modern world. Content Management Server (CMS) holds the ability to authenticate users and assign them role-based privileges that allow them to perform certain functions, while restricting their ability to perform other functions. User rights are derived from user membership in one or more CMS rights groups; members of each rights group have privileges that are based on predefined CMS roles. In this chapter, we will focus on how to set up role-based user rights in CMS. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
User Roles In CMS all access is authenticated and mapped to a user role. There are eight user roles in CMS 2002: administrator, channel manager, template designer, resource manager, moderator, editor, author, and subscriber. Each CMS user role has precoded permissions that cannot be changed. It is not possible to create additional user roles. Figure 17-1 shows the eight CMS user roles displayed in the Site Manager.
Figure 17-1. User roles and Administrator rights group •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until We have come across the different CMS user roles in previous chapters of the book. For now. example, when we discussed the publishing workflow in Chapter 6, we looked into three publishingContent roles: author, editor,Server and moderator. Now we are going to take detailed into Microsoft Management 2002: A Complete Guide is the first abook that look explains all the user roles. how toCMS effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Every usercontent is assigned at least one platform. role. When users browse the site, even anonymous API to CMS manage on the Microsoft access is enabled via a guest account that has to be mapped to a subscriber role. All CMS content residesreference in containers: pages channels, resourcesthen in the resource galleries. Depending This thorough explains the in product architecture, shows you how to create and on the role, or combination of roles,Topic that coverage a user account is mapped to on a container, the user edit content and use the workflow. includes CMS administration and security, has Publishing different rights on this container. the API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Administrator Role
The administrator roledo is you the role of a CMS administrator. Administrators have full Chapter 6: How customize workflow? administrative and publishing rights to the entire site and can perform any task that any other Chapter 10: How develop for Microsoft Content Management Server (CMS) 2002or role can—that is, act asdo anyou author, editor, moderator, template designer, resource manager, using Visual Studio .NET? and galleries. channel manager in all channels Chapter 17: do you establish user rights?template galleries, and resource galleries. Administrators canHow create all containers: channels, Administrators are solely responsible for setting up rights groups for all user roles and assigning Chapter 22: How do you best deploy can CMSassign according togroups your organization's needs, members to these groups. Administrators rights to all containers, andsize, have and resources? subscriber rights to all channels. Chapter 32: How do you publish dynamic data?
[Channel Team LiB ]Manager
Role
The channel manager role allows CMS administrators to delegate administrative tasks on the parts of the site structure. Channel managers are in effect mini-administrators. They have full administrative and publishing rights to the subset of the site containers they've been assigned rights to: channels, template galleries, and resource galleries. Within the containers that channel managers have rights to, they can: Create new containers, such as channels, template galleries, and resource galleries. Assign rights groups to containers. Act as an author, editor, moderator, template designer, or resource manager. • Table of have Contents Channel managers subscriber rights to all channels they are managing. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Template Designer Role Publisher: Addison Wesley
Template designers are developers who create templates and template files in VS.NET. If they Pub Date: October 31, 2003 have rights on a container, within this container they can: ISBN: 0-321-19444-6
Pages: 1136
Create new containers, such as channels, template galleries, and resource galleries. Assign rights groups to containers. "This is one of those rare books that you will read to learn about the product and keep Act as an author, editor, moderator, or resource manager. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVPhave rights to, they can create, edit, and check in Within the template galleries that they templates. They can also edit, check in, debug, and delete templates that they own. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle tasks the ever-increasing amount content galleries on their Template designers cannot perform certain on the templates in theoftemplate Web sites. However, an authoritative source of product information has been missing . . . until where they have rights; these tasks can only be performed by administrators and channel now. managers. The tasks are as follows: Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the of CMS. Administrators and developers alike will learn how Check in a template thatpower has been checked out by another user. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toKill manage on the Microsoft platform. lock oncontent templates from within the Site Manager. This thorough reference the product then to shows how to create and Template designer rightsexplains on a channel includearchitecture, subscriber rights this you channel. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Resource Manager Role implemented in real-world Web site development. Inside you'll find answers to such questions as: Resource managers are responsible for managing resources in the resource galleries. Resources can be added to a page from a local source; however, resource galleries provide a Chapter Howcommon do you customize simple way to 6: make resources workflow? available across the site. If resource managers are given rights on a resource gallery, inside this gallery they can view, add, move, replace, and 10: Resource How do you developcannot for Microsoft Management Server (CMS) 2002 deleteChapter resources. managers create Content any containers, including resource using Visual Studio .NET? galleries; this is the responsibility of the administrator or the channel manager. Chapter 17: How do you establish user rights?
Author Role Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Authors create pages and submit them for approval by editors. They use the Web Author Chapter 32:with Howthe do Authoring you publish dynamic to data? console or Word Connector author pages. Although they can set the page
they are really just suggesting the settings, since editors and [properties Team LiBthemselves, ] moderators can both override these settings. Authors require access to the following containers: Channels. An author creates pages in assigned channels. The channels are accessible from the authoring tools, and when the author creates a new page, the page is saved in the channel. Authors can create, edit, and submit pages to a channel. They can delete pages they own. Template galleries. The author needs read access to the appropriate template galleries so that they can select a template for a page they are creating.
•
Resource galleries. The author requires read access to resource galleries so that the author is able to add digital assets from these galleries to a page during the authoring Table of Contents process.
Microsoft Content Management Server 2002: A Complete Guide
By Bill English , Olga , Shawn Shell, Todd Bleeker, Stephen Author rights on Londer a channel include subscriber rights toCawood this channel.
Publisher: Addison Wesley
Editor Role Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Editors can do everything that authors can, as well as approve page content for publication. Pages: 1136 Editors can approve or decline pages. They can ask the author to revise the page, or they can do it themselves. Editors require access to the following containers: "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Channels. editor needs to able —Gary Bushey, An SharePoint Server MVP to access pages created by authors and make modifications if required. Editors can create, edit, and submit pages and page content, Content is fast becoming a vital content-management tool that andManagement approve andServer decline(CMS) page content. Editors can edit, submit, approve, decline, and helps delete administrators and developers the ever-increasing their pages, regardless of whohandle owns them. Editors cannotamount approveoforcontent declineon page Web sites. However, an authoritative source of product information has been missing . . . until publishing properties. now. Template galleries. Since editors are working with pages, they need read access to the Microsoft Content template Management Server 2002: Completethe Guide is the firstisbook that appropriate galleries where theAtemplate current page based on explains is located. how to effectively unlock the power of CMS. Administrators and developers alike will learn how Resource galleries. Editors require read access and to resource galleries so that they can add to enhance their Web servers' scalability, flexibility, extensibility by using CMS features and to a page. API toresources manage content on the Microsoft platform. Editor rights onreference a channel includethe subscriber author rights this channel. This thorough explains productand architecture, thentoshows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Moderator Role implemented in real-world Web site development. Inside you'll find answers to such questions as: Moderators ensure that page content and page publishing properties are relevant and appropriate for all channels to which they are assigned rights. Page content is approved by the editor; publishing properties, such as the publishing schedule, are approved by a moderator. Chapter 6: How do you customize workflow? Moderators can ask for the page publishing schedule to be revised, or can revise it themselves. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Moderators require access to the following containers: using Visual Studio .NET? Chapter 17: How do you establish user rights? Channels. A moderator needs to able to access pages created by authors and approved by editors to22: be How able do to approve forCMS publication. can create, edit, and Chapter you best them deploy accordingModerators to your organization's needs, size, submit pages and page content, and approve and decline page publishing properties. and resources? Moderators can edit, submit, approve, decline, and delete pages, regardless of who owns them. Moderators cannot approve or decline page content. Chapter 32: How do you publish dynamic data?
Template [ Team LiB ] galleries. Since moderators are working with pages, they need read access to the appropriate template galleries where the template the current page is based on is located. Resource galleries. Moderators require read access to resource galleries so that they can add resources to a page. Moderators have subscriber and author rights on the channel to which they are assigned rights.
Subscriber Role Subscribers are those users who just browse the site. They have read-only access to pages published on the site; they do not participate in the publishing process. •
Table of Contents
In order to be able to view a page, they need to have read access to the channel where the page is located, the template gallery where the template for the page is stored, and the By Bill English , Olga Londer Shell, Toddused Bleeker Cawood resource gallery where,Shawn the resources on,Stephen the page can be found. Microsoft Content Management Server 2002: A Complete Guide
CMS does not provide default anonymous access; in order to view pages published on the site, Publisher: Addison Wesley all users browsing the site must be given subscriber access to the appropriate channels. Even if Pub Date: October 31, 2003 we allow guest access to the site, we still need to assign a subscriber role to the guest account and give it permissions ISBN: 0-321-19444-6 for the appropriate containers so that users can view the content on our site. Pages: 1136
NOTE: If a user has any rights to a container, they also have subscriber rights on the "Thiscontainer, is one of those books that willitems read in tothis learn about the product and keep whichrare means they canyou view container. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool the that A user can belong to one or more subscriber groups. On an internal site, for example, helps administrators and developers handle the ever-increasing amount of content on their human resources department could only allow a specific group of users to view the company's Web sites. However, an authoritative of product has missing . . . until private content in a secured channel. source At the same time, information the members ofbeen this group have now. subscriber rights to other parts of the site that are available to all employees. On an external
site, all users have subscriber rights to the public parts of your site, while some users can also Microsoft Content Management Server 2002: A Complete Guide is the first book that explains have subscriber rights to the premier content on the site. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance [ Team LiB ]their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Rights Groups In CMS a user cannot be directly mapped to a role. The reason is that roles are tied to containers, and the same user can have different roles in different containers. For example, a user can be an author in one channel and a subscriber in another. In order to allow users the ability to perform different roles in different containers, we need to have a unique instance of a role mapped to a container. This is done via CMS rights groups. Rights groups allow us to define a unique instance of a role. For example, there is only one author's role, but for different channels we may need to define two distinct author groups. A CMS rightsTable group must contain one or more user and user group accounts, and usually • of Contents consists Content of user Management groups. In Server most cases, andGuide user Microsoft 2002: Ausers Complete
groups are set up in the Active Directory. However, the accounts can also be NT domain accounts as well as local Windows ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood 2003/2000/NT accounts. Each rights group must have a unique name within each role. Each rights group belongs to one of the CMS user roles, which determines the rights the Publisher: Addison Wesley members of the group will have in a container. Each role has its own set of rights groups. Pub Date: October 31, 2003 0-321-19444-6 A user ISBN: or user group may belong to many rights groups within the same user role. For example, a user Pages: 1136 can be an author for two different channels.
A user can have many different roles. For example, the same user can be a subscriber in one channel and a template designer in another. A user's roles can overlap; for example, the user can have both author and editor roles in a channel. "This is one of those rare books that you will read to learn about the product and keep rereading to find those thatrights you missed Each role may have onetidbits or more groups before." except the administrator role. There is only one —Gary Bushey, SharePoint Server MVP rights group within the administrator role. It is called Administrator and is created when CMS is installed (refer back to Figure 17-1). After the installation, this rights group has only one Content Management Server (CMS) is fast becoming a vital content-management tool that member: the user account set up during the installation to be a CMS administrator account. helps administrators and developers handle the ever-increasing amount of content on their When you start the Site Manager for the first time, you have to log in with this account. You Web sites. However, an authoritative source of product information has been missing . . . until can then add more members to the Administrator rights group if required. However, to now. centralize administrative control of your site, it is a good practice to keep the number of members Content in this group low. Microsoft Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Members of the Administrator rights group have all rights to all containers. Therefore, you don't to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and assign the Administrator rights group to a container. It is always there by default and cannot API to manage content on the Microsoft platform. be removed. This thorough reference explains the product architecture, then shows you how to create and To assign rights on a container to a user, you must perform the following three steps: edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented real-world Web site development. you'll answers to such questions 1. Create ainCMS rights group within a role you'dInside like the userfind to have in this container. as: 2. Add the user account to the CMS rights group. 6: rights How do you customize workflow? 3. Chapter Assign this group to the container. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? NOTE: In CMS, a container is the most granular object on which security can be Chapter 17: How do you establish user rights? applied. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Only members of the Administrator rights group within the administrator role can create rights Chapter 32: How do youtopublish dynamicWe data? groups and assign members rights groups. will now look into this process step-by-step.
[ Team LiB ]
NOTE: Creating CMS rights groups and assigning members to these groups can only be done by a CMS administrator using the Site Manager. It cannot be done programmatically; there is no API for working with the rights groups.
Creating a Rights Group Rights groups are created within a user role. To access user roles, click the User Roles icon in the left pane of the Site Manager window (refer back to Figure 17-1). Right-click one of the user roles you want to associate the new rights group with; then click New Rights Group. right-click any of the existing groups within the user role and • Table of Alternatively, Contents select New Group. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The new rights group is created and displayed in the left pane of the Site Manager window as the last entry in the list. It is called New Rights Group. The icon beside the rights group indicates the role to which the group belongs. Publisher: Addison Wesley
October 31, 2003 YouPub canDate: create new rights groups for all roles but the administrator. There is only one ISBN: 0-321-19444-6 Administrator rights group that belongs to this role. Pages: 1136
To name a new rights group, right-click New Rights Group, select Rename, and then type a name for the new group. The name should be less than 100 characters in length and shouldn't contain non-US-ASCII alphanumeric characters. You can use spaces in the rights group name. "This is one of those rare books that you will read to learn about the product and keep It is a good practice to use self-explanatory names. For example, if the rights group we are rereading to find those tidbits that you missed before." creating is for editors who edit content in the Manufacturing channel, we can name it —Gary Bushey, SharePoint Server MVP "Manufacturing Editors" (Figure 17-2). Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators Figure and developers the ever-increasing amount of content on their 17-2.handle Adding a new rights group Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? How do best deploy CMS according size, After Chapter you have22: created andyou named a new rights group, it'stoa your goodorganization's practice to addneeds, a description and resources? for this group. The description is optional, but it may help in administering the group in the future if the description provides useful information about the group—for example, to what Chapter How you publish dynamic data? right-click the rights group, select containers the32: group is do assigned. To add a description, Properties, and fill in the Description box in the General tab.
[ Team LiB ] As shown in Figure 17-3, the General tab, apart from Description, provides some other useful data about the group, such as when it was created and by whom, when it was last modified and by whom, and who is the locking owner of the group. The ownership lock blocks users from assigning the same rights group concurrently to containers. Provided you have CMS administrative rights, you can change the locking owner.
Figure 17-3. The General tab of Properties
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Assigning Members to Rights Groups
This thorough reference explains the product architecture, then shows you how to create and edit content and use themembers workflow. coverage includes CMS administration security, The next step is to add toTopic the rights group. A member of a CMS rightsand groups may be the Publishing API, deployment options, andThe template development. A a Windows 2003/2000/NT individual usersite or configuration, a group account. account may be a domain running used throughout book to illustrate how important CMS features are account example or a localisaccount. Managingthe membership in a CMS rights group is done using the implemented in real-world Web site development. Inside you'll find answers to such questions group's Properties > Group Members tab. as: To assign the members to the group, on the Group Members tab click the Modify button. The Modify Members dialog box for the rights group opens. In the NT Domains area, select a Chapter do you domain. Don't6: beHow confused bycustomize the nameworkflow? of this area: All domains, whether Windows 2003, 2000, or NT, are displayed as NT domains; it is just an interface peculiarity. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? NOTE: Domains are added to the CMS environment using the Server Configuration Application Weyou willbest lookdeploy into adding domains intoChapter 18. Chapter 22:(SCA). How do CMS according your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? After you've selected a domain in the NT Domains section, the domain name, in the format
name>, appears in the Source field. You cannot type in the Source field. If [WintNT://<domain Team LiB ] you'd like to add accounts from a domain, but the domain is not shown in the NT Domains section, this domain has to be configured in the SCA first.
NOTE: The CMS system account must have at least read access to Active Directory Users in the Windows domains from which you are adding the users and groups.
To display the domain security groups from the drop-down list, choose "Select from list of all groups," or choose "Select from list of all groups and users" to display both user and group accounts, as shown in Figure 17-4. The accounts are displayed in the Name area. Up to a thousand accounts may be displayed at one time. A text box called Display List allows you to move between theof"pages." • Table Contents The number of pages equals the number of total users/groups in the domain divided by 1,000. For 2002: example, if a domain Microsoft Content Management Server A Complete Guide contained 5,010 users/groups, the text box would show that there were six pages overall. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 17-4. Modify Members dialog box Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
CMS imports accounts approximately every 10 Content to 17 minutes. Any valid account is a2002 Chapter user 10: How do you develop for Microsoft Management Server (CMS) potential CMS user. If a user or group you want to add doesn't appear in the Name list, click using Visual Studio .NET? the Synchronize button to force the import and update the list of users and groups in the domain. Chapter 17: How do you establish user rights? To add a Windows security group all itsCMS members to the CMS organization's rights group, select the Chapter 22: How do you bestand deploy according to your needs, size, Windows account from the Name list and click Add. The group is moved to the Rights and group resources? Group Members list. Similarly, to add an individual user, select the user account from the list and click Add.32: Instead the dynamic account and clicking the Add button, to move a user or Chapter How of doselecting you publish data? group account to the Rights Group Members list, you may just double-click the Windows
in the [account Team LiB ] Name list. If the user or group account is not displayed in the list even after you've synchronized it, make sure that "Manually enter groups and users" is chosen, and then type the Windows user or security group account name from this domain in the Group or User Name field; then click Add. The user or group is moved to the Rights Group Members list. You can also look in the Windows group membership if you wish and add individual members to the CMS rights group. To choose members of a Windows group, select the group name and click Members. The NT Group Members dialog box appears, as shown in Figure 17-5. To add an account to the rights group, select the check box beside the name of the account; select as many accounts as you need, and click OK.
Figure 17-5. NT Group Members dialog box •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
It is a good practice to assign members to thearchitecture, CMS rights groups on a you Windows group basis. This thorough reference explains the product then shows how to create and Rather than adding Windows user accounts to each CMS rights groups individually, add edit content and use the workflow. Topic coverage includes CMS administration and security, Windows security accounts to the site CMSconfiguration, rights group. and When you adddevelopment. or remove users the Publishing API,group deployment options, template A from theexample Windowsisgroups, the CMS rights groups will reflect theimportant changes CMS automatically. running used throughout the book to illustrate how features are Organizing theingroup membership this way mayInside significantly minimize theto administrative implemented real-world Web siteindevelopment. you'll find answers such questions overhead of maintaining user rights in CMS. as: After you've added all the necessary accounts to the Rights Group Members list, click OK in the Chapter 6: How dobox. youThe customize workflow? Modify Members dialog selected account names appear in the Rights Group Members area on the Group Members tab, as shown in Figure 17-6. You have assigned members to the rightsChapter group. 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Figure 17-6. The Group Members tab of Properties
Chapter 17: How do you establish user rights?
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Removing Members from Rights Groups
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their To remove an account a CMS rights group, right-click the group, to the Properties > Web sites. However, anfrom authoritative source of product information hasgobeen missing . . . until Group Members tab, select the account you want to remove, and click Remove. now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how NOTE:their There is no synchronization the Active Directoryby and the CMS CMS features and to enhance Web servers' scalability,between flexibility, and extensibility using database. If a CMS user has been removed from the Windows domain, the user API to manage content on the Microsoft platform. account name still remains in the CMS database. However, the user is no longer able to log on to CMS. explains the product architecture, then shows you how to create and This thorough reference edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are When a user account is deleted fromdevelopment. the Active Directory, it stillfind appears in any CMSquestions rights implemented in real-world Web site Inside you'll answers to such groups the user was a member of. It is necessary to use the Site Manager to manually remove as: the user from the CMS rights groups to which they were assigned.
This isChapter one of the reasons whycustomize it is not advisable 6: How do you workflow?to have individual CMS users as members of a rights group. Instead, create a Windows security group, add users to this group, and add the groupChapter account10: to the rights group.for For example, John and Mary are going to (CMS) become HowCMS do you develop Microsoft Content Management Server 2002 editors in the Manufacturing channel. We can now create a Windows security group called using Visual Studio .NET? CMS_ManufacturingEditors, add John's and Mary's Windows accounts to this group, and then Chapter 17: How do youEditors establish user rights?to the Manufacturing Editors CMS rights add the CMS_Manufacturing group account group we have already created (refer back to Figures 17-2,17-4, and 17-6). Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Assigning a Rights Group Containers Chapter 32: How do you publishto dynamic data?
a CMS [After Team LiB ] rights group has been created and members have been added to it, the next step is to set up the containers in which the group members will be working. The mapping between a CMS rights group and a container can be done from either the rights group Properties or the container Properties. To assign a rights group to containers, right-click the rights group and go to the Properties > Group Rights tab. The tab shows the containers hierarchy. Red X marks indicate that the rights group is not assigned to a container; green check marks indicate that the rights group has already been assigned to a container (Figure 17-7). When a rights group is assigned to a container, the members of the group have rights in this container that are defined by the role to which the rights group belongs. For example, you can see from Figure 17-7 that the rights group Manufacturing Editors is assigned to the /botsconsulting/services/manufacturing channel, the resource gallery /BOTS Consulting/general, and the template gallery /BOTS Consulting.
•
Figure 17-7. The Group Rights tab of Properties
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions The members of the group can create, edit, and submit pages and page content, and approve as: and decline page content in the /services/manufacturing channel; they have read access to the resource and template galleries to which they are assigned. Chapter 6: How do you customize workflow? To assign one container to a rights group, just click once the name of the container you want to assign. The red X beside name changes to a green check mark. To assign Chapter 10: How dothe youcontainer develop for Microsoft Content Management Server (CMS) a2002 container and all its subcontainers, or children, right-click the container and select Propagate using Visual Studio .NET? Rights to Children. Each red X beside the container and all its children changes to a green checkChapter mark. 17: How do you establish user rights?
To remove the22: rights from the container, click it once, and the green check mark size, Chapter Howgroup do you best deploy CMS according to your organization's needs, changes a red X. To remove the rights group from the container and all its subcontainers, andto resources? right-click the container and select Propagate Rights to Children. Chapter 32: How do you publish dynamic data? Assignment and removal of rights groups to and from containers take effect immediately.
[Therefore, Team LiB the ] Cancel button becomes disabled. To undo your changes, you must reassign rights groups to containers manually.
Containers' hierarchies in the Site Manager provide access to an individual container's configuration. You can see a container description, if it has been set up, when you hover your mouse over its name. You can access the full properties of a container by right-clicking its name and selecting Properties. The Properties > Rights tab on a container shows a list of rights groups already assigned to the container. You can also assign rights groups directly from a container. To do this, right-click a container name in the Site Manager hierarchy (a channel, a template gallery, or a resource gallery) and choose the Properties > Rights tab. The Current User Rights list shows rights groups that have been assigned to the channel. To add or remove a rights group, click the Modify button; in the Look In box, select a user role and then the name of the rights group within this role, and click Add. The rights group is added to the Selected Rights Groups box. To assign the channel the same rights groups as its parent folder, click Add Parent's Rights, and the rights groups for the • Table of Contents parent channel in the Selected Groups Microsoft Content appear Management Server 2002: Rights A Complete Guidebox. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
For example, to assign the authors rights group Manufacturing Authors to the /botsconsulting/services/manufacturing channel, select Authors in the drop-down list, select the Manufacturing Authors rights group you'd like to assign, and then click Add (Figure 17-8). Publisher: Addison Wesley
Pub Date: October 31, 2003
Figure 17-8. Select User Rights for Channel dialog box
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size,
Subscriber, Author, Editor, and Moderator Rights and resources?
32: the Howsubscribers, do you publish dynamic data? WhenChapter you assign authors, editors, or moderators rights groups to a channel,
forget [don't Team LiB ]to assign the same rights groups to the appropriate template galleries and resource galleries. Failure to do that will lead to authors, editors, and moderators being unable to author or edit pages in the channel. Even if you set up the default template and resource galleries for the channel, the rights are not propagated from the channel to the galleries. You need to assign the appropriate rights groups manually. If a channel only has authors and/or editors rights groups assigned and no moderators, then the pages are published after the page content has been approved by a member of the editors rights group. The publishing details will be approved automatically. When you click OK in the channel Properties > Rights > Selected Rights Groups box, the Site Manager displays the message shown in Figure 17-9, asking you to confirm auto-approval.
Figure 17-9. Auto-approval message •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
When Pages: any rights 1136 group is assigned to a channel, the members of this group are assigned the subscription rights to the channel. This allows the rights group members to view content published to the channel in their browser. If your site dynamic navigation has been set up to display the channels structure in the same "This is one order of those books that you will to read to itlearn thethis product and keep hierarchical as rare the Site Manager, then view in a about channel, channel's subscribers rereading to rights find those tidbits that you missed before." should have to the channels above it in the channel hierarchy. To this end, you need to —Gary Bushey, SharePoint Server MVP have appropriate rights in the hierarchy above this make sure that the channel's subscribers channel. For example, as shown in Figure 17-10, subscribers in the Research channel need the Content Management Server (CMS) is fast becoming a vital content-management tool that subscription rights in the Knowledge channel if you want them to be able to navigate to it. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Figure 17-10. Subscribers rights in channel hierarchy now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we focused on setting up user rights in the CMS environment. Setting up user rights is an integral step in configuring the publishing environment in CMS. Configuring the publishing environment consists of two stages, as follows: 1. Creating and configuring containers 2. Assigning user rights to these containers •
of Contents We discussedTable creating containers in Chapter 9; then, in the previous chapter, we looked into configuring containers. In this chapter, we concentrated on user roles and setting up user By Bill English , Olga Londer , Shawn , Todd Cawood for a user, you need to perform rights on containers. In orderShell to set upBleeker rights,Stephen on a container the following three steps: Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Pub Date: October 31, 2003
1. Create a CMS rights group within a role you want to assign to the user on this container. ISBN: 0-321-19444-6
2.
Pages: 1136 Add the Windows
2003/2000/NT user or security group account to the CMS rights group.
3. Assign this rights group to the container. In theisnext continue withwill siteread administration and the talkproduct about the "This one chapter, of those we rarewill books that you to learn about andServer keep Configuration Application. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 18. Using the Server Configuration Application The Server Configuration Application (SCA) provides a Web-based interface for configuring the content server component in the CMS installation. The SCA is first run during the CMS installation. However, the SCA is independent of the installation and can be run at any time to configure the server. If you are running multiple CMS servers in a clustered environment, then each server must have an SCA. •
Table of Contents
The SCA can be run locally or remotely. In order to use the SCA, you must be a local administrator on the computer that is running the CMS server.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Two types of parameters can be configured using the SCA. Publisher: Addison Wesley
Local apply Pub Date:settings October 31, 2003 to
a CMS server running on the same computer as the SCA. A local setting is indicated by an icon of a terminal. ISBN: 0-321-19444-6 Pages: 1136
Global settings apply to all CMS servers in a cluster. A global setting is indicated by a globe icon in the SCA. The global setting is stored in the CMS database and affects all servers in the cluster that point to that database, unless individually overridden with a local setting. "This is one of those rare books that you will read to learn about the product and keep rereading [ Team LiBto] find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Launching the SCA The SCA is an ASP application; its starting page is called SCAConfig Main.asp. The SCA is located in the folder \Program Files \Microsoft Content Management Server\server\NRConfig on a machine where the SCA is installed. On a local machine, you can launch the SCA from the Start menu (Start > Programs > Microsoft Content Management Server > Server Configuration Application). The icon on the Start menu is just a shortcut that points to the SCA URL http://:<port number>/NRConfig, where :<port number> identify the Web site where the SCA is installed (Figure 18-1). On any machine that has HTTP access to the SCA computer, you can launch it by directly typing the URL. The Web site, therefore the port number, is selected in the Database Configuration • Table of and Contents Application (DCA) during CMS installation. By default, Microsoft Content Management Server 2002: A Complete Guide the site is the IIS Administration Web Site. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 18-1. The SCA shortcut properties Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
When you launch the SCA, the following checks are performed to determine if CMS exists on a Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 machine. using Visual Studio .NET? Chapter 17: of How you establish user rights? At least one thedo following registry keys exist: HKEY_LOCAL_MACHINE\SOFTWARE\NCompass\Resolution Content Chapter 22: How do you best deploy CMS according to your organization's needs, size, Server\Configuration\0\EntryPoints\, where is the IIS instance ID of the Web and resources? site. Chapter 32: How do you publish dynamic data? There is one registry key for every CMS Web entry point (CMS-enabled IIS virtual Web
site). [ Team LiB For ] example, the default Web site has an instance ID of 1. The Web site with the instance ID has an /NR virtual directory. This directory identifies the site as a CMS site. Two ISAPI filters are installed in the IIS at the global level: Resolution filter located at :\Program Files\Microsoft Content Management Server\Server\bin\ReAuthFilt.dll Resolution HTML Packager located at :\Program Files\Microsoft Content Management Server\Server\bin\REHTMLPackager.dll If any of the checks fail, the SCA will not start. • Table Contents Since the SCA is aofconfiguration utility, it must be secure and not accessible to anonymous Microsoft Content Management Server 2002: A Complete Guide
users. During the SCA installation, the /NRConfig virtual directory is created on a selected Web the most security; therefore, it is the default Web site for SCA installation. The NRConfig virtual directory points to the :\Program Files\Microsoft Content Management Server\server\NRConfig Publisher: Addison Wesley local directory where the SCA is located. During the installation, the ACLs are set on this directory to October restrict31,access Pub Date: 2003 to local administrators (Figure 18-2).
By Billon English , Olga Londer, Shawn Shell , Todd Bleeker, Stephen Cawood site a local machine. The IIS Administration Web Site has
ISBN: 0-321-19444-6 Pages: 1136
Figure 18-2. NRConfig directory security
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? For security reasons, it is not recommended that you install and run the SCA on a Web site if 22: How do you best any ofChapter the following statements aredeploy true. CMS according to your organization's needs, size, and resources?
The site 32: is a How CMS do siteyou used for authoring Chapter publish dynamicand/or data? browsing.
The site [ Team LiB ] uses the default HTTP port 80. The site grants access to everyone by default (it should deny access by default and grant access only to explicit IP addresses or domain names). The site allows anonymous access. The best practice to ensure security when the SCA is used remotely is to run it over a Secure Sockets Layer (SSL) connection. You need to use SSL, for example, to protect the user name and password information for a local administrator if it is being passed in clear text over the network. If there is no SSL enabled, when the SCA is first launched it displays a security alert. This alert is displayed only once, on the first run.
•
NOTE: Table Each of CMS server must have the SCA installed for configuration purposes. Contents can stop the Web site where the SCA has been installed. This will provide an additional security layer for your server.
However, the server has been configured, you Microsoft Contentonce Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Addison Wesley ThePublisher: SCA screen (Figure 18-3) in the top pane displays the current CMS server parameters: the October 31, 2003 URLPub of Date: the IIS virtual site that hosts the first CMS site created on the computer where SCA is ISBN: 0-321-19444-6 installed, the CMS version, the name of the CMS database, and the name of the SQL server hosting the 1136 database. These are read-only and cannot be changed from the SCA. However, you Pages: can change the database name and location using the Database Configuration Application (DCA). Underneath the read-only pane are six tabs that provide access to configuration options: General, Cache, Web, Access, Security, and License. We will now look into the configuration available each tab. "This is one ofoptions those rare booksinthat you will read to learn about the product and keep
rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Figure Server MVP 18-3. General
settings
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, [ Team LiB ] and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
General Settings The General configuration tab is the SCA default tab (Figure 18-3). It allows configuration of settings that affect how CMS URLs are formed. Basically, this tab sets up how users can browse the CMS Web site.
URL Format The URL Format setting allows us to configure how site resources are accessed via a URL in Table of Contents presentation mode. The options are Hierarchical and Unique ID Based.
•
Microsoft Content Management Server 2002: A Complete Guide
By Bill English, Olga Londer , Shawn Shell,channel Todd Bleeker , Stephen the Cawood Hierarchical URLs follow the CMS hierarchy; channel
names present the user with a logical way to browse the site. This setting is the recommended option. The URL looks similar to the URLs formed following a virtual directory structure in non-CMS Web sites. For example, Publisher: Addison Wesley http://www.botsconsulting.com/botsconsulting/about/history points to the Pub Date: October 31, 2003 /botsconsulting/about/history channel. ISBN: 0-321-19444-6
When Pages: channel names are used in URLs, the special characters in the names are replaced by 1136 URL-encoded characters. For example, if you have a channel called About Us, it will appear in a URL as About+Us—that is, http://<site name>/About+Us. The space character in the channel name is URL-encoded and becomes a + character. URLs with many URL-encoded special characters can be confusing for users. To prevent this, follow the channel naming conventions "This is one of those rare books that you will read to learn about the product and keep outlined in the sidebar in Chapter 9. rereading to find those tidbits that you missed before." —Gary Server MVP Unique Bushey, ID BasedSharePoint URLs generate numerical URLs to identify pages and channels. These URLs are based on the Globally Unique Identifiers (GUIDs) that are stored in the Content Repository for Content Management Server (CMS) is fast becoming a vital content-management tool that each CMS object, such as pages and channels. For example, the URL for the helps administrators and developers handle the ever-increasing amount of content on their /botsconsulting/about/history channel would look similar to Web sites. However, an authoritative source of product information has been missing . . . until http://www.botsconsulting.com/NR/exeres/30895FCA-6899-46FD-94E5-241CB1BC6888.htm. now. To change the URL type, click Configure on the General tab (you may need to scroll down in the Microsoft Content Management Server 2002: A Complete Guide is the first book that explains browser window for this button to be displayed); in the General Configuration window (Figure how to effectively unlock the power of CMS. Administrators and developers alike will learn how 18-4), from the URL Format drop-down list, select Hierarchical or Unique ID Based, and click to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and OK. You may need to restart IIS after making this change. API to manage content on the Microsoft platform.
Figure 18-4. Configuration window This thorough reference explains theGeneral product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Using Host Headers Mapping The Map Channel Names to Host Header Names setting provides the ability to automatically map top-level channels as the root channels for a URL with a host header name that is identical to the channel name. It is a useful feature that allows us to host several CMS Web sites, with different domain names, on the same CMS server. These sites share the same CMS database. The cohosting of CMS sites is transparent to users. From the user point of view, they are accessing a separate site, not a shared infrastructure. Host headers mapping only affects URL generation and parsing in presentation mode. The available settings are Yes or No; the default setting is No. To change the host headers mapping, click Configure on the General tab; in the General Configuration window (Figure 18• Contents 4), from the Table Map of Channel Names to Host Header Names drop-down list, select the appropriate Microsoft Content Management Server 2002: A Complete Guide option and click OK. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The CMS host headers mapping functionality is implemented as an ISAPI filter that matches the host header of an incoming HTTP request to the top-level channel names. The HTTP host header is the DNS Wesley name of a site; a top-level channel must have the same name. If the HTTP Publisher: Addison hostPub header of the incoming request exactly matches the name of a top-level channel, CMS Date: October 31, 2003 maps the request to the channel. When this option is enabled, every channel in the root ISBN: 0-321-19444-6 channel becomes a virtual CMS Web site. For example, a top-level channel may be called Pages: 1136 www.CMSsite1.com (Figure 18-5). When the HTTP request for www.CMSsite1.com comes to the server, the site name in the HTTP host header is mapped to the top-level channel with the same name—for example, www.CMSsite1.com. "This is one of those rare books that you will read to learn about the product and keep Figure 18-5. Channels hierarchy host headers mapping enabled rereading to find those tidbits that you missedwith before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A NOTE: Refer to Appendix A for reference information on HTTP host headers. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
When CMS generates a URL pointing to an item inside the virtual site www.CMSsite1.com, it prefixes the URL with do theyou name of the channel in which it is contained. For example, the URL Chapter 6: How customize workflow? pointing to the /products channel within the www.CMSsite1.com channel would be http://www.CMSsite1.com/products. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? A CMS virtual site name must be a valid DNS name. The DNS name should point to an IP address of the17: IIS How server. Multiple virtual CMS site names may point to the same IP address or Chapter do you establish user rights? may use different IP addresses that are assigned to the same IIS server. Chapter 22: How do you best deploy CMS according to your organization's needs, size, It is worth stressing that you don't have to configure HTTP host headers on the IIS server to and resources? use the CMS host headers mapping functionality. These options are not hardwired together. In IIS, HTTP host32: headers areyou used to provide multihosting. The HTTP host headers identify Chapter How do publish dynamic data? multiple virtual Web sites that reside on one physical server. In this case, all sites share the
IPLiB address. However, you can also provide IIS multihosting by assigning a unique IP [same Team ] address to each virtual Web site without configuring HTTP host headers. In both cases you can enable CMS host headers mapping. However, you need to configure the HTTP host headers on the IIS site if a single IP address is used for multiple CMS sites. You don't have to set up separate virtual sites under IIS. Instead, you may use a single IIS site with multiple HTTP host headers configured. If you prefer, you can use multiple IIS sites with a single host header configured for each, or any combination of these methods. Each IIS site must be set up as a CMS Web entry point; it is CMS that does the mapping.
NOTE: We will look into CMS Web entry points later in this chapter. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
For example, let's consider the hosting of five CMS sites on an IIS server with a single IP address. Each site has its own DNS name, as follows: www.CMSsite1.com, www.CMSsite2.com, www.CMSsite3.com, www.CMSsite4.com, and wwwCMSsite5.com. Figure 18-5 illustrates the top-level channels structure in the Site Manager for a CMS server that is configured for host Publisher: Addison Wesley headers mapping. There are five top-level channels that are the root channels for virtual CMS Pub Date: October 31, 2003 sites, with the same names as their corresponding sites. Each of the five DNS names may be ISBN: 0-321-19444-6 mapped as a host header name to a separate IIS site (Figure 18-6), or all five DNS names for Pages: 1136 may be mapped as host header names to a single IIS site using the IIS snap-in the virtual sites (Figure 18-7). In any case, a Web request for the URLs that refer to these sites will be mapped to the appropriate channel.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
"This is oneFigure of those 18-6. rare books youwith will read to learn about the product and keep IISthat site HTTP host headers enabled rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
Figure 18-7. Multiple HTTP host headers configured on a single IIS
Web site
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
When you decide whether to use oneisIIS or multiple IIScontent-management sites with host headers mapping, Content Management Server (CMS) fastsite becoming a vital tool that you need to take into consideration how your CMS sites will run in these different helps administrators and developers handle the ever-increasing amount of content on their configurations. If youan use a single IIS source site with host headers, then all missing CMS virtual sites Web sites. However, authoritative of multiple product information has been . . . until will run within one Web application. If you use multiple IIS sites, each with a host header now. enabled, then each CMS virtual site will run as an independent Web application. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains However, if you need to apply different settings to multiple CMS sites, then alike you need to how how to effectively unlock the power of CMS. Administrators and developers will learn consider setting multiple IISscalability, virtual sites. For example, you may need to protect one site and to enhance their up Web servers' flexibility, and extensibility by using CMS features withto SSL, but not the others. this case, you don't use HTTP host headers to identify the IIS API manage content on theInMicrosoft platform. site, but you would need to identify the site with a unique IP address. Another example is having one read-only siteexplains on an IP address onarchitecture, the externalthen interface and a read/write siteand on This thorough reference the product shows you how to create an internal interface for security reasons. Once again, the sites will be identified by IP edit content and use the workflow. Topic coverage includes CMS administration and security, addresses; youAPI, don't need to configure host headers and on the IIS. development. A the Publishing deployment options, HTTP site configuration, template running example is used throughout the book to illustrate how important CMS features are When CMS host headers mapping is development. enabled, you must every directly implemented in real-world Web site Insidemake you'llsure find that answers tochannel such questions under the root channel is a virtual Web site. You cannot have a mixture of virtual Web site and as: normal channels on the same CMS server using the same database. The setting is applicable to all sites sharing the CMS database. Chapter 6: How do you customize workflow? CMS host headers mapping can be used for a single CMS site. When you create your new CMS site as a Web 10: application thedevelop root of for a virtual IIS site, you Management expect to be able to (CMS) access 2002 the Chapter How doinyou Microsoft Content Server default page of theStudio top-level channel by the root URL that contains only the DNS name of the using Visual .NET? IIS site, such as http://. However, for this to happen, you need to enable CMS host Chapter 17: on How do you user rights? headers mapping your site.establish Refer to Chapter 8 for step-by-step configuration instructions for accessing your site by the root URL. Chapter 22: How do you best deploy CMS according to your organization's needs, size, andcommon resources? Another requirement is to map multiple DNS names to a single site. For example, you may want the incoming requests for both www.CMSsite.com and CMSsite.com to come to the 32: How do you publish sameChapter CMS site, www.CMSsite.com. In dynamic this case,data? the HTTP host headers in the incoming request will be different depending on the DNS name used. However, it is possible to map different DNS
[names Team to LiBa ]single top-level channel so that different users can reference the same channel, www.CMSsite.com, by using different site names. This functionality can be achieved in several ways—for example:
Create a custom 404 error page that redirects the incoming request for CMSsite.com to www.CMSsite.com. Write an ISAPI filter that modifies the HTTP host header of the incoming request from CMSsite.com to www.CMSsite.com before the CMS ISAPI filter receives the request.
Compatibility Mode The last setting shown on the General tab is the Server ASP Compatibility Mode. The available Table of Contents values are Mixed and ASP.NET Only. Mixed mode means that the CMS server supports both Microsoft Content Management Server 2002: A Complete Guide ASP and ASP.NET sites; CMS server in ASP.NET Only mode supports only ASP.NET sites. The By Bill English , Olga Londer , Shawn Shell, Toddduring Bleekerthe , Stephen server compatibility mode is selected CMS Cawood installation and cannot be changed after the installation. •
Publisher: Addison Wesley
[ Team LiB ]October 31, 2003 Pub Date: ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Configuring Cache Content Management Server uses caching to increase the speed of page processing and thus to improve the performance of the Web site. Three types of caching can be used with CMS: disk cache, in-memory object cache, and ASP.NET output cache. Disk cache and in-memory object cache are configured using the SCA Cache tab (Figure 18-8).
Figure 18-8. Cache settings •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
NOTE: ASP.NET output caching is configured directly in the ASP.NET-based page This thorough reference explains the product architecture, then shows you how to create and templates; it cannot be configured in the SCA. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Disk Cache The disk cache6:isHow a file-based cache for page resources. The location of the cache is configured Chapter do you customize workflow? during the installation of CMS. The default location is \Program Files\Microsoft Content Management Server\Server. After theManagement installation, Server the cache location Chapter 10: How do you develop for Microsoft Content (CMS) 2002 can be changed the.NET? SCA. Two directories are created under the specified cache location: using Visualusing Studio Chapter 17: How do you establish user rights? The \rdonlyres directory provides disk cache for read-only content—for example,22: images. Chapter How do you best deploy CMS according to your organization's needs, size, and resources? The \exeres directory provides disk cache for dynamically generated content—for example, pages in ASP-based sites. Chapter 32: How do you publish dynamic data?
are added to the CMS Web site as the virtual IIS directories under the [These Teamtwo LiBdirectories ] /NR virtual directory: /NR/rdonlyres and /NR/exeres, respectively. When you change the physical cache location, these virtual directories are reconfigured automatically to point to the newly created directories for the dynamic and the read-only cache. The cache directories' locations are stored in the registry. The registry key HKEY_LOCAL_MACHINE\SOFTWARE\NCompass\Resolution Content Server\Configuration\0\Local\Cache contains the values PhysicalExecPrefix and PhysicalReadPrefix, which point to the physical disk location of the dynamic cache and the readonly cache, respectively. The /NR/exeres directory is used for dynamic caching only in ASP-based sites. In ASP.NETbased sites, dynamically generated pages and user controls are cached in the ASP.NET output cache. However, the ID-based page and channel URLs in both ASP and ASP.NET sites look as if the resulting pages were served from /NR/exeres—for example, http://www.botsconsulting.com/NR/exeres/30895FCA-6899-46FD-94E5-241CB1BC6888.htm. • Table of Contents In ASP.NET sites, this is just a convention for howGuide the ID-based URLs are formed; the pages Microsoft Content Management Server 2002: A Complete are not cached in the disk-based dynamic cache. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood To set up the cache location, click Configure on the Cache tab; in the Cache Configuration window (Figure 18-9), click Browse; in the Disk Cache Location Browser (Figure 18-10), Publisher: Addison Wesley navigate to a folder you want to become the cache location (the currently selected folder will be Pub Date: October 31, 2003 highlighted in red), and then OK to confirm in the Cache Configuration window. ISBN: 0-321-19444-6 Pages: 1136
Figure 18-9. Cache Configuration window
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Figure 18-10. Disk Cache Location Browser as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
It is a good practice to put the CMS cache andA the IIS log Guide files onisdifferent to prevent Microsoft Content Management Server 2002: Complete the first drives, book that explains the log files from accumulating and causing problems with the CMS caching. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and The minimum cache size is 50MB. The maximum cache size is the currently available free space API to manage content on the Microsoft platform. on the cache location drive. The default is 50% of the maximum, up to 2GB. To set up the maximum cache size, in explains the Cache Configuration window (Figure 18-9),you click thetotop Set Global This thorough reference the product architecture, then shows how create and button to specify the global maximum cache value for the cluster (Figure 18-11), or type the edit content and use the workflow. Topic coverage includes CMS administration and security, value for the local cache in thesite bottom Current Override Valuedevelopment. box. the Publishing API,maximum deployment options, configuration, and template A running example is used throughout the book to illustrate how important CMS features are 18-11. Maximum Disk Cache Size implemented in Figure real-world Web siteGlobal development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Node Cache Chapter 32: How do you publish dynamic data?
cache [Node Team LiB ]settings allow us to configure the in-memory object cache. When the CMS server accesses objects stored in the Content Repository, these objects are referred to as nodes. Once the database has been queried, the server caches the resulting objects as nodes in memory to avoid additional database access. Using the SCA, we can: Set up the maximum number of nodes to be cached. Clear the memory cache. To set up the maximum number of nodes in memory cache, in the Cache Configuration window (Figure 18-9), click the bottom Set Global button to specify the global maximum number of nodes in memory cache for the cluster (Figure 18-12), or type the value for the local maximum number of nodes in memory cache in the bottom Current Override Value box. •
Table of 18-12. Contents Global Maximum Nodes in Memory Cache Figure
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The size of the node cache should be sufficient to store frequently accessed objects but not so large that it has to be stored in virtual memory. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP NOTE: You can use the Task Manager to monitor physical memory usage. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Clearing the in-memory node cache provides the ability to force synchronization with the now. database. If the server appears to be suffering from synchronization problems, click the Clear Memory Cache button on the SCA Cache tab (Figure 18-8). You may a minor in Microsoft Content Management Server 2002: A Complete Guide is thenotice first book thatdecline explains server performance during the memory clearing operation. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and [ Team LiB ] API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Setting Up Web Entry Points Within IIS we usually have multiple virtual Web sites; these sites may be uniquely identified using IP addresses and port numbers as well as HTTP host headers. When CMS is installed, only one IIS virtual site is configured as the CMS Web site. Since the IIS virtual site points to a CMS server, the IIS sites are referred to as CMS Web entry points. Since the CMS ISAPI filters are installed globally on the IIS site, any of the IIS virtual sites can be an entry point for CMS. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NOTE: CMS Web sites are entry points into Content Management Server; they are not multiple instances of Content Management Server running on the same machine.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Date: October 31, 2003 18-13) provides the ability to configure the IIS virtual sites as CMS ThePub SCA Web tab (Figure ISBN: 0-321-19444-6 entry points. Pages: 1136
Figure 18-13. Web entry points "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 For each of the IIS virtual sites, we can add or remove the CMS entry point. There are three using Visual Studio .NET? configuration options available in the SCA. Chapter 17: How do you establish user rights?
Yes—Read Write: The IIS virtual site is configured as a CMS entry point; the CMS site is Chapter 22: How do you best deploy CMS according to your organization's needs, size, accessible in both presentation mode and authoring mode. and resources? Yes—Read Only: The IIS virtual site is configured as a CMS entry point; the CMS site is Chapter 32: How do you publish dynamic data? only available in presentation mode (which is read-only); it is not accessible in authoring
mode. [ Team LiB ]The Switch to Edit Site link is not displayed, because the Web Author client is disabled. The Site Manager session will not be allowed to run either, even for viewing containers. No: The IIS virtual site is not configured as a CMS entry point. Combining read-only sites with one read/write entry point is very useful for deployment on a Web farm. We will look into it in Chapter 20. To configure a CMS Web entry point for an IIS virtual site, in the SCA Web tab, click Configure; in the Web Server Configuration window (Figure 18-14), select the appropriate option for the IIS virtual site from the drop-down list in the MCMS? column. For each IIS virtual site running on a machine where the SCA is installed, the Web Server Configuration window lists the site name, IP address, TCP port number, HTTP host header (under the Host Name column), and the CMS entry point setting (under the MCMS? column). •
Table of Contents
Figure 18-14. Web Server Configuration window
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Once the CMS entry point is added in the SCA, two things are configured. now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The followingunlock registry key is created: how to effectively the power of CMS. Administrators and developers alike will learn how HKEY_LOCAL_MACHINE\SOFTWARE\NCompass\Resolution Content to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and where N is the IIS virtual site ID. API toServer\Configuration\0\EntryPoints\, manage content on the Microsoft platform.
The /NR and /MCMS virtual directories added to the IISshows site. you how to create and This thorough reference explains the productare architecture, then edit content and use the workflow. Topic coverage includes CMS administration and security, For Publishing the configuration changes tooptions, take effect, the IIS site has to template be stopped and restarted. the API, deployment site configuration, and development. A When you changeisthe entry point setting, you to willillustrate receive a warning to this effect, shown in running example used throughout the book how important CMS features are Figure 18-15. The actual configuration takes place when you click OK in the Web Server implemented in real-world Web site development. Inside you'll find answers to such questions Configuration window. as:
Figure 18-15. Web entry point warning
Chapter 6: How do you customize workflow?
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
NOTE: [ Team LiB ]You cannot change the entry point setting for the IIS virtual Web site that hosts the SCA.
To remove an entry point from an IIS site, select No from the drop-down list in the MCMS? column for this site. Both the /NR and /MCMS virtual directories will be removed from the site.
NOTE: If only one IIS virtual site is configured as a CMS entry point, this entry point cannot be removed.
[ Team LiB ]Table of Contents • Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Adding Domains In CMS all access is authenticated against Windows user accounts. The SCA Access tab displays a list of domains that will be used to authenticate CMS users (Figure 18-16). Administrators can add domains to this list. When you log in to the Site Manager and when you use the Web Author manual login, only these domains are available. In the Site Manager, only these domains will be listed for selecting accounts to be added as members of the CMS rights groups. By adding domains in the SCA, you make them visible in the CMS environment. You can then increase the number of users from these domains that take part in the publishing workflow. •
Table of Contents Figure
18-16. Supported domains
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and The SCA Access tab lists Windows 2003, Windows 2000, and Windows NT domains used for edit content and use the workflow. Topic coverage includes CMS administration and security, authentication under the same heading, Windows NT Authentication, in the Supported Windows the Publishing API, deployment options, site configuration, and template development. A NT Domains list (Figure 18-16). The list displays the NetBIOS domain names. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions To modify the list of supported domains, in the SCA Access tab click Configure; in the Access as: window either manually enter the domain name and click the Add button (Figure 18-17), or click the Browse button and select the domain you'd like to add from the list of visible domains, and click OK. 6: How do you customize workflow? Chapter Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Figure 18-17. Access window using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 The CMS system account is used to browse domains; in order to do so, it must have Pages: appropriate 1136 privileges on the domains. We will look into the CMS system account in the next section.
[ Team "This is LiB one]of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Configuring Security Settings Security settings such as the CMS system account, CMS guest access, and cookie properties are configured in the SCA Security tab (Figure 18-18).
Figure 18-18. Security settings
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and CMS System Account API to manage content on the Microsoft platform.
The CMS system account is the Windows account under which Content Management Server is This reference explains architecture, shows you how to create and run. thorough This account is set up duringthe theproduct installation. It can bethen either a domain account or a local edit content and use the workflow. Topic coverage includes CMS administration and security, account. After the installation, the CMS system account can be modified using the SCA. the Publishing API, deployment options, site configuration, and template development. A running example is that usedyou throughout book toWindows illustrateuser howaccount important CMS features It is recommended create a the dedicated to be used as theare CMS implemented in real-world Web site development. Inside you'll find answers to such system account. The account should not be configured as a privileged Windows user,questions since it as: only requires limited access. If the CMS system account password is changed, CMS will not be able to write files to the cache folder and access the CMS database. Therefore, you need to set the password on the account to never expire. It is not recommended that you run CMS under Chapter 6: How do you customize workflow? any of the existing user accounts, because users change their passwords from time to time. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 However, if the CMS system account credentials have been reset, you can change the system using Visual Studio .NET? account information when you launch the SCA. Since the SCA is unable to launch, it will give an error Chapter message17: suggesting thatestablish you change system account password (Figure 18-19). Click How do you userthe rights? the Configure button to specify the correct password (Figure 18-20). Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Figure 18-19. Message to change system account password Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 18-20. Update System Account Credentials dialog box "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and CMS uses the system account to connect to the Active Directory (AD) and to access protected API to manage content on the Microsoft platform. resources. For Active Directory access, the system account needs to have sufficient permissions to enumerate browse any domains, organizational units (OUs), containers, This thorough and reference explains the product architecture, then shows you how groups, to createand and users that are from CMS-supported domains. It must have at least read permissions on these edit content and use the workflow. Topic coverage includes CMS administration and security, AD objects. ForAPI, example, in order to be able to select a user or template group from a listed domain the Publishing deployment options, site configuration, and development. A to add to a CMS rights group, the CMS system account would need at least read rights in that running example is used throughout the book to illustrate how important CMS features are domain. implemented in real-world Web site development. Inside you'll find answers to such questions as: As far as accessing resources is concerned, the CMS system account uses an impersonation process to carry out the tasks on behalf of the authenticated user as an agent. The CMS system account have a customize "log on locally" right on the computer where CMS is installed. We Chapter 6: must How do you workflow? will look into CMS authentication and authorization in Chapter 19. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 If SQLusing Integrated Security is used, then the CMS system account must have read and write Visual Studio .NET? access to the CMS database hosted by SQL. The CMS system account must have the following database roles17: assigned it on the CMSuser database: Chapter How dotoyou establish rights? db_datareader and db_datawriter. Using an import function in site deployment also requires the db_ddladmin role. Chapter 22: How do you best deploy CMS according to your organization's needs, size, The setting for the CMS system account is stored in the CMS database. To modify the CMS and resources? system account, in the SCA Security tab click Configure; in the Security Configuration window Chapter 32: do youSystem publishAccount dynamicsection, data? either manually enter the account name (Figure 18-21), in How the MCMS in the form <domain>\<user name>, or click the Browse button to select the domain and the
If you are using a local account, enter the account name in the form \<user name>. If you decide to browse to the account, you will be presented with a warning message that the CMS NT browser can take a while to present you with the list of users (Figure 18-22); just click OK; then select a domain from the Windows NT Domain list and an account from the Windows NT Users list (Figure 18-23).
Figure 18-21. Security Configuration window
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Figure NT Browser warning —Gary Bushey, SharePoint Server18-22. MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
Figure 18-23. Windows NT User Browser
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
The CMS system account must have a password. A blank password is not allowed. If you leave Content Management Server (CMS) is fast becoming a vital content-management tool that the password blank, the error message shown in Figure 18-24 will be displayed. After you have helps administrators and developers handle the ever-increasing amount of content on their selected the account, type in the corresponding password and click OK. If the account Web sites. However, an authoritative source of product information has been missing . . . until credentials cannot be verified against the AD, the warning shown in Figure 18-25 will be now. displayed. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators andmessage developers alike will learn how Figure 18-24. Blank password to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: ChapterFigure 6: How do you customize workflow? 18-25. System account
credentials warning
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Guest Access Guest access enables unauthenticated users to access the CMS site. Since all CMS access must Table of Contents be authenticated, a guest account is used to map anonymous users to a specified account. It Microsoft Content Management Server 2002: A Complete Guide can be either a domain account or a local account. In order for anonymous users to be able to By Bill English , Olga Londer , Shawn Shell, Todd Bleeker , Stephen Cawood view the CMS Web site, the guest account must be added to a subscribers rights group in the Site Manager, and then this rights group must be assigned to the channels and galleries that guest users are allowed to view. •
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
NOTE: If the guest account is added to any other rights group but the subscribers Pages: 1136 group, the guest account is still only granted subscriber rights. If the guest account is enabled, guest user rights are added to all other user rights. For example, on a site with guest access enabled, a channel manager has full rights on the channels they are managing and guest rights on the rest of the site. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP The SCA provides the ability to configure guest access. Guest access is enabled during the CMS Content Management Server (CMS) is fast becoming a vital content-management tool that installation. After the installation, it can be changed using the SCA. To change whether guest helps administrators and developers handle the ever-increasing amount of content on their access is allowed, in the SCA Security tab, click Configure; in the Security Configuration window Web sites. However, an authoritative source of product information has been missing . . . until (Figure 18-21), in the Guest Visitors section, in the Allow Guests On Site drop-down list, choose now. Yes or No; then click OK. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The setting for the CMS guest account is stored in the CMS database. To modify the CMS guest how to effectively unlock the power of CMS. Administrators and developers alike will learn how account, in the SCA Security tab, click Configure; in the Security Configuration window (Figure to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 18-21), in the Guest Visitors section, either manually enter the account name in the form API to manage content on the Microsoft platform. <domain>\<user name> or click the Browse button to select the domain and then the account. If you are using a local account, enter the account name in the form \<user This thorough reference explains the product architecture, then shows you how to create and name>. No password is required for the guest account. Click OK to confirm the configuration edit content and use the workflow. Topic coverage includes CMS administration and security, change. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Cookie Settings
When a user is authenticated by CMS, the user is assigned a CMS authentication cookie. A user Chapter 6: How do you customize workflow? may be an explicitly authenticated user or a guest user. Depending on the CMS authentication configuration, the How CMS do authentication is either a persistent cookie that is stored the Chapter 10: you develop cookie for Microsoft Content Management Server (CMS)on 2002 hard disk on the user's machine, or an in-memory cookie that is maintained in the browser on using Visual Studio .NET? the client machine and is lost when the browser is closed. This cookie is attached to subsequent requests from 17: the How user's to theuser CMSrights? server, which validates the request. Chapter domachine you establish Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? NOTE: We will look into CMS authentication configuration in different scenarios in detail in Chapters 19 you and publish 20. Chapter 32: How do dynamic data?
[ Team LiB ]
The Security tab (Figure 18-18) allows us to specify two cookie settings: Cookie Lifetime: Cookie lifetime is the amount of time, in minutes, that a cookie is valid. The cookie is valid for a certain amount of time, after which it expires. After the cookie has expired, users are asked to authenticate themselves again. The default is 30 minutes. To modify the setting, in the SCA Security tab click Configure; in the Security Configuration window (Figure 18-21), in the Web Browser Cookie Settings section, type the new amount of time in minutes for which you'd like the cookies to be valid. Check Machine IP Against Cookie: A CMS cookie contains the IP address of the machine where the first request from an authenticated user came from. If this property is set to Yes, the originating IP address of every subsequent request is validated against the IP • Table of Contents address in Management the cookie,Server to make sure that subsequent requests come from the same user's Microsoft Content 2002: A Complete Guide machine as the original authentication request. Although this setting is certainly not ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood bulletproof, it provides an additional security layer. However, in certain scenarios, if this setting is enabled, your site may appear to be not working properly for certain users. This happens when each HTTP request from the same Pub Date: October 31, a2003 user may have different IP address. If this is the case, disable the setting.
Publisher: Addison Wesley
ISBN: 0-321-19444-6
To modify Pages: 1136 the setting, in the SCA Security tab, click Configure; in the Security Configuration window (Figure 18-21), in the Web Browser Cookie Settings section, select Yes or No from the drop-down list for the Check Machine IP Against Cookie setting; click OK. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, Server MVP Viewing theSharePoint CMS License Content Server 18-26) (CMS) provides is fast becoming a vital content-management tool that The SCA Management License tab (Figure read-only information about the server license. helps administrators and developers handle the ever-increasing amount of content on their The tab displays the following information: Web sites. However, an authoritative source of product information has been missing . . . until now. User name Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Company name to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toProduct manage IDcontent on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and License type edit content and use the workflow. Topic coverage includes CMS administration and security, Expiry date (for the evaluation version only) the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world WebFigure site development. Inside you'll find answers to such questions 18-26. License tab as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
[ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we looked into the CMS server configuration options available via the Server Configuration Application. The available settings include URL formation and parsing, CMS caching, Web entry points, supported domains, security settings (such as system and guest accounts, and cookie properties), and read-only license information. In the next chapter, we will focus on user authentication and authorization in the CMS environment. •
[ Team LiB ]
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 19. Managing User Access In previous chapters, we created and developed a CMS site, set up the publishing environment for the site, and discussed the server configuration options. Also, in Chapter 11 we had a detailed discussion about CMS page processing. We are now well equipped to look into user authentication and authorization in the CMS environment. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Authentication and Authorization Process As we have already seen, CMS processing involves several layers, as follows: Browser IIS and ISAPI filters
•
Worker process (ASP.NET worker process aspnet_wp.exe in IIS 5/Windows 2000, or Web worker process w3wp.exe in IIS 6/Windows 2003) Table of Contents
Microsoft Content Management and Server 2002: A Complete Guide CMS Web application Publishing API objects ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
CMS content server and the Content Repository database A diagram the logical architecture of CMS page processing is shown in Figure 19-1. Publisher:showing Addison Wesley Pub Date: October 31, 2003
Figure 19-1. Logical architecture of CMS page processing
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? NOTE: For a detailed discussion of CMS page processing in different modes, refer to Chapter 11. 22: How do you best deploy CMS according to your organization's needs, size, Chapter and resources? Chapter 32: How do you publish dynamic data?
a CMS passes through multiple layers on the server side, it is authenticated and [AsTeam LiBrequest ] authorized. Authentication and authorization of a CMS request consists of multiple steps and involves several technologies; it makes use of IIS and ASP.NET security mechanisms. The logical sequence of steps involved in CMS authentication and authorization is shown in Figure 19-2.
Figure 19-2. IIS and ASP.NET security mechanisms used in CMS authentication and authorization
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? A browser has a role to play as well. Within the CMS Web application, the authentication state information is 10: stored indo a CMS authentication cookie;Content if cookies are disabled or not(CMS) supported Chapter How you develop for Microsoft Management Server 2002 in the browser, the CMS application using Visual Studio .NET? may not function properly.
We will look into starting with reviewing Chapter 17:each Howlayer, do you establish user rights? IIS security because the CMS application may rely on IIS for initial authentication of the user. We will then concentrate on the ASP.NET Chapter 22: How do you best deploy CMS according to your settings for authentication, impersonation, and authorization, and organization's how their use needs, affects size, the and resources? CMS Web application. Then, we will focus on CMS user authentication and authorization, and discuss the configuration required for Windows authentication and forms-based authentication 32:application. How do you publish dynamic data? in theChapter CMS Web
[ Team LiB ]
Authentication and Authorization Authentication is the process of discovering and verifying the identity of a user—that the user actually is who they claim to be. An authenticated user is typically assigned a token that contains the user's current identity. Authentication only indicates that the user's identity has been verified and does not provide any resource access. Authorization is the process of determining a user's ability to access specific resources; an authorized user has permissions to a resource. When a user requests access to this resource, the identity of the user is checked against a list of allowed users. Authorization cannot take place without the identity of the user and must follow authentication. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ,]Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood By Bill English
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
IIS Security Any Web server must be secured against unauthorized access; authentication is a requirement of any Web application. The IIS security mechanisms interact with ASP.NET security; Figure 191 shows how the CMS page request is typically processed through the IIS security checks and passed on to the worker process that provides the ASP.NET runtime environment. Security in IIS is set up using the Directory Security tab (in IIS Manager, right-click the Web site and select the Properties > Directory Security tab), as shown in Figure 19-3. Before authenticating a user, IIS performs authorization checks on the client machine's domain name or IP address; these can be configured using the IP Address and Domain Name Restrictions • Table of Contents dialog, shown inManagement Figure 19-4 (the 2002: dialogA is displayed when you click the Edit button in the IP Microsoft Content Server Complete Guide address and domain name restrictions area in the Directory Security tab). ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 19-3. IIS Directory Security tab Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
Figure 19-4. IIS .NET? IP Address and Domain Name Restrictions dialog using Visual Studio Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
After the client machine has been authorized, IIS attempts to authenticate the user. Every request is authenticated; every request operates in the security context of a user account. Publisher: Addison Wesley There are a number of configurable mechanisms for authenticating users in IIS. When IIS Pub Date: October 31, 2003 authenticates a user, it creates a worker thread using the user's credentials and then uses that 0-321-19444-6 thread ISBN: to perform the requests. In this way, IIS relies on Windows to provide authorization and Pages: 1136 IIS is a Windows service and runs in the context of the local system account. enforce security. IIS uses impersonation to control security: When a user makes a request to the server, access to resources is performed as the user and not the trusted local system account; while the actual InetInfo process runs as System, the worker thread runs in the context of the user. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Impersonation
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Impersonation is thean ability of a thread to execute in a security context that ismissing . . . until Web sites. However, authoritative source of product information has been different from the context of the process that owns the thread; it is a term for the now. adoption of a different security identity. Impersonation is especially useful within server applications to ensure that that 2002: user making the request has sufficient Microsoft Content Management Server A Complete Guide is the first book that explains permissions to complete the processing. The application impersonates that alike user and how to effectively unlock the power of CMS. Administrators and developers will learn how attempts perform action; Windowsflexibility, security will allow orby deny theCMS access to enhancetotheir Webthe servers' scalability, andeither extensibility using features and to ato requested resource. API manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit use theseveral workflow. Topic coverage includes CMS administration and security, IIS 5content and IISand 6 support methods of authentication: the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Anonymous access Web site development. Inside you'll find answers to such questions implemented in real-world as: Basic authentication
Digest authentication Chapter 6: How do you customize workflow? Integrated Chapter 10:Windows How do authentication you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Certificate authentication Chapter 17: How do you establish user rights? The Authentication Methods dialog, shown in Figure 19-5, provides the ability to configure the first four methods in the (the dialog is displayed when to you clickorganization's the Edit button in the Chapter 22: How dolist you best deploy CMS according your needs, size, authentication control area in the Directory Security tab). and resources? Chapter 32: How do19-5. you publish data? Figure IIS dynamic Authentication
Methods dialog
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
NOTE: IIS 6 provides two additional methods: Advanced digest Content Management Server (CMS) is fastauthentication becoming a vital content-management tool that authentication, and Universal Naming Convention (UNC) authentication. To enable helps administrators and developers handle the ever-increasing amount of content on their need to configure metabase properties: Web these sites. methods, However, you an authoritative sourcethe of appropriate product information has been missing . . . until now. UseDigestSSP, and UNCUserName and UNCPassword, respectively. For details, refer to the IIS 6 product documentation. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Anonymous Access
This thorough reference explains the product architecture, then shows you how to create and Anonymous theworkflow. default method of authentication IIS. It is used to provide access edit content access and useisthe Topic coverage includesfor CMS administration and security, to the resourceAPI, for any user andoptions, does not require a user toand supply a userdevelopment. name or password. In the Publishing deployment site configuration, template A order to example process aisrequest, IIS must the use book an identity for authorization; by CMS default, IIS are running used throughout to illustrate how important features impersonates in a local account, IUSR_<machinename>, toyou'll process You implemented real-world Web site development. Inside findanonymous answers to requests. such questions can manually change this account by clicking the Edit button in the anonymous access area of as: the Authentication Methods dialog (Figure 19-4) and supplying the credentials for a new account. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
Basic Authentication using Visual Studio .NET?
17: How establish rights? Being a standard mechanism means that Basic Chapter authentication is do partyou of the HTTP user specification. it has the widest support among Web browsers and Web servers. With Basic authentication, the Chapter 22:aHow you best deploy CMStoaccording to your organization's needs, size, browser displays logindodialog to allow a user enter a user name and password, which are and resources? then passed to the Web server via the HTTP headers. The information that the user enters is base-64 encoded before it is sent over the network. This encoding scheme can be easily Chapter 32: How domethod you publish dynamic data? decoded; therefore, this of authentication should never be considered secure unless
[protected Team LiBby ] an appropriate encryption such as Secure Sockets Layer (SSL). On the server, the user credentials are authenticated against the Windows security accounts on one of the domains or servers on your network, the user is logged on locally on the Web server, and then IIS impersonates the request to access resources.
Basic authentication works with nearly all browsers and is not affected by proxies or gateways.
Digest Authentication Digest authentication is a challenge-response mechanism that sends a password digest, or hash, over the network. The password never crosses the network. The browser encrypts the digest using a password entered by a user and passes it to the server; the server compares the encrypted digest with the one generated from the stored password; if they are the same, then the user is authenticated. Digest authentication is more secure than Basic, but the use of SSL is • Table of Contents still recommended. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Digest authentication only works with IE5 and later; it is unaffected by proxies or gateways. IIS 6 introduced a stronger version of digest authentication called Advanced digest Publisher: Addison authentication. TheWesley difference between the versions is that with Advanced digest authentication Date: October 31,are 2003 the Pub user credentials stored on the domain controller as a hash, and therefore they cannot 0-321-19444-6 be readISBN: by anybody with access to the domain controller, even the domain administrator. However, the authentication algorithm used between IIS and the client remains the same. Pages: 1136
Integrated Windows Authentication "This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you before." Integratedto Windows authentication is a missed challenge-response mechanism that uses either —Gary Bushey, SharePoint Server MVP Kerberos v5 or NTLM (NT LAN Manager) authentication. A negotiation process between a client and a server is used to determine which one will be used. If the server is in a nondomain Content Management Server (CMS) is fast becoming a vital content-management tool that environment, then NTLM authentication will be used; if the server is in an Active Directory helps administrators and developers handle the ever-increasing amount of content on their domain where a Key Distribution Center (KDC) is available, then Kerberos may be used as an Web sites. However, an authoritative source of product information has been missing . . . until authentication mechanism. The browser will attempt to automatically use the credentials of the now. currently logged-on user to connect to the Web server; usually, no logon dialog is presented to the user. Both Kerberos and NTLM use strong hashing algorithms, and therefore the Integrated Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Windows authentication mechanism provides the strongest form of security we've discussed so how to effectively unlock the power of CMS. Administrators and developers alike will learn how far. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Integrated Windows authentication requires that clients run IE5 or later in the Windows environment. This mechanism does not work over proxy servers or firewalls; therefore, it This thorough reference explains the product architecture, then shows you how to create and performs best in an intranet environment. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented real-world Web site development. Inside you'll find answers to such questions CertificateinAuthentication as:
The Certificate authentication mechanism provides the ability to authenticate the user if a recognized certificate is present in the HTTP request. Using the Secure Communications dialog, Chapter 6: How do you customize workflow? shown in Figure 19-6, you can configure IIS to require or accept client certificates. By default, they are ignored. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Figure 19-6. IIS Secure Communications dialog Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
To enable Certificate authentication, you have to install the server certificate and enable SSL as well as establish the certificate trust list (CTL) that will list the certification authorities (CAs) whose certificates your site will trust. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP NOTE: To use client certificates, user browsers need to have certificates installed and Content Management Server (CMS) is fastasbecoming a vital content-management tool that be configured to present certificates part of the request. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Each client certificate will be checked against the CTL as a first step for authentication. For Microsoft Management 2002: Complete is the first Digest, book that explains users withContent accepted certificates,Server you can thenArequire thatGuide they use Basic, or Integrated how to effectively unlock or theyou power CMS. andinto developers learn how Windows authentication, can of map theAdministrators client certificates Windowsalike userwill accounts. You to their Web servers' scalability, flexibility, and extensibility by using CMS features and canenhance map one certificate or multiple certificates to one Windows account. API to manage content on the Microsoft platform. If you choose to require certificates, then users without certificates will be denied access. For This referencethe explains the product thenthe shows howcertificates to create and usersthorough with certificates, certificates will be architecture, validated against CTL.you If the are edit and users use the coverage includes CMS administration and security, valid,content either the areworkflow. asked to Topic identify themselves using Basic, Digest, or Windows the Publishing API, deployment options, site configuration, templateaccounts. development. A Integrated authentication, or their certificates are mapped and to Windows running example is used throughout the book to illustrate how important CMS features are implemented Web site development. Inside you'll find answers to such questions If you choose in toreal-world accept certificates, users with certificates will be authenticated as just as: described; users without certificates will be required to authenticate using Basic, Digest, or Windows Integrated authentication. Chapter 6: How do you customize workflow? Certificate authentication is the most secure authentication mechanism; it is particularly well suited for business-to-business (B2B) communication over the Internet. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
[ Team LiB ] Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
ASP.NET Security After IIS has authenticated the user, it passes the request and the user identity to the appropriate worker process. The worker process uses this identity to check the NTFS permissions on the ASPX template files. If the ACLs on template files do not grant at least read access to the user, access is denied. We will now examine under what identity the request may be processed.
•
Table of Contents
NOTE: To configure the security settings in the ASP.NET environment, machine.config is used for machine-wide settings, and web.config is used for ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood application-specific settings Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Pub Date: October 31, 2003
ASP.NET Impersonation ISBN: 0-321-19444-6 Pages: 1136
By default, ASP.NET runs under a special account identity. This account has a limited number of privileges. In IIS 5, this account is called ASPNET. By default, the worker process will access all resources using this account identity regardless of what identity has been passed by IIS, unlike classic ASP, which uses the identity passed by IIS. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP NOTE: The default permissions for the ASPNET account are explained in detail in Content Management Server (CMS) is fast becoming a vital content-management tool that Knowledge Base article 317012. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. In certain scenarios, the default account permissions are not sufficient, and we need to Microsoft Content Management Server 2002: A Complete Guide is the first book that explains configure the worker process to use a different identity for processing requests. This is called how to effectively unlock the power of CMS. Administrators and developers alike will learn how ASP.NET impersonation, and the new identity can be set up in several ways: to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. On a machine-wide basis for all Web applications (in IIS 5 and in IIS 6 running in IIS 5 This thorough reference explains the product architecture, then shows you how to create and isolation mode) edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment site configuration, and template A For an application pool (in options, IIS 6 running in worker process isolation development. mode) running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions For a particular Web application as: Using the credentials of a user who has made a request ChapterASP.NET 6: How do you customize To configure impersonation on workflow? a machine-wide basis for IIS 5, you need to edit the <processModel> section of the machine. config file. This section contains user name and Chapter 10: for How doaccount you develop for Microsoft Management Server (CMS) 2002 password entries the credentials used byContent ASP.NET—for example: using Visual Studio .NET? Chapter 17: How do you establish user rights? <processModel...username="MACHINE" password="AutoGenerate".../> Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The default for "username" is MACHINE, which causes ASP.NET to assume the ASPNET account identity; the default for "password" is AutoGenerate, which causes ASP.NET to use a Chapter 32: How do you publish dynamic data? cryptographically strong random password stored in the Local Security Authority (LSA) for that
The [account. Team LiB ] account can be changed to either a named user account or SYSTEM. SYSTEM causes ASP.NET to use the local system account. Although in certain situations you may need to use the SYSTEM account, bear in mind that it has almost unlimited privileges. If you want to change an ASP.NET runtime identity to a user account, change the user name and password in the <processModel> section, as follows:
<processModel...username="domain\user" password="password".../>
In this scenario, the user name must be qualified with the domain name for the domain account, or the local server name for the local account. The disadvantage is that the user name and password are stored in machine.config in clear-text format. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NOTE: The Aspnet_setreg.exe utility, available from microsoft.com, provides the ability to encrypt these attributes and store their values in the registry under a secure key. For detailed instructions, refer to Knowledge Base article Q329290.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
CMS and Domain Controllers In general, it is not advisable to run your CMS server on a domain controller, "This is one of those rare books that you will read to learn about the product and keep because a compromise of the server is a compromise of the domain. However, if you rereading to find those tidbits that you missed before." need to use the Windows 2000 domain controller, you will have to change the default —Gary Bushey, SharePoint Server MVP ASP.NET process identity because there is a known problem with using the ASPNET identity Management on Windows 2000 domain ASPNET is configured as a local Content Server (CMS)controllers. is fast becoming a vital content-management tool that account; it is a member of a built-in Users local group. However, on a domain helps administrators and developers handle the ever-increasing amount of content on their controller, all user accounts are domain accounts and are not local machine Web sites. However, an authoritative source of product information has been missing . . . until accounts. As a result, on domain controllers, ASP.NET fails to start because it cannot now. find a local account named \ASPNET. The solution is either to create a new account with the same as ASPNET, which is first recommended, Microsoft Content Management Serverpermissions 2002: A Complete Guide is the book that explains or to use a local system account. In any case, you need to change the how to effectively unlock the power of CMS. Administrators and developers alike will learn how <processModel> section of thescalability, machine.config file accordingly. Full information about to enhance their Web servers' flexibility, and extensibility by using CMS features and thisto bug is provided in Microsoft Knowledge Base article 315158. API manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content use process the workflow. coverage includes administration and security, In IIS 6, the and worker identityTopic in IIS 5 isolation mode CMS is configured using the the Publishing element API, deployment siteway configuration, processModel in exactlyoptions, the same as in IIS 5. and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world site development. Insideprocess you'll find answers to such questions However, in worker processWeb isolation mode, the worker identity is configured in a as: different way, using the application pool properties. By default, in IIS 6 a worker process runs as a Network Service. To change the worker process identity, right-click the application pool you would like to configure, select Properties, and click the Identity tab. Then, you can select 6: How do you customize workflow? eitherChapter Predefined or Configurable options. The Predefined option allows you to select Network Service or Local Service, or Local System identities. The Configurable option allows you to Chapter 10:the How do youname develop Microsoft Content Management Server (CMS) 2002 to explicitly specify account andfor password under which you want your worker process using Visual Studio .NET? run. How do you establishfor user If youChapter wish to 17: configure impersonation therights? CMS Web application, you need to edit the element in the web.config file. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? NOTE: The web.config file for the CMS Web application is created by Visual Studio
.NET you create a CMS project in VS.NET; it is located at the root of your CMS [ Team LiBwhen ] Web application.
There are three settings for the element that you can use. : This is the default setting. It turns off impersonation and causes the worker process to use the default identity. : This setting causes the worker process to adopt the identity of the user making a request within the CMS Web application. This is the identity that is passed on by IIS. If IIS uses Anonymous authentication, then this identity will be IUSR_<machinename>; if IIS uses any other authentication mechanism, it will be an authenticated • Table of Windows Contents user identity. All processing for the request will be performed under this Management identity. Server 2002: A Complete Guide Microsoft Content ByBill English , Olga Londer , Shawn Shell, Todd Bleeker , Stephen Cawood : This setting provides the ability to specify the account to be used by ASP.NET within the CMS Web application. Once again, the user name must be qualified with the domain name for Publisher: Addison Wesley the domain account, or the local server name for the local account; and the password is Pub Date: October 31, 2003 in clear-text format. stored in web.config ISBN: 0-321-19444-6 Pages: 1136
NOTE: As before, you can encrypt the "username" and "password" attributes and store their values in the registry under a secure key using the Aspnet_setreg.exe utility, available from microsoft.com. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that ASP.NET Authentication helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until ASP.NET provides its own authentication systems that we can use within the CMS Web now. application; these systems are called ASP.NET authentication providers. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ASP.NET authentication providers are implemented as HTTP modules that are defined within how to effectively unlock the power of CMS. Administrators and developers alike will learn how the HTTP pipeline in machine.config. These modules contain the code necessary to authenticate to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and user credentials; they are identified in the section of the machine.config file, as API to manage content on the Microsoft platform. follows: This thorough reference explains the product architecture, then shows you how to create and [View full width] edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A ... running example is used throughout the book to illustrate how important CMS features are as: ... Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? The use of authentication providers within ASP.NET allows us, for example, to implement Chapteraccess 22: How do you CMS according to your organization's needs, anonymous for IIS and best passdeploy all requests from IIS through to the application for size, and resources? authentication. This approach is particularly well suited for public access Internet sites. Chapter 32: How do you publish dynamic ASP.NET authentication will always occur in thedata? HTTP runtime, after IIS authentication. ASP.NET authentication is configured using the element within the web.config
There [file. Team LiBare ] four possibilities. None: This mode specifies that ASP.NET doesn't perform any authentication, but provides the ability for the ASP.NET runtime to accept every request that is passed on from IIS. This mode is specified using the element in web.config. Windows authentication: This mode is designed to be used in conjunction with IIS authentication; it validates users against Windows security accounts. It is the default authentication mode; for CMS projects, it is configured when VS.NET creates a web.config file for the project. Windows authentication is useful when you want to use impersonation; it retains the user account identity passed on from IIS. You can use it with the Basic, Digest, and Integrated Windows authentication methods in IIS. If IIS is configured for anonymous access, this mode will verify that the IUSR_<machinename> account is valid. •
This mode Tableisofspecified Contents using the element in
web.config. Microsoft Content Management Server 2002: A Complete Guide
ByBill English Londer,in Shawn Shell, Toddsection, Bleeker, Stephen As we,Olga discussed the previous in orderCawood to provide
impersonation, you need to use the element in web.config. If you enable impersonation, then resources accessed by your application—such as files, folders, Publisher: Addison Wesley registry keys, and Active Directory objects—are accessed with the user identity. If you Pub Date:enable October impersonation, 31, 2003 don't which is disabled by default, then your application uses the ISBN: 0-321-19444-6 default worker process identity to access resources. However, the user identity is used in both or without impersonation—to access the ASPX files and other ASP.NET Pages:cases—with 1136 files; the difference is in accessing resources programmatically from the code at runtime.
Forms authentication: This method uses HTML forms, client-side redirection, and authentication tickets stored in cookies. If IIS is configured for anonymous access, all "This is one of those rare books that you will read to learn about the product and keep authentication is handled by ASP.NET. Forms authentication relies on a WebForm interface rereading to find those tidbits that you missed before." and therefore is not dependent on any specific client-side features or functionality; all —Gary Bushey, SharePoint Server MVP modern browsers support the HTML tag. This is how it works: Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their 1. The user requests a page. Web sites. However, an authoritative source of product information has been missing . . . until now. 2. Since the user does not have a valid authentication ticket, access to the resource is
denied. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to 3. effectively unlock power of Administrators andin developers alike will learn how The request is the redirected to CMS. a login page, as defined web.config. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft 4. The user enters credentials in platform. the login page, and they are sent to the server. This thorough architecture, then shows you how to security create and 5. Thereference login pageexplains verifies the the product credentials. You can verify against Windows edit content and use or theyou workflow. Topic coverage administration and security, accounts, can verify against your includes own list CMS of users and their credentials. This the Publishing options, site configuration, andantemplate development. A a text can API, be indeployment any form—for example, a SQL database, XML document, or even running example file. is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: 6. The user is given an ASP.NET Forms authentication cookie, which identifies the user as authenticated. Subsequent requests from the browser automatically include the cookie. If the cookie is passed from the browser, ASP.NET accepts the request as Chapter 6: How do you customize workflow? authenticated; if there is no cookie in the request, or it has expired or is otherwise invalid, then the user is redirected to the logon page. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visualauthentication Studio .NET? mode is specified by setting the element to The Forms
Forms mode in web.config—for example: Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, Chapter 32: How do you publish dynamic data?
[ Team LiB ] The element in our example defines the name and location of the login page; the name of the form that will become the name of the authentication cookie; the cookie lifetime in minutes; the path of the cookie to be set on the client; and the level of cookie protection set to "All," which instructs ASP.NET to both encrypt and validate authentication cookies.
To make sure the user credentials are not intercepted, you are strongly advised to protect the login page with SSL. In this case, all data transmitted between the browser and the server will be encrypted, including the user credentials. Passport: This mode performs authentication using the Microsoft Passport service. Microsoft Passport allows Internet users to establish a single centralized storage for a set of credentials that can be used on any Passport-compliant Web site. Passport authentication uses a ticketing scheme: Once the user logs on to any Passport-compliant • Table of Contents site, the central Passport service provides a ticket in an in-memory cookie. The Passport Microsoft Content Management Server 2002: A Complete Guide authentication provider within ASP.NET checks whether a ticket is present in the request; if it's not present or is invalid, then the user is redirected to the Passport login. Passport ByBill English , Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood verifies the user credentials, issues a ticket, and redirects the user back to the originally requested page. Publisher: Addison Wesley
ThePub authentication mode Date: October 31, 2003 is an application-wide setting that can only be set in the application root web.config file. You cannot use forms-based authentication in one part of your application ISBN: 0-321-19444-6 and Windows authentication in another. Pages: 1136
ASP.NET Authorization "This is one of those rare books that you will read to learn about the product and keep Authentication mechanisms allow to missed verify the user's identity; but to determine what they rereading to find those tidbits thatus you before." can do, Bushey, we needSharePoint authorization. Authorization is set up in web.config using the —Gary Server MVP element. This element defines the list of users and groups that are permitted or denied access Content Management Server (CMS) is fast becoming a vital content-management tool that to the CMS Web application. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: When referring to groups, in the ASP.NET environment the term "roles" is Microsoft Management 2002: A Complete the first explains used.Content When using WindowsServer authentication, roles andGuide groupsismean thebook samethat thing; how to effectively unlock authentication the power of CMS. Administrators and developers alike will learn how however, for Forms the meaning is different. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create The authorization settings are contained within the element; they consistand of edit content use the workflow. includes CMS administration security,for andand <deny> elements thatTopic allowcoverage and prohibit access. There are specialand characters the Publishing API,and deployment site configuration, and template development. A anonymous users all users;options, for example <deny users="?"/> denies anonymous users; running example is used throughout to illustrate how important CMSevaluated features are allows all users. the Thebook and <deny> elements are in implemented in real-world Web Inside you'll find answers to such questions sequence; those that match thesite userdevelopment. identity are applied. as: The authorization entries in web.config differ depending on the authentication provider you use, as follows: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft (CMS) the 2002 Authorization for Windows authentication: The Content user andManagement group namesServer must match using Visual Studioin.NET? security accounts the Windows account database; for domain accounts, the user and group names must be prefixed with the domain name. Let's look at the following Chapter example:17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and<deny resources? users="?"/> <deny users="CMS/UserNotAllowed"/> Chapter 32:roles="CMS/administrators"/> How do you publish dynamic data? [ Team LiB ]
In this example, anonymous access is blocked, as well as the access for a user named UserNotAllowed from the CMS domain. Access for the administrators group from the CMS domain is allowed, and, finally, all other users are denied access. The sequence is important: If UserNotAllowed was a member of the administrators group, the user would be denied access because the directive for UserNotAllowed occurs first. Authorization for Forms authentication: With Forms authentication, there is no concept of a domain; user names are just the names we pass on from the login page. ASP.NET checks the authorization section in web.config before it redirects the request from the login page to determine their permissions. •
Table of Contents
As Content far as groups are concerned, want Guide to use Microsoft Management Server 2002:ifAyou Complete
them you may need to add some code to the AuthenticateRequest event in global.asax. This event is raised when the ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood authentication provider attempts to authenticate a user, even if authentication fails. Your code needs to establish group membership at runtime. The names of the groups you create in the code must match the roles defined in web.config. For example, in your code Publisher: Addison Wesley you may read the group names from the database. Pub Date: October 31, 2003 ISBN:look 0-321-19444-6 Let's at an example of an element for Forms authentication: Pages: 1136
<deny users="?"/> do you best deploy CMS according to your organization's needs, size, /secure/LoginPage.aspx" name="MyFormsCookie" path="/" protection="All" timeout="30"/>
•
b. Authorization: Configure ASP.NET to allow access. Make sure that the following element is added to the web.config authorization section: Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
3. NTFS permissions: ISBN: 0-321-19444-6 Pages: 1136
a. Verify the NTFS permissions on the ASPX template files to make sure that the worker process identity account has at least read permissions on the templates. permissions forthat AD you users onread the to static site files the thatproduct are notand stored in the "This isb. oneSet of up those rare books will learn about keep resource galleries—for cascading rereading to find those tidbits thatexample, you missed before."style sheets and JavaScript files. That's why we enabled Integrated —Gary Bushey, SharePoint Server MVPWindows authentication on IIS in step 1, so that the NTFS permissions are used for authorization of access to these files. Content Management Server (CMS) is fast becoming a vital content-management tool that 4. CMS guest account: Using the SCA, enable guest access and specify gueston account. helps administrators and developers handle the ever-increasing amount ofthe content their This account willan beauthoritative used for browsing general information areas of your site available to .all Web sites. However, sourcethe of product has been missing . .users. until now. 5. CMS system account permissions: These settings are the same as before. Verify that the CMSContent system Management account has permissions to Aview the tree in the tothat which the site Microsoft Server 2002: Complete Guide is AD thedomains first book explains users belong. If the intranet site is companywide, the CMS system account needs to how to effectively unlock the power of CMS. Administrators and developers alike will learn have how enumeration rights on all scalability, AD domains that maintain user accounts. to enhance their Web servers' flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. 6. CMS user rights: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, a. Create rights groups: Using Site Manager, CMSdevelopment. rights groupsAwithin the Publishing API,CMS deployment options, site the configuration, andcreate template CMS roles; add Active Directory user and group accounts to these groups. running example is used throughout the book to illustrate how important CMSrights features are As before, it is advisable to create AD security groups for CMS-specific roles and add implemented in real-world Web site development. Inside you'll find answers to such questions user accounts to these groups; then add the AD group to the CMS rights group. This as: approach allows you to maintain the membership of CMS rights groups within the Active Directory, by adding or deleting user accounts to or from the AD security groups. However, forms-based authentication, you don't have to create a Chapter 6: How do you with customize workflow? companywide group for all site users; you can use the CMS guest account instead. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 may need.NET? to set up different groups for production, authoring, and development using You Visual Studio sites. Chapter 17: How do you establish user rights? For production servers, set up a subscribers group and add a CMS guest account to Chapter HowDepending do you best CMS according to your needs, size, this22: group. ondeploy the business requirements fororganization's the site, set up another and resources? subscribers group for protected areas of your site. Chapter How authoring do you publish dynamic data? For 32: content servers, you need to set up the publishing workflow for the site. Depending on your environment, you will need one or more authors, editors,
resource managers, and channel managers groups. Make sure you set [ Team LiBmoderators, ] up a subscribers group with a CMS guest account for site testing. For a development environment, you need at least one template designers group and a subscribers group containing a CMS guest account for testing. b. Assign rights groups to the site containers: After you've created the CMS rights groups, you need to assign them to containers, such as channels, template galleries, and resource galleries. Assign the subscribers group with the CMS guest account to all containers; assign other groups to containers as appropriate. On a CMS site that is configured following these steps, processing of a page request includes the following authentication and authorization sequence:
•
Table of Contents
IIS receives the page request. Since anonymous access is enabled, IIS passes the IUSR_<machinename> identity to the worker process. The ASP.NET authentication mode ByBill English Olga Londer , Shawn Shell,is Todd , Stephen Cawood the identity passed from IIS is not in the ,CMS Web application setBleeker to Forms; therefore, used for authentication. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley ASP.NET checks to
see whether a valid Forms authentication cookie is attached to the to pass the worker process default account identity (ASPNET) to the CMS Authorization module. The CMS Authorization module checks whether guest ISBN: 0-321-19444-6 access is enabled and attempts authorization of the CMS guest account. If the requested Pages: 1136 page is available to all users, the request will be authorized and the page returned to the user, with a CMS authentication cookie attached to the response.
request. If not, tries Pub Date: October 31, it 2003
If there is a valid Forms authentication cookie, the request is passed to the CMS "This Authorization is one of thoseModule, rare books that you will read a tovalid learnCMS about the product and keep which checks whether authentication cookie is attached rereading torequest. find those tidbits that you before." to the If both cookies aremissed valid, the CMS Authorization module checks the user —Gary Bushey, Server MVP access is granted to the resource. Otherwise, an rights, andSharePoint if the user is authorized, access denied error is returned to the application. Content Management Server (CMS) is fast becoming a vital content-management tool that helps Ifadministrators and developers handle the ever-increasing of content on their either of the cookies is not found or is invalid, the user isamount redirected to the login page Web sites. authoritative of product information has been missing . . . until using However, an HTTPS an URL, where the source user enters the required credentials. now. The login page verifies the credentials against the AD domains and the CMS server, and if Microsoft Management Server 2002: A Complete Guide is Forms the first book that explains theyContent are authenticated, it attaches two cookies: an ASP.NET authentication cookie how to effectively unlock the power of CMS. Administrators and alikeerror will learn how and a CMS authentication cookie. If authentication fails, andevelopers access denied is to enhance their servers' scalability, flexibility, and extensibility by usually using CMS features and returned to Web the login page, which displays a message to the user, within the login API topage manage content on the Microsoft platform. itself—for example, "Invalid user name/password. Please re-enter your credentials." This thorough [ Team LiB ] reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Internet Sites
A CMS Internet site is an external site that is available to any user for browsing. In this environment, we ne to cater to various browsers; a common browser standard cannot be guaranteed.
Depending on whether all areas of the site are open to all users, we can distinguish between two types of s
Full public access sites: In a full public access site, all users have the same level of access; there is no need for users to log on. •
Table of Contents Public access sites with private areas: In this scenario, not all areas of the site are available to all user there are areas that require a user to log on, for example, to view premier content.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Authentication and authorization mechanisms for these types of sites are significantly different. For a public access CMS site, only one user account for guest access and one CMS rights group are required. If the site Publisher: Addison private areas, userWesley authentication and authorization requires careful planning; in most cases, external authentication is used. Let's have a look at the settings for both scenarios. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Full Public Access Sites
With publicly available CMS Internet sites, any user can see the full site. No authentication is necessary; the "This is one of those rare books that you will read to learn about the product and keep is no logon/logoff link. rereading to find those tidbits that you missed before." Configuring security in this scenario involves several layers. —Gary Bushey, SharePoint Server MVP
Content Management Server (CMS) is fast becoming a vital content-management tool that 1. IIS authentication: IIS for anonymous access; disable allof other authentication mechanisms. helps administrators and Configure developers handle the ever-increasing amount content on their Web sites. However, an authoritative source of product information has been missing . . . until 2. ASP.NET security: Use the default settings for authentication, authorization, and impersonation, as now. created by VS.NET in the web.config file at the root of the CMS Web application. No additional configuration is required. Server 2002: A Complete Guide is the first book that explains Microsoft Content Management how to effectively unlock the power of CMS. Administrators and developers alike will learn how The default setting in web.config for flexibility, authentication is as follows:by using CMS features and to enhance their Web servers' scalability, and extensibility API to manage content on the Microsoft platform.
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A The default settings for authorization and impersonation are usually inherited from machine.conf running example is used throughout the book to illustrate how important CMS features are These settings are as follows: implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Chapter 17: How do you establish user rights? 3. NTFS permissions: The template files and static site files must have at least read permissions set up f the IIS impersonation account IUSR_<machinename>; otherorganization's resources that are accessed from the Chapter 22: How do you best deploy CMS according to your needs, size, template code must have read permissions for the default worker process account, such as the local and resources? ASPNET account in IIS 5. Chapter 32: How do you publish dynamic data? To provide this configuration, no additional setup is usually required, since the default file access contr
4.
lists include read permissions for the Everyone group by default. [ Team LiB(ACLs) ]
4. CMS guest accounts: Using the SCA, enable guest access to CMS and specify the guest account. It ma a domain account or a local account. If you use a local account, define it as localcomputer\.
If your CMS site is deployed in a Web farm (Figure 20-2) and you want to avoid using a domain accou as a CMS guest account, make sure that each machine has local accounts with identical names set up the CMS guest accounts. For example, you can create the local account MCMSguest on all computers the farm.
5. CMS user rights: Create a CMS rights group within a subscribers role and add a CMS guest account to group; then assign this group to all containers, such as channels, template galleries, and resource galleries.
entry points: Using the SCA, configure the CMS Web entry point for production servers to b • 6. CMS Web Table of Contents read-only. Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: Only the authoring/staging server connected to the internal network should have a Web as read/write. It will be used to import content into the CMS database.
entry point configured Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
7. CMS authentication cookie encryption keys: If CMS is deployed in a Web farm, all CMS servers should Pages: 1136 able to recognize each other's CMS authentication cookies. You need to use the Managekey utility to synchronize the cookie encryption keys between the servers. Refer to Chapter 19 for an explanation o Managekey utility.
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP NOTE: Since there is no authentication and no requirement to authorize requests, you may consider removing the CMS Authorization module for the HTTP pipeline in web.config to provide additional Content Management Server performance for the site.(CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. On a CMS site that is configured following these steps, processing of a page request includes the following Microsoft Content 2002: A Complete Guide is the first book that explains authentication andManagement authorizationServer sequence: how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. IIS receives the page request. Since anonymous access is enabled, IIS passes the IUSR_<machinenam identity to the worker process. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, The CMS API, Web deployment application is configured to use ASP.NET Windows authentication; the the Publishing options, site configuration, and template development.therefore, A IUSR_<machinename> user credentials IIS arehow usedimportant for template authorization. ACLs on the running example is used throughout the book from to illustrate CMSfile features are templateinfiles include Web the Everyone group; therefore, file access is authorized. file authorization, implemented real-world site development. Inside you'll find answers to such After questions as: IUSR_<machinename> user credentials for an anonymous request are passed to the CMS Authorizati module.
The CMS6: Authorization gets the anonymous request credentials and checks with the CMS cont Chapter How do you module customize workflow? server whether guest access is enabled. Because guest access is enabled, the server authenticates the Chapter Howand do defines you develop for Microsoft Content Management (CMS)account. 2002 Because th user as a10: guest the CMS rights group membership for theServer CMS guest using Visualaccount Studio .NET? CMS guest belongs to the subscribers group that is assigned to all site containers, the request a page in presentation mode is authorized. Then, a CMS authentication cookie with the guest user ID Chapter How do you establish user rights? attached17: to the HTTP response. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Public Sites Using an External Authentication Source
Chapter 32: How do you publish dynamic data? A public site with an external authentication source is an Internet public site with private areas that uses an
system for authenticating users. There are sections of the site that are available to any Internet us [external Team LiB ] as well as premier content sections that are available only to registered users. Registered users are able to browse the public parts of the site, but to access premium content, they need to provide their credentials; therefore, the logon/logoff link is required. The authentication mechanism best suited for this scenario is ASP.NET forms-based authentication. However, it is unlikely that registered users will have Windows user accounts on your system.
Since any Internet user may register on the site, you don't want to maintain millions of user accounts in yo Active Directory domain, but you still need to validate the submitted credentials. The solution is to use an external authentication source. For example, you may maintain user account credentials such as user name and password in the SQL database; or you may maintain user account credentials using your company's customer relationship management (CRM) system; or you may decide to use Microsoft Passport or any oth external source that is required by your business needs and is deemed appropriate by your company secur policy. The external authentication source may also be used for user profiling.
As we know,Table CMSofrequires • Contentsa Windows user account for authentication and authorization of any request; CM user rights can be assignedServer to a Windows accountGuide only, Microsoft Content Management 2002: A Complete
not to an external source account. Therefore, we ne to provide mapping of externally authenticated users to Windows accounts. This mapping will be many-to-o ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood (Figure 20-4)—many external accounts will be mapped to one Windows account that will define the CMS permissions. The mapped Windows account may be a domain account or a local account. The number of Windows accounts required depends on the different types of access you need to provide on your site; each Publisher: Addison Wesley Windows user represents one type of access. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 20-4. Mapping of external accounts to Windows accounts
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
The mapping algorithm depends on your business requirements. For example, you can have a mapping list Howto doActive you customize mapsChapter external6: users Directory workflow? accounts. Because the list actually names the AD accounts, it shoul secured. You will probably host it on your CMS site, not the external authentication site. In any case, you w Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 need to define procedures for maintenance of the mapping list—that is, how you add new mappings, how y using Visual Studio .NET? make sure that changes to Windows accounts are reflected in the mapping list, and so on.
Chapter 17: How do you establish user rights? Another possibility is to use a type instead of a mapping list, as shown in Figure 20-5. In this case, a flag is specified for each type do of access to deploy your site. You then need to map this type flag to a Windows account Chapter 22: How you best CMS according to your organization's needs, size, programmatically. The type flag provides the ability to group the external user accounts together depending and resources? the access these users require to your site. Then, you map any member account of the group to a predefine Windows account your system. Thisdynamic approach is more flexible than using a mapping list. It saves Chapter 32: on How do you publish data? management overhead in maintaining the mapping list and doesn't expose your Windows accounts. The typ
is usually [flag Team LiB ] stored on the external authentication site as a property in the account information. For exam the type flag may be returned to you as an additional user attribute with the validation confirmation from a external source.
Figure 20-5. Mapping of external accounts to Windows accounts using user types
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP In any case, the mapping code will have to be written; it will differ depending on the external authentication source you use. Depending on(CMS) the source, user credentials may vary—for example, an e-mail address a Content Management Server is fast the becoming a vital content-management tool that password; or a user name and password; or a user name, password, and an answer to a specific question; helps administrators and developers handle the ever-increasing amount of content on their just an e-mail address you are not that concerned about security of access, but want collect data for u Web sites. However, anif authoritative source of product information has been missing . .to . until profiling. now.
The good Content news is that the CmsFormsAuthentication.Authenticate method allows us to use both the Microsoft Management Server 2002: A Complete Guide isAsUser the first book that explains user-supplied user name and the mapped Windows account credentials to create a unique CMS authenticat how to effectively unlock the power of CMS. Administrators and developers alike will learn how cookie for this particular user. scalability, The syntax flexibility, is as follows: to enhance their Web servers' and extensibility by using CMS features and API to manage content on the Microsoft platform. [View full width] CmsFormsAuthentication.AuthenticateAsUser( ServerAccountName, This thorough reference explains the product architecture, then shows you ServerAccountPassword, how to create and ClientAccountName, ClientAccountType ) edit content and use the workflow. Topic coverage includes CMS administration and security,
the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are where ServerAccountName and ServerAccountPassword are Windows account credentials, ClientAccountNa implemented in real-world Web site development. Inside you'll find answers to such questions is the user account identifier supplied by the user, and ClientAccountType is the type of user account that w as: assign in the code according to our business logic.
The runtime of the authentication and authorization in this scenario is as follows: Chapterlogic 6: How do CMS you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Visual .NET?For example, a user authenticates himself as the user michael with the 1. using Get the user Studio credentials. passwordpwd123. Chapter 17: How do you establish user rights?
2. Validate the user credentials against the external authentication authority. For example, the external Chapter 22: How do you best deploy CMS according to your organization's needs, size, authentication authority may be your CRM. and resources? 3. Assign a client account type—for example, A. Chapter 32: How do you publish dynamic data? 4. 5.
3. 4. Based [ Team LiB ]on the type, map the external user to a Windows account—for example, CmsAccountA. 5. Retrieve the Windows account password—for example, A-pwd. 6. Authenticate the user to Microsoft Content Management Server, using
[View full width] CmsFormsAuthentication.AuthenticateAsUser( ServerAccountName, ServerAccountPassw ClientAccountName, ClientAccountType )
and then verify that the returned CmsAuthenticationTicket is not null. In our example, ServerAccountName is CmsAccountA; ServerAccountPassword is A-pwd; ClientAccountName is michael; and ClientAccountType is A. •
Table of Contents
To implement this logic, you will need to write code in the login page, usually using event handlers. The eve handler implements procedures for authentication against an external source, as well as mapping an extern By Bill English, Olga Londer , Shawn Shell, Todd account Bleeker, Stephen Cawood the account's password. You will need to write authenticated user type to a Windows and obtaining your own code for the event handler; it will be a general ASP.NET event handler and not CMS-specific. For example, you can write code for an event handler in global.asax—that is, the AuthenticateRequest event Publisher: Wesley handler. YouAddison may consider writing your own authentication HTTP module as well. Microsoft Content Management Server 2002: A Complete Guide
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: For an example of event handler structure, refer to Chapter 3 of the online book Integration Techniques and Strategies for CMS 2002 , available from http://msdn.microsoft.com/library/default.asp?url=/servers/books/cms/integration.asp.
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint MVP To set up security for a CMSServer Internet site using forms-based authentication mapped to a custom external source, consider the following steps. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. 1. Windows mapped accounts: Create one account, either domain or local, for each type of access to you site's premier content. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively the power of CMS. Administrators andof developers alike howA of the site's For example,unlock your business needs require that one group users is able towill seelearn section to enhance their Web servers' scalability, by using CMS features and To provid premier content, and another group flexibility, of users isand ableextensibility to see section B of the premier content. API tothis manage content on the Microsoft platform. functionality, you need to create two Windows user accounts: one for the first type of access (for example, CmsAccountA) and another for the second type of access (for example, CmsAccountB). The This thorough reference explains product architecture, shows you how to create and settings for this example arethe listed in Table 20-1; the then first four columns show mapped accounts by typ edit content access.and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running 2. IISexample security:is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: a. Configure IIS for anonymous access.
b. Make thecustomize server certificate from a globally recognized CA is installed on your server an Chapter 6: sure How that do you workflow? that SSL is enabled on port 443. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 c. Create a virtual directory on your server that will store the login page, and enable SSL for this using Visual Studio .NET? directory—for example, /login. Chapter 17: How do you establish user rights? 3. ASP.NET security: Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? a. Authentication: Chapter 32: How do you publish dynamic data? 1.
a.
[ Team LiB ]1. Create a login page that implements the logic we discussed. In our example, the code in th login page will use an event handler that validates the user against an external source and provides the mapping of all externally authenticated accounts of type A to the Windows acc CmsAccountA, and accounts of type B to the Windows account CmsAccountB. The type flag and the corresponding mapped accounts are shown in Table 20-1.
2. Save the login page in the HTTPS-enabled virtual directory—for example, as /login/LoginPage.aspx.
3. Edit the web.config file to enable ASP.NET to use Forms authentication and to point to the location of the login page. To do this, set the authentication mode to Forms, and specify the login page details in the element, as shown in the following example:
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Publisher: Addison Wesley
b. Authorization: Configure ASP.NET to allow access. Make sure that the following element is added the web.config authorization section:
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." 4. NTFS permissions: —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that a. Verify the NTFS permissions on the ASPX template files to make sure that the worker process helps administrators and developers handle the ever-increasing amount of content on their account has at least read permissions on the template files. Web sites. However, an authoritative source of product information has been missing . . . until now. b. Verify that the IUSR_<machinename> account has read permissions on the static site files that
not stored in the resource galleries. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock the power CMS. Administrators and developers alike will account. learn how 5. to CMS guest account: Using the of SCA, enable guest access and specify the guest It can be a to enhance their Web or servers' flexibility, and using CMS and of your si domain account a localscalability, account. This account willextensibility be used forby browsing the features general areas API toavailable manageto content on the Microsoft platform. all users.
This reference explains the product thenaccounts, shows you how that to create and system accoun 6. thorough CMS system account permissions: If youarchitecture, use AD mapped verify the CMS edit content and use the workflow. Topic coverage includes CMSyou administration and security, has permissions to view the tree in the AD domain where set up the mapped accounts for the site the Publishing API, deployment options, site configuration, and template development. A users. running example is used throughout the book to illustrate how important CMS features are implemented in rights: real-world Web site development. Inside you'll find answers to such questions 7. CMS user as:
a. Create CMS rights groups: Using the Site Manager, create subscribers rights groups for each typ Chapter 6: that How will do you customizetheir workflow? users be supplying credentials to view sections of premium content. Add Windows mapped accounts to these rights groups—one account to one group. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Create Visual Studio another.NET? subscribers group for your anonymous site users and add a CMS guest account t this group. Chapter 17: How do you establish user rights? Continuing with our example, you will need to create two subscribers rights groups in CMS—for Chapter 22: How do you best deploy according to your organization's needs,mapped size, account example, SubscribersTypeA, andCMS SubscribersTypeB; then add the Windows and resources? CmsAccountA to the SubscribersTypeA group, and the second Windows mapped account CmsAccountB to the SubscribersTypeB group. You will also need to create a third subscribers rig Chapter 32: How do you publish dynamic data? group for anonymous site users—for example, SubscribersAnonymous. Table 20-1 shows the
b.
accounts and the associated subscribers groups in columns 4 through 6. [ Team LiBmapped ]
b. Assign the rights groups to the site containers: Assign the subscribers groups you've created to s containers, such as channels, template galleries, and resource galleries, as appropriate for the u type each subscribers group represents. Assign the subscribers group with the CMS guest accoun the channels and other containers that can be viewed by all users.
In our example, you will need to assign the Subscribers TypeA rights group to the channels and other containers that provide information for section A, and assign the Subscribers TypeB group the channels and other containers that provide information for section B. Then, assign the Subscribers Anonymous rights group to the channels and other containers that do not require authentication.Table 20-1 lists the subscribers groups and their rights to containers in columns 6 and 7.
•
Table of Contents
Table 20-1. Mapped Accounts and CMS Rights
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Parts of Site Publisher: Addison Wesley Where Pub Date: October User 31, 2003 Access Is ISBN: 0-321-19444-6 Required Authentication Pages: 1136
1
2
Type Flag
Windows Mapped Account
CMSUser Role
CMS Rights Group
Rights to Containers
3
4
5
6
7
Externally Premier A CMS Subscribers Subscribers Channels in authenticated content, AccountA TypeA section A; "This is one of those rare section books that A you will read to learn about the product and keeptemplate rereading to find those tidbits that you missed before." galleries and —Gary Bushey, SharePoint Server MVP resource galleries Content Management Server (CMS) is fast becoming a vital content-management toolrequired that to helps administrators and developers handle the ever-increasing amount of content onview theircontent Web sites. However, an authoritative source of product information has been missing in . .section . until A now. Externally Premier B CMS Subscribers Subscribers Channels in Microsoft Content Management Server 2002: AccountB A Complete Guide is the first book that explains authenticated content, TypeB section B; how to effectively unlock section the power how B of CMS. Administrators and developers alike will learn template to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and galleries and API to manage content on the Microsoft platform. resource galleries This thorough reference explains the product architecture, then shows you how to create and to required edit content and use the workflow. Topic coverage includes CMS administration and security, view content the Publishing API, deployment options, site configuration, and template development.inAsection B running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Anonymous Publicly — template galleries and Chapter 6: How do you customize workflow? resource galleries Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 required to using Visual Studio .NET? view content in public Chapter 17: How do you establish user rights? channels
Chapter 22: How do you best deploy CMS according to your organization's needs, size, 8. and CMSresources? Web entry points: Using the SCA, configure the CMS Web entry point for production servers to b read-only. Chapter 32: How do you publish dynamic data? 9. CMS authentication cookie encryption keys: If CMS is deployed in a Web farm, all CMS servers should
8.
9.
able [ Team LiBto] recognize each other's CMS authentication cookies. You need to use the Manage key utility to synchronize the CMS cookie encryption keys between the servers. Refer to the previous chapter for an explanation of the Managekey utility.
10. ASP.NET Forms authentication cookie encryption and validation keys: If CMS is deployed in a Web farm all CMS servers should be able to recognize each other's ASP.NET Forms authentication cookies. You n to edit the <machineKey> element in the machine.config files on all servers to synchronize the ASP.N Forms authentication cookie encryption and validation keys. Refer to the previous chapter for an explanation of the <machineKey> element and its attributes. On a CMS site that is configured following these steps, processing of a page request includes the following authentication and authorization sequence:
IIS receives the page request. Since anonymous access is enabled, IIS passes the IUSR_<machinenam Table of Contents identity to the worker process. The ASP.NET authentication mode in the CMS Web application is set to Microsoft Content Management Server 2002: A Complete Guide Forms; therefore, the identity passed from IIS is not used for authentication. •
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
ASP.NET checks whether a valid Forms authentication cookie is attached to the request. If not, it tries pass the worker process default account identity to the CMS Authorization module. The CMS Authoriza Publisher: Wesley moduleAddison checks with the CMS content server whether guest access is enabled and attempts authorizati Pub Date: 31, 2003 for theOctober CMS guest account. If the requested page is available to all users, the request will be authorize and the page returned to the user, with a CMS authentication cookie attached to the response. ISBN: 0-321-19444-6 Pages: 1136
If there is a valid ASP.NET Forms authentication cookie, the request is passed to the CMS Authorizatio Module, which checks whether a valid CMS authentication cookie is attached to the request. If both cookies are valid, the CMS Authorization module checks the mapped Windows user account rights, an the Windows user is authorized, access is granted to the resource. Otherwise, CMS returns an access "This is one of those rare books that you will read to learn about the product and keep denied error to the application. rereading to find those tidbits that you missed before." —Gary MVP or is invalid, the request is redirected to the login page using an If Bushey, either of SharePoint the cookiesServer is not found
HTTPS URL, where the user enters the required credentials. Content Management Server (CMS) is fast becoming a vital content-management tool that helps The administrators and developers handle against the ever-increasing of content on using their an event handl login page verifies the credentials the external amount source—for example, Web sites. However, an authoritative source of product information has been . . untilwhich displays global.asax. If authentication fails, an access denied error is returned to missing the login. page, now. message to the user, usually within the login page itself—for example, "Sorry, your login failed. Please
enter your credentials." If the user credentials are successfully authenticated, the mapping to the Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Windows account takes place. The login page then authenticates and authorizes the Windows account how to effectively unlock the power of CMS. Administrators and developers alike will learn how CMS, redirects the user to the originally requested page, and attaches two cookies to the outgoing to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and response: an ASP.NET Forms authentication cookie and a CMS authentication cookie. API to manage content on the Microsoft platform. [ Team LiB ] This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Extranet Sites A CMS extranet site is an external site that is available to predefined users only. All users must be authenticated; there is no anonymous or guest access. For example, an extranet site can be used by your company and its preferred business partners, but will be closed to anybody else. Although it is an external site, only authorized employees of your company and the partner companies are able to use it. Because we cannot control other companies' environments, a common browser standard cannot be guaranteed. We will start with looking into the security settings for an extranet site with forms-based authentication; we then concentrate on an extranet site with certificate-based • Table of will Contents authentication. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Extranet Sites with Forms-Based Authentication Publisher: Addison Wesley Date: 31, 2003 ThisPub form ofOctober authentication is normally used for CMS production servers on an extranet. A CMS production in an extranet environment must explicitly authenticate all users; there is no ISBN:server 0-321-19444-6 guest Pages: access. Because an extranet CMS site usually needs to serve a variety of clients, the 1136 most flexible authentication mechanism is forms-based authentication over SSL.
It is likely that all extranet users will have Windows accounts; therefore, your login page will use the CmsFormsAuthentication. AuthenticateAsUser(AccountName; AccountPassword ) "This is one of those rare books that you will read to learn about the product and keep method with the user-supplied credentials for authentication rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP However, if the extranet users do not have Windows accounts—for example, because of your company security policy restrictions—you may be required to map the extranet user credentials Content Management Server (CMS) is fast becoming a vital content-management tool that into Windows accounts that are created to reflect the type of users. These accounts are helps administrators and developers handle the ever-increasing amount of content on their sometimes referred to as role-based accounts because we create one Windows account for Web sites. However, an authoritative source of product information has been missing . . . until each type of user based on the role they can play on our site. Usually, the user credentials are now. held in a dedicated SQL database. In this case, you will need to write event handlers to authenticate the users against the SQL-held data, and then, if they are authenticated, map the Microsoft Content Management Server 2002: A Complete Guide is the first book that explains request to a Windows account based on the user role on the site. The user role must be held in how to effectively unlock the power of CMS. Administrators and developers alike will learn how the SQL database as well. Then, the login page will use the to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and CmsFormsAuthentication.AuthenticateAsUser (ServerAccountName, ServerAccountPassword, API to manage content on the Microsoft platform. ClientAccountName, ClientAccountType ) method with the mapped account credentials, the user-supplied name,explains and thethe user role extracted from then the database. This thorough user reference product architecture, shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, As always in CMS, configuring security for a production site involves several layers. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: 1. IIS security: Chapter 6: HowIIS do for youanonymous customize workflow? a. Configure access. Chapter 10: the Howserver do you develop and for Microsoft Content Management (CMS) b. Install certificate enable SSL on port 443 on yourServer server. The 2002 using certificate Visual Studio .NET? must be issued by a CA that will be recognized by all companies using the site. Chapter 17: How do you establish user rights? c. Create a virtual directory on your server—for example, /login—and enable SSL for Chapter How do you best deploy CMS according to your organization's needs, size, this22: directory. and resources? 2. ASP.NET security: Chapter 32: How do you publish dynamic data?
a.
2. [ Team a. LiBAuthentication: ]
1. Create a login page that authenticates the user using the CmsFormsAuthentication.AuthenticateAsUser method and verifying that the returned CmsAuthenticationTicket is not null. 2. Save the login page in the HTTPS-enabled virtual directory—for example, as /login/LoginPage.aspx. 3. Edit the web.config file to enable ASP.NET to use Forms authentication and to point to the location of the login page—for example:
ByBill English, Olga Londer , Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley b. Authorization:
Configure ASP.NET to allow access. Make sure that the following to the web.config authorization section:
Pub Date:element October 31, is 2003 added ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missed before." 3. NTFStopermissions: —Gary Bushey, SharePoint Server MVP Contenta.Management Server (CMS) is fast becoming a vital content-management toolthe that Verify the NTFS permissions on the ASPX template files to make sure that helps administrators and developers handlehas theat ever-increasing amount of on their worker process identity account least read permissions oncontent the templates. Web sites. However, an authoritative source of product information has been missing . . . until now. b. Verify that the IUSR_<machinename> account has read permissions on the static site files that are not stored in the resource galleries. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock the power CMS. Administrators and developers alike will learn how 4. to CMS guest account: Using the of SCA, disable guest access. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 5. toCMS system account permissions: that the CMS system account has permissions to API manage content on the Microsoft Verify platform. view the tree in the AD domain where the AD accounts for either the site users or mapped This thorough reference explains the product architecture, shows you how to create and user roles, in the case of mapped authentication, are then defined. edit content and use the workflow. Topic coverage includes CMS administration and security, 6.Publishing CMS userAPI, rights: the deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions a. Using the Site Manager, create subscribers rights groups for each type of user as: access to the site.
If your users AD accounts, create an AD group for each type of access and add Chapter 6: How dohave you customize workflow? these groups to the appropriate subscribers groups. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 you are using AD mapped accounts, add these accounts to the appropriate using IfVisual Studio .NET? subscribers groups—one account to one group. Chapter 17: How do you establish user rights? b. Assign the subscribers groups you've created to site containers, such as channels, template galleries, galleries, as appropriate for the user needs, type each Chapter 22: How do you and bestresource deploy CMS according to your organization's size, subscribers group represents. and resources? 7. Chapter CMS authentication encryption keys: If CMS is deployed in a Web farm, use the 32: How docookie you publish dynamic data? Managekey utility to synchronize the CMS authentication cookie encryption keys between
8.
7. theLiB servers. [ Team ] 8. ASP.NET Forms authentication cookie encryption and validation keys: If CMS is deployed in a Web farm, synchronize the settings in the <machineKey> element in each server's machine. config file. On a CMS site that is configured following these steps, processing of a page request includes the following authentication and authorization sequence:
IIS receives the page request. Since anonymous access is enabled, IIS passes the IUSR_<machinename> identity to the worker process. The ASP.NET authentication mode in the CMS Web application is set to Forms; therefore, the identity passed from IIS is not used for authentication. •
Table of Contents
ASP.NET checks whether a valid Forms authentication cookie is attached to the request. If it is, the request is passed to the CMS Authorization Module, which checks whether a valid ByBill English , Olga Londer, Shawn Shellis, Todd Bleeker , Stephen CawoodIf both cookies are valid, the CMS CMS authentication cookie attached to the request. Authorization module checks the user rights, and if the user is authorized, access is granted to the resource. Otherwise, an access denied error is returned to the application. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley
If Date: either of the Pub October 31,cookies 2003
is not found or is invalid, the user is redirected to the login page using HTTPS URL, where the user enters the required credentials. ISBN: an 0-321-19444-6 Pages: 1136
The login page verifies the credentials, and if they are authenticated, attaches two cookies to the response: an ASP.NET Forms authentication cookie and a CMS authentication cookie. If authentication fails, an access denied error is returned to the login page, which displays a message to the user, usually within the login page itself—for example, "Invalid "This user is one of those rare books that you willyour readcredentials." to learn about the product and keep name/password. Please re-enter rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Extranet Sites with Certificate-Based Content Management Server (CMS) is fast becomingAuthentication a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites.of However, an authoritative source product information been missing . . . until This form authentication is used when CMSofauthoring servers arehas accessible using an now. extranet. So far, we have seen content authoring done on an internal network. However, often content authors and editors are required to submit content over the Internet. Sometimes, to Microsoft Content Management Server 2002: A Complete Guide first book that save costs, production and content authoring environments mayisbethe combined and runexplains on the how effectively unlock the power CMS. Administrators andbut developers alike willdatabase. learn how sametoservers. More frequently, theyofrun on different machines share the same to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manageaccessible content on theauthoring Microsoft server platform. An externally CMS usually has security settings similar to those of an extranet production server. The IIS security settings, ASP.NET security settings, NTFS This thoroughand reference explains the product architecture, shows you how toaccess create should and permissions, CMS system account permissions are the then same; and CMS guest edit content as and the workflow. Topic coverage includes CMS administration and security, be disabled foruse a production server. the Publishing API, deployment options, site configuration, and template development. A running example is user usedrights throughout the book tocontent illustrate how important CMS However, the CMS are different. For authoring servers, youfeatures need to are set up implemented in real-world Web site development. Inside you'll find answers to such questions the publishing workflow. Depending on your environment, you may need to create one or more as: of authors, editors, moderators, resource managers, and channel managers rights groups and assign them to appropriate containers to reflect your user privileges on the site. You may also need to create at least one subscribers group so that the content authors are able to test their work.Chapter 6: How do you customize workflow? 10: How do you developsecurity for Microsoft Content Server (CMS) It2002 ThereChapter are scenarios where additional is required for Management content authoring servers. using Visual Studio .NET? usually happens in a business-to-business (B2B) environment, where a publishing workflow break-in represents a serious security threat for both companies involved. If this is the case, Chapter 17: How do you establish user rights? then Certificate authentication can be used. Chapter 22: How do you best deploy CMS according to your organization's needs, size, With such high security requirements, all authorized users must either have their own Windows and resources? accounts or be mapped to Windows accounts. User certificates can be mapped to Windows accounts on either a one-to-one or a many-to-one basis (many certificates to a single account). Chapter 32: How do you publish dynamic data? In order to be able to map certificates, you need to have a copy of all the certificates the users
going [are Team LiBto] use when connecting to your server. If you don't want to map certificates, or if you are required to provide two-step authentication—both by a certificate and by a user entering their credentials—then instead of certificate mapping, you can enable Basic authentication in IIS. In this case, each user must have a security account; user credentials are validated against this account. To configure a CMS server for Certificate authentication, consider the following steps:
1. IIS authentication: a. Install the server certificate and enable SSL on port 443 on your server. The certificate must be issued by a CA that will be recognized by all companies using the site.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
b. For the directory that hosts your CMS Web application, enable secure ByBill Englishcommunications, , Olga Londer, Shawnand Shellspecify , Todd Bleeker , Stephen Cawood are required. that client certificates c. You may need to enable a certificate trust list (CTL) to define the certification which you accept certificates.
from Publisher:authorities Addison Wesley Pub Date: October 31, 2003
d. If you need two-step authentication, configure IIS for Basic authentication.
ISBN: 0-321-19444-6 Pages: 1136
If you don't need two-step authentication, enable certificate mapping and map the certificates to the Windows accounts.
2. ASP.NET security: "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Authentication: ASP.NET for Windows authentication. To do this, open the —Gary a. Bushey, SharePointConfigure Server MVP web.config file from the root on the CMS Web application and make sure that the following is Server configured in the authentication Content Management (CMS) is fast becoming a section: vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how b. Authorization: Configure ASP.NET to deny anonymous access. Make sure that the to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and following element is added to the web.config authorization section: API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, <deny users="?"/> the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
c. Impersonation: Depending on your requirements, you may need to configure ASP.NET impersonation in web.config—for example: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? 3. NTFS permissions: Set up read permissions for the appropriate Windows accounts on the template22: filesHow anddo theyou static files.CMS according to your organization's needs, size, Chapter bestsite deploy and resources? 4. CMS guest access: Using the SCA, disable guest access to CMS. Chapter 32: How do you publish dynamic data? 5. CMS system account permissions: Verify that the CMS system account has permissions to
6.
4. 5. view [ Team LiBthe ] tree in the AD domains where either the user accounts or the accounts mapped to the certificates are maintained. 6. CMS user rights: a. Using the Site Manager, create CMS rights groups within CMS roles to reflect your publishing workflow. b. Assign the CMS rights groups you've created to the appropriate containers. 7. Cookie encryption keys: If the CMS site is deployed in a Web farm, use the Managekey utility to synchronize the CMS authentication cookie encryption keys between the servers. To synchronize the ASP.NET Forms authentication cookie encryption and validation keys, use the settings in the <machineKey> element in each server's machine.config file. •
Table of Contents
On a CMS site that is configured following these steps, processing of a page request includes the following authentication and authorization sequence:
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
IIS authenticates Publisher: Addison Wesleythe
request using the client certificate. If the client does not present a valid certificate issued by a CA listed in the CTL, the request is denied. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
If the certificate is accepted, then one of two things happens: Pages: 1136
If Basic authentication is enabled, the user supplies a user name and password; then IIS authenticates the user credentials against a Windows account. "This is one of those rare books that you will read to learn about the product and keep If find certificate mapping is you enabled, thebefore." user certificate is mapped to a Windows rereading to those tidbits that missed account. —Gary Bushey, SharePoint Server MVP The user identity passedis to the worker process. Content Management Serveris(CMS) fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their The CMS Web application is configured to use ASP.NET Windows authentication; Web sites. However, an authoritative source of product information has been missing . . . until therefore, the user credentials from IIS are used for the template file authorization and now. then are passed to the CMS Authorization module. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The CMS Authorization module calls the CMS content server to authenticate the user and how to effectively unlock the power of CMS. Administrators and developers alike will learn how to define the CMS rights group membership for this user. If, based on the role permissions to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and for the groups the user is a member of, the user is authorized, then access is granted to API to manage content on the Microsoft platform. the resource, and a CMS authentication cookie is attached to the HTTP response. Otherwise, an access deniedthe error is returned to the Web to theand user. This thorough reference explains product architecture, thenapplication shows you and howthen to create edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A [ Team LiB ] running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary There are many variables to consider when you are securing a CMS site. Security in CMS spans multiple layers, from the operating system to the CMS Web application. Depending on whether your site is internal or external and whether the site has general-access parts, the site security configuration will be different. In this chapter, we looked into security settings in several common scenarios for intranet sites, Internet sites, and extranet sites. Depending on your business needs and your company security policy, your requirements may be different from the examples we looked into. However, you canofuse our scenarios as a starting point for your specific implementation. • Table Contents Microsoft Content Management Server 2002: A Complete Guide
In the next two chapters, we will look into how to deploy CMS sites from development to production.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: [ Team LiB ]Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part V: Site Deployment Chapter 21. Site Deployment Manager Chapter 22. Deployment Scenarios [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 21. Site Deployment Manager Overview Using Site Deployment Manager Automating Package Processing Summary [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview Site Deployment Manager (SDM) is an important component of CMS. It provides administrators and developers with a mechanism to move content and CMS-based assets from one implementation to another. Site Deployment Manager can be used either in an interactive mode, through Site Manager, or through programmatic methods, using VBScript. In this chapter, we'll explore SDM, covering the basics of deployment through Site Manager and how to script automated updates between CMS servers. We'll start by discussing Site Deployment Manager in general. Then we'll show you how to use the interactive interface in Site ManagerTable to import and export Site Deployment Object (SDO) files. Next, we'll demonstrate • of Contents how to script anManagement incremental deployment process.Guide Finally, we'll provide a brief explanation of Microsoft Content Server 2002: A Complete how to automate the deployment script execution through the Windows Task Scheduler. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
It's important to understand that both the interactive interface for Site Deployment Manager and the COM-based interface are used to move CMS-based assets only. Deploying your site Publisher: Addison Wesley from one environment to another involves moving both the CMS-based assets and the filePub assets Date: October 31, 2003 based (template files, images, controls, and so on). Chapter 22 discusses several ISBN: 0-321-19444-6 deployment scenarios. In this chapter, we're focusing on deploying CMS-based assets only. Pages: 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Using Site Deployment Manager
Site Deployment Manager is a utility that ships as a part of CMS. SDM is used to import and export CMS-ba assets. Exported assets are placed in a Site Deployment Object file, also referred to as a "package." When are importing, the SDO file is processed by SDM, and the objects contained in the package are placed in the destination repository.
The interactive user interface for SDM is contained within Site Manager. This interface allows channel mana to export content and administrators to import or export content. Figure 21-1 shows the user interface for import operation, and Figure 21-2 shows the export user interface. •
Table of Contents
Figure 21-1. The SDM import interface
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Figure 21-2. The SDM export interface now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Keep in mind that SDM is meant for CMS-based assets. SDM packages cannot include assets that are store external to CMS. For example, all the template ASPX files are stored externally to CMS. As a result, when y deployisaone CMS you'll tothat create SDO file theabout CMS-based assetsand andkeep then move the non-CMS "This of site, those rare have books youan will read tofor learn the product based assets, placing them both on the destination server. Microsoft recommends using Application Center rereading to find those tidbits that you missed before." Server to handle moving the file-based assets. However, you may choose to use other methods—perhaps a —Gary Bushey, SharePoint Server MVP scripted FTP or other such method. There are no specific requirements for moving non-CMS based files, so choice is Management yours. Content Server (CMS) is fast becoming a vital content-management tool that
helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: When moving a CMS application from one server to another for the first time, you must create a virtual directory on the destination server. When you create a new through VS.NET, a virtual Microsoft Content Management Server 2002: A Complete Guide is the firstproject book that explains directory in your solution called CMS is automatically created. When moving your application to a new how to effectively unlock the power of CMS. Administrators and developers alike will learn how server,their you must manually create this virtual directory under your The new to enhance Web servers' scalability, flexibility, and extensibility by application using CMS directory. features and virtual directory should beMicrosoft mapped to X:\program files\Microsoft Content Management API to manage content on the platform. Server\Server\IIS_CMS. This virtual directory contains the JavaScript code and certain assemblies for the Word reference Authoring explains Connector the edit console. Also, must remove new and application This thorough theand product architecture, thenyou shows you how tothe create created for the new virtual directory; this virtual directory should inherit the application edit content and use the workflow. Topic coverage includes CMS administration and security, settings from your CMSAPI, application. the Publishing deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Creating Packages
Chapter 6: How do you customize workflow? There are two methodologies for processing packages in SDM: manual and scripted. If you choose to manu Chapter 10: How develop MicrosoftSite Content Management process packages, you do willyou be using thefor interactive Manager interface.Server If you (CMS) choose2002 to use scripts, you using Visual Studio .NET?which uses a COM-based API (yes, COM). Either methodology will work, and i end up using VBScript (VBS), likely you'll use a combination, depending on the situation. Chapter 17: How do you establish user rights? In the following sections, we'll discuss both the creation and the consumption of SDO files. We'll first start b Chapter 22: you Howcan do you best deploy CMS SDO according to your needs, size, showing you how create and consume files using theorganization's interactive interface. After that, we'll wa andthe resources? through process of creating script files to allow you to incrementally deploy content from CMS. Chapter 32: How do you publish dynamic data?
NOTE: [ Team LiB ]It's not possible to perform a full deployment through a script, and it's not possible to perform an incremental deployment through the interactive interface. In most cases, you'll end up using both methods at different times, based on the operation you need to perform. In addition, there may be some cases where it's simply easiest to back up and restore the entire SQL database. The drawback to this method is that you also carry the CMS settings specific to the source environment. We would recommend using an SQL backup/restore if you're moving a very large CMS database from one environment to another, similar environment. Use Site Deployment Manager for ongoing deployments.
Manually through Site Manager
Once of the easiest ways to process SDO files is using the manual interface in Site Manager. This interface w allow you to both export and import. The only restriction to processing SDO files is that only administrators import content. However, channel managers have the ability to export content from their channels. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Export
Publisher: Addison To begin, you haveWesley to start Site Manager. Click the File menu in Site Manager. Now, choose Package and th Export. In Figure you can see how this is done. Pub Date: October21-3 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 21-3. Starting SDM from Site Manager
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Once Chapter you've started you'll be provided with an interface that allows you to choose which objects you'd 6: HowSDM, do you customize workflow? to export (shown in Figure 21-4). You'll immediately notice on the left side of the dialog box a complete list Chapter 10: How do youTodevelop Contentsimply Management Server 2002 This will pla all containers in the system. choose for an Microsoft item for export, click it and then(CMS) click Include. using in Visual Studiolist, .NET? the object the export just below the All Containers element. For our example, we've decided to expo BOTS Consulting site. So, we've chosen the botsconsulting channel and clicked Include to add it to the list o Chapter 17: How do you you establish rights? SDM will export that container and all its children. Sin objects to be exported. When choseuser a container, picked the botsconsulting channel, SDM will export all channels and postings contained in the hierarchy of t Chapter 22: How dowant you best deploy to youryou organization's needs,that size,single object. In channel. However, if you to export a CMS singleaccording posting object, can simply select and resources? example, for each category of object (channels, templates, and resources), we've selected all the relevant containers for BOTS Consulting. In addition, we've supplied a file name in the Export to File field. In Figure Chapter 32: How do you publish dynamic data? you can see what our export interface looks like now that we've added all the containers we want.
[ Team LiB ]
•
Figure 21-4. SDM set to export the BOTS Consulting site
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This one of those books you will read learn about the prompt product you and either keep to continue or to ru Once is you're ready torare export yourthat objects, just clicktoExport. SDM will rereading to find those tidbits that you missed before." preexport report. If you choose to run a preexport report, SDM will simulate the export process to determin —Gary Bushey, SharePoint MVP will occur. This same report can also be generated after the actual e what will be exported and if Server any errors
process if you so choose. In our case, we've checked the option box that disables this prompt, and our expo Content Management Server (CMS) is fast becoming a vital content-management tool that occurs immediately. helps administrators and developers handle the ever-increasing amount of content on their Web However, an authoritative sourceexport of product information has been missing . . . untilto all depend Whensites. you export objects, SDM will dutifully all the objects you've specified, in addition now. objects. For example, if a posting links to a resource that's in the resource gallery, the resource gallery item
automatically be moved, even though you didn't specifically include it in the export; in this way CMS preven Microsoft Content Management Server 2002: A Complete Guide is the first book that explains objects from "breaking" in the new environment. The only downside to this behavior occurs when you're m how to effectively unlock the power of CMS. Administrators and developers alike will learn how content "backward" from production to development for testing. Since a posting needs a template to run, S to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and will drag the templates for each posting along with the postings themselves. When you import the SDO in y API to manage content on the Microsoft platform. development environment, the development templates will be overwritten with the ones from production. T avoidthorough this problem, you should export your templates in development import your SDO This reference explains the product architecture, then shows first, you how to create andfrom productio and then reimport your original development templates. edit content and use the workflow. Topic coverage includes CMS administration and security,
the Publishing API, deployment options, site configuration, and template development. A The length of time SDM takes to run depends entirely on the number and size of the objects it has to expor running example is used throughout the book to illustrate how important CMS features are your site is mostly HTML, is relatively flat, and doesn't have too many postings and/or resources, SDM coul implemented in real-world Web site development. Inside you'll find answers to such questions done in a matter of seconds. If your site is very large, has a complex channel structure, and/or has lots of b as: files, SDM may take longer to run. Once SDM finishes, you'll end up with one SDO file, which you can trans the other implementation of CMS to import. In Figure 21-5, we've provided a screen shot of one portion of export report for our BOTS exercise. As you can see, the report shows not only the channels, but th Chapter 6: How do youexport customize workflow? postings it exported. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Figure 21-5. The SDM export report Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 let's go back
Now, to our export process and explore a few of the options available to you. The following is of options and functions in SDM and a brief explanation of each.
its name suggests, it's the of theabout Include allows you to specify "This Exclude: is one of As those rare books that you will opposite read to learn theoption. productExclude and keep particular objects to be excluded from the SDO. This is useful if you want to grab most of the objects i rereading to find those tidbits that you missed before." given container but not all of them. —Gary Bushey, SharePoint Server MVP
Export Containers Only: (CMS) Use this option if you simply to export the selected containers but not th Content Management Server is fast becoming a vitalwant content-management tool that objects within them. For example, if you just wanted to transfer a channel structure, helps administrators and developers handle the ever-increasing amount of content on theirresource gallerie template galleries a destination CMS of server, youinformation could use this to quickly Web sites. However, an to authoritative source product has option been missing . . move . until an existing structure. This is most commonly used when you are moving containers from a development server to now. staging or production server, where the developers want to move a new navigation or gallery structur don'tContent want toManagement move any ofServer the objects the containers test postings resources). Microsoft 2002:inside A Complete Guide is(like the first book thatorexplains
how to effectively unlock the power of CMS. Administrators and developers alike will learn how Report/Export Preview: allows you to run an preview Thisand report will tell to enhance their Web servers'This scalability, flexibility, andexport extensibility byreport using manually. CMS features exactly what will and won't be moved during an export process. It will also alert you to any potential e API to manage content on the Microsoft platform.
Report/Dependency: This allows you to run a dependency object in the repository. For a This thorough reference explains the product architecture, then report shows on youany how to create and given object, this report tells you what other objects may depend on it. For example, a edit content and use the workflow. Topic coverage includes CMS administration and security, template may many postings that use it. options, site configuration, and template development. A the Publishing API, deployment running example is used throughout the book to illustrate how important CMS features are File/Save Export Profile: This allows you to create an export profile. We'll learn more about profiles lat implemented in real-world Web site development. Inside you'll find answers to such questions this chapter. as:
Rights Options: If you want to back up and restore the groups and/or users associated with an object, can use this option create an SDO that includes this information. Backing up the user groups and ri Chapter 6: How do to you customize workflow? is especially useful if you need to back up and restore the entire CMS database from one environment another. 10: YouHow would up the groups fromManagement the destination, restore a database from a Chapter dofirst you back develop for rights Microsoft Content Server (CMS) 2002 development source, and then import the rights groups back in to restore permissions. using Visual Studio .NET? Chapter 17: How do you establish user rights?
Import
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Now that you've walked through a manual export process, let's look at the import process. The import inter is started in a 32: similar to the export interface. First, start Site Manager, and pick the File menu and then Chapter Howway do you publish dynamic data? Package. From the submenu choose Import. This will start SDM in import mode. Figure 21-6 shows this cho
the File [onTeam LiB menu. ]
Figure 21-6. Choosing Import from the Package menu
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This one of those SDM rare books thatmode, you will read to the learn about product andand keep Once is you've started in import let's open SDO we the created earlier perform an import. Cli rereading find thoseOpen tidbits that youOnce missed before." File menu to and choose Package. you've done that, your SDO package will be listed at the bottom —Gary Bushey, MVP the interface, in SharePoint the Import Server from File (.sdo) field. Figure 21-7 shows the import interface with our BOTSConsultingSite. SDO chosen. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Figure The source SDM import with our SDO. .selected Web sites. However, an 21-7. authoritative of productinterface information has been missing . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
Chapter 10:the How do you develop fora Microsoft Server 2002can simply per As you can see, import interface has few moreContent choices.Management In a lot of cases, it's(CMS) likely you using Visual Studio .NET? the import with the default settings. However, let's review each of the options in the interface, described in following list, before we proceed. When Adding Containers: Chapter 17: How do you establish user rights?
Chapter 22: How do you best deploy according to your organization's needs, size, Inherit destination parent rights: ThisCMS will reset the permissions that may be stored in the SDO and re and themresources? with the destination container parent's rights. For example, if you were importing a channel into root channel (Channels) and the root channel allowed anonymous access, the new channel would also Chapter 32: access. How do you publish dynamic data? anonymous
Use package container rights: This option will import the rights group assigned to the imported contain [ Team LiB ] Essentially, you're going to retain whatever rights were assigned to the containers in the source syste
Leave container rights list empty: This option imports the containers in the SDO with no rights assigne When Replacing Containers:
Inherit destination parent rights: This option specifies that replaced containers are to inherit the users assigned to the parent container on the destination server. Replace with package container rights: Choose this option if you want to use the source container permissions.
•
Keep destination container rights: This option replaces the imported container's permissions with the permissions specified on the corresponding container in the destination server; essentially, you're leav Table of Contents the destination server's permissions on replaced containers intact.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English , Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood Combine package and destination rights: This option will
combine the rights from the source and
destination servers. Change container Publisher: Addison Wesleyhierarchy
on destination to match the package hierarchy: This option will restructur destination container to match the SDO package. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Delete all existing container contents when replacing a container: When you select the "Change conta Pages: 1136 hierarchy..." option, you can also select an option for SDM to delete containers in the destination mac that don't have a corresponding object in the SDO. This option is useful for "resetting" a destination se to match the source (such as moving a site from staging to production for the first time).
"This Reports/Import is one of those rare booksThis thatgenerates you will read to learn about the report product and keep Preview: a report similar to the we saw in the export process. T rereading towill findshow thoseyou tidbits you missed before." replaced, and/or deleted. Further, should there be a report whatthat objects were imported, —Gary Bushey,problems, SharePoint potential theServer reportMVP will show you those as well. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web NOTE: sites. However, anwill authoritative source of product has been . . . destination until Templates not be deleted if pages basedinformation on the template still missing exist in the now. server.
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to their Web servers' flexibility, extensibility by using CMSsimply features and At enhance this point, we should be set scalability, up for a basic import.and To begin the import process, click the Import b API to manage content on the Microsoft platform. Once the import completes, SDM will give you a success or failure message and the opportunity to see the import report. In Figure 21-8, you can see a portion of our import report. If you refer back to Figure 21-5, y This thorough reference explains product architecture, shows you how to create and will see the corresponding sectionthe of the export report; thethen two should match. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Figure 21-8. A portion of the import result report running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: now you1136 should
So, be familiar with the basics of importing and exporting objects. The interactive interface SDM is a pretty easy tool to use and is quite handy. However, manually importing and exporting objects is the best methodology if you have to continually move content between environments. As a result, Microsof provides a COM-based interface to allow you to script an incremental import and export process. This COMbasedisinterface can completely theread process of importing and exporting so that you can "This one of those rare booksautomate that you will to learn about the product and content keep perform scheduled updates between, a development and staging environment or an authoring and rereading to find those tidbits that yousay, missed before." production environment with little or no human interaction. In the next section, we'll show you how to creat —Gary Bushey, SharePoint Server MVP these incremental deployment scripts. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, authoritative source of product information has been missing . . . until Deploying Contentanthrough the COM Interface now.
Although the interactive interface of SDM is convenient forGuide the ad of CMS objects from one Microsoft Content Management Server 2002: A Complete is hoc the movement first book that explains environment to another, any regularly scheduled incremental import/export should be automated. Microsof how to effectively unlock the power of CMS. Administrators and developers alike will learn how provides a COM-based interface that allows you to create scripts thatby can be used export and and import obj to enhance their Web servers' scalability, flexibility, and extensibility using CMSto features on some regularly scheduled API to manage content on thebasis. Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, NOTE: The COM interface will only export content that's it will Aimport anything in the Publishing API, deployment options, site configuration, andchanged. templateHowever, development. the source SDO file. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
The COM interface is broken into two parts—client and server—and then two subcomponents—import and export. Both the clientdo and the server interfaces are the same from a functionality standpoint. The server o Chapter 6: How you customize workflow? set is used to act on a local machine, and the client object is used for performing import or export tasks remotely. For 10: example, if you creating an export package on a source server, you'd2002 use the server Chapter How do you were develop for Microsoft Content Management Server (CMS) components. OnceStudio you've.NET? created the SDO package on the source server using the server component, you using Visual would transfer the SDO to the destination and use the client component on the source server to start a rem Chapter do you establish user rights? we're going to use the server object to export a packag import process17: on How the destination. In our examples, and then use the client object to perform the import. Both the server and the client deployment objects hav Chapter 22: How do youand bestmethods. deploy CMS according to your organization's needs, size, virtually the same properties and resources? Chapter 32: How do you publish dynamic data?
Export
[ToTeam LiBwe're ] begin, going to create an incremental export script to perform an incremental export of our BOTS Consulting site. In our example, we're going to use a VBS file. However, the COM objects can be used from within an ASP page or a .NET script (using the COM Interop). We chose a VBS file because it was convenien it allowed us to easily create a task in the Task Scheduler (covered at the end of this chapter).
In our VBS file, we start by creating an export object from the CmsDeployServer library. The export object handle all aspects of the export process on the server. To create the CmsServerExport object, use the follo code:
Set myCmsServerDeployment = Wscript.CreateObject("CmsDeployServer.CmsDeployExport.1")
Next, you'll need to authenticate on the server. Remember, you can export content as a channel manager administrator. In our example we've embedded the user ID and password of our administrator for demonst • Table of Contents purposes. You could also pass in the credentials as parameters to the VBS file. The object model also provid Microsoft Content Management Server 2002: A Complete Guide Authenticate AsCurrentUser method, which will use the current Windows user credentials, or the "run as" By Bill English,if Olga , Shawn Shell , Todd Bleeker , Stephen credentials youLonder use the Task Scheduler; choose theCawood option that's appropriate for your environment.
Call myDeployObject. Publisher: Addison Wesley AuthenticateAsUser("WinNT://CMSSERVER/admin","password") Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Once you've authenticated on the server, you can stipulate your export options by setting the ExportOption properties in the CmsDeploy Export object. There are only two options when exporting and they're both rel to the export of security information. The IncludeRightsGroups property allows you to determine whether y going to export the rights groups in the SDO, and the IncludeCreatedBy property determines whether you'r "This of those rare booksinformation that you will read to learn about the product and keep going is toone export the CreatedBy (see Listing 21-1). rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Listing 21-1 Setting the export options in our VBS file
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Set myExportOptions myDeployObject.Options Web sites. However, an = authoritative source of product information has been missing . . . until If ( Err.Number 0 ) Then now. Call Msgbox(Err.Description, vbCritical, "Export Problem Authenticating User" Set myDeployObject Nothing Microsoft Content Management= Server 2002: A Complete Guide is the first book that explains myExportOptions = Nothing how to Set effectively unlock the power of CMS. Administrators and developers alike will learn how Exittheir Sub Web servers' scalability, flexibility, and extensibility by using CMS features and to enhance End to Ifmanage content on the Microsoft platform. API
This thorough reference explains product architecture, then shows you how to create and ' Include Rights groups and the their members. edit content and use the workflow. Topic coverage includes CMS administration and security, ' the Publishing API, deployment configuration, and template development. A ' IncludeRightGroups: (1)options, Do notsite export rights groups or users (default) running example is used throughout the book to illustrate how important CMS features ' (2) Export rights groups are without members implemented in real-world Web site development. Inside you'll find answers to such questions ' (3) Export rights groups with members as: ' ' IncludeCreatedBy: (1) Do not include created by information ' (2) Include created by information (defau Chapter 6: How do you customize workflow? ' Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 myExportOptions.IncludeRightsGroups = 3 using Visual Studio .NET? myExportOptions.IncludeCreatedBy = 2 Chapter 17: How do you establish user rights?
Once Chapter you've set export options, you can start the export. In our example, weneeds, addedsize, some additional co 22:the How do you best deploy CMS according to your organization's stipulating the export package we wanted to create. The export returns a URL to an export report. In a and resources? noninteractive mode, you may want to simply redirect the output to a file for review later. In our example, starting a browser session to show thedynamic report immediately. Listing 21-2 shows our code. Chapter 32: How do you publish data?
[Listing Team LiB21-2 ]
Setting the SDO file name and beginning the export process
Dim strPackageFileName, sdoDateQualifier Dim strReportUrl ' Create a date qualifier for creating unique export names sdoDateQualifier = day(now()) & month(now()) & _ year(now()) & hour(now()) & minute(now()) & second(now()) ' Set a string with the name and path of the SDO file strPackageFileName = "C:\BOTSConsultingSite" & sdoDateQualifier & ".sdo" ' Start the deployment ' The first option specifies the name of the export file • Table of Contents ' The second option specifies the time interval. A value Microsoft Content Management Server 2002: A Complete Guide ' of 0 specifies to export all objects that have changed since By Londerregardless , Shawn Shell, Todd Bleeker, Stephen Cawood ' Bill theEnglish last,Olga export of time. A value of 1 or greater ' specifies the age of objects to be exported. For example, ' a value of 200 stipulates that all objects that have changed in Publisher: Wesley ' the lastAddison 200 minutes should be exported. Pub Date: 31, 2003 ' The lastOctober option specifies the channel to export. If no value ' is provided, the entire repository will be evaluated. All objects ISBN: 0-321-19444-6 ' from the1136 specified channel and below will be evaluated if a value Pages: ' is provided. strReportUrl = myDeployObject.Export(strPackageFileName,0,"/Channels/botsconsulting") If ( Err.Number 0 ) Then "This is one of those rare books that you will read to learn about the product and keep Call Msgbox(Err.Description, vbCritical, "Export Problem creating SDO File") rereading to find those tidbits that you missed before." Set myDeployObject = Nothing —Gary Bushey, SharePoint Server MVP Set myExportOptions = Nothing Sub ContentExit Management Server (CMS) is fast becoming a vital content-management tool that End If helps administrators and developers handle the ever-increasing amount of content on their
Web sites. However, an authoritative source of product information has been missing . . . until now. Now, to finish out our script, we've included some basic messages back to the administrator. Again, we're u the Msgbox objectManagement to indicate the status. However, in a noninteractive mode, you'll to remove these Microsoft Content Server 2002: A Complete Guide is the first book thatwant explains references. In Listing 21-3, we've provided the complete script from beginning to end. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage on the Microsoft platform. Listing 21-3content The complete export script This [Viewthorough full width] reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Call ExportCMSObjects() running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Sub ExportCMSObjects as: Dim myDeployObject Dim myExportOptions Chapter 6: How do you customize workflow? On Error Resume Next Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Set myDeployObject = Wscript.CreateObject("CmsDeployServer.CmsDeployExport.1") using Visual Studio .NET?
If ( Err.Number 0establish ) Then user rights? Chapter 17: How do you Call Msgbox(Err.Description, vbCritical, "Export Problem Creating Deployment Object") Chapter 22: How do you best deploy CMS according to your organization's needs, size, Set myDeployObject = Nothing and resources? Exit Sub End If32: How do you publish dynamic data? Chapter
Server side call to authenticate as current user. [ Team 'LiB ] Call myDeployObject.AuthenticateAsUser("WinNT://DOMAIN/cmsadmin","password") 'Call myDeployObject.AuthenticateAsCurrentUser() If ( Err.Number 0 ) Then Call Msgbox(Err.Description, vbCritical, "Export Problem Authenticating the Admin User") Set myDeployObject = Nothing Exit Sub End If
Set myExportOptions = myDeployObject.Options If ( Err.Number 0 ) Then Call Msgbox(Err.Description, vbCritical, "Export Problem Authenticating User" Set myDeployObject = Nothing • Table Contents SetofmyExportOptions = Nothing Microsoft ContentExit Management Server 2002: A Complete Guide Sub End ,Olga If Londer,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill English
' Include Rights groups and their members. ' Publisher: Addison Wesley ' IncludeRightGroups: (1) Do not export rights groups or users (default) Pub Date: October 31, 2003 ' (2) Export rights groups without members ISBN: 0-321-19444-6 ' (3) Export rights groups with members Pages: 1136 ' ' IncludeCreatedBy: (1) Do not include created by information ' (2) Include created by information (defau ' "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." myExportOptions.IncludeRightsGroups = 3 —Gary myExportOptions.IncludeCreatedBy Bushey, SharePoint Server MVP = 2 Content Management ServersdoDateQualifier (CMS) is fast becoming a vital content-management tool that Dim strPackageFileName, helps administrators and developers handle the ever-increasing amount of content on their Dim strReportUrl Web sites. However, an authoritative source of product information has been missing . . . until now. ' Create a date qualifier for creating unique export names
sdoDateQualifier = day(now()) & month(now()) & _ Microsoft Content Management Server 2002: A Complete Guide is the first book that explains year(now()) & hour(now()) & minute(now()) & second(now()) how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and ' Set a string with the name and path of the SDO file API to manage content on the Microsoft platform. strPackageFileName = "C:\BOTSConsultingSite" & sdoDateQualifier & ".sdo" This thorough reference explains the product architecture, then shows you how to create and ' Start theand deployment edit content use the workflow. Topic coverage includes CMS administration and security, ' The first option specifies the name of the export the Publishing API, deployment options, site configuration, andfile template development. A running example is used throughout the book to illustrate how important CMS features are ' The secondin option specifies time interval. A value implemented real-world Web site the development. Inside you'll find answers to such questions ' of 0 specifies to export all objects that have changed since as: ' the last export regardless of time. A value of 1 or greater ' specifies the age of objects, in minutes, to be exported. ' ForChapter example, a value 200 stipulates 6: How do youofcustomize workflow?that all objects that ' have changed in the last 200 minutes should be exported. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Studio .NET? ' Theusing lastVisual option specifies the channel to export. If no value ' is provided, the entire repository will be evaluated. All objects Chapter 17: How dochannel you establish user rights? ' from the specified and below will be evaluated if a value ' is provided. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? strReportUrl = myDeployObject.Export(strPackageFileName,0,"/Channels/botsconsulting") 32: How do)you publish dynamic data? If ( Chapter Err.Number 0 Then
[ Team Call LiB ] Msgbox(Err.Description, vbCritical, "Export Problem creating SDO File") Set myDeployObject = Nothing Set myExportOptions = Nothing Exit Sub End If
' Create a scripting host shell to provide feedback to the user ' and start a browser session for the export report. dim winShell Set winShell = Wscript.CreateObject("Wscript.Shell") ' Show the export report in a web browser Call Wscript.Echo("Export has completed successfully.") Call Wscript.Echo("Starting browser session to display the export report.") Call winShell.run("http://localhost" & strReportUrl) •
Table of Contents
Microsoft'Content Management 2002: A Complete Guide Dispose of the Server objects
Set ,Olga myDeployObject = Nothing ByBill English Londer, Shawn Shell , Todd Bleeker, Stephen Cawood Set myExportOptions = Nothing Set winShell = Nothing Publisher: Addison Wesley
EndPub Sub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
If you use the code we've provided, be sure to specify your domain name when authenticating as well as th appropriate export channel. Other than those two changes, the script should operate as described.
"This is one of those rare books that you will read to learn about the product and keep rereading to One find last those tidbits that you missed before." NOTE: mention—automated scripting is meant for incremental exports only; it's not meant to —Gary Bushey, SharePointfor Server MVPthe entire repository. If you want to export the entire repository, you provide a mechanism moving can use a SQL backup and restore or use the interactive SDM interface in Site Manager. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Import
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Onceto you've completed timeAdministrators to import the content. As we mentioned in the export section, how effectively unlockyour the export, power ofit's CMS. and developers alike will learn how we're going their to use theservers' client object to perform the import. This will allow us toCMS remotely connect to enhance Web scalability, flexibility, and extensibility by using features and to a CMS s to perform the import. API to manage content on the Microsoft platform.
For the most part, the import process is very architecture, similar to thethen export. For you the sake of create brevity, we provide the This thorough reference explains the product shows how to and following list and of the operations performed the import and we and share the script code in List edit content usegeneral the workflow. Topic coverageinincludes CMSprocess, administration security, 21-4. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Create the client-side import object.
Authenticate with the remote CMS server. As in the export example, we specify the credentials explici you could6:authenticate the current Windows user instead. Chapter How do you as customize workflow?
Set the import options (the various areContent in the comments of our code(CMS) example). Chapter 10: How do you develop forsettings Microsoft Management Server 2002 using Visual Studio .NET? Start the import process, pointing to the SDO file you want to process. The path has to be fully qualifie Chapter 17: How do you establish user rights? Show success and the import report. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Listing 21-4 The import code example Chapter [View full width]32: How do you publish dynamic data?
ImportCMSObjects() [Call Team LiB ] Sub ImportCMSObjects() Dim myDeployObject, myImportOptions Dim winShell On Error Resume Next Set myDeployObject = WScript.CreateObject("CmsDeployClient.CmsDeployImport.1")
•
If ( Err.Number 0 ) Then Call MsgBox(Err.Description, vbCritical, "Import Problem Creating Import Obje Set myDeployObject = Nothing Exit Sub Table of Contents End If
Microsoft Content Management Server 2002: A Complete Guide
' Authenticate against theBleeker remote server, either ByBill English , Olga Londer, Shawn Shell, Todd , Stephen Cawood
by stipulating the credentials ' or using the current Windows user credentials. These calls are similar to the ' authentication methods for the export process, except you must also provide ' the URL Wesley to the remote system. Both methods are shown below. Publisher: Addison Call myDeployObject.AuthenticateasUser("http://localhost/","WinNT://cmsdemo1 Pub Date: October 31, 2003 /cmsadmin","password") ISBN: 0-321-19444-6 'Call myDeployObject.AuthenticateAsCurrentUser("http://localhost/") Pages: 1136
If ( Err.Number 0 ) Then Call MsgBox(Err.Description, vbCritical, "Import Problem Authenticating Admin User") "This is one of Set those rare books that you will read to learn about the product and keep myDeployObject = Nothing rereading to find those Exit Subtidbits that you missed before." —Gary End Bushey, If SharePoint Server MVP
Content Management Server (CMS) is fast becoming a vital content-management tool that Set myImportOptions = myDeployObject.Options helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until If ( Err.Number 0 ) Then now. Call MsgBox(Err.Description, vbCritical, "Import Problem Creating Import Opti Set myDeployObject = Nothing Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Set myImportOptions = Nothing how to effectively unlock the power of CMS. Administrators and developers alike will learn how Exit Sub to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and End If API to manage content on the Microsoft platform.
' Set the import options This thorough reference explains the product architecture, then shows you how to create and ' IncludeCreatedBy (1) This will CMS set administration CreatedBy property of all imported edit content and use the workflow. Topic coverage includes and security, objects the Publishing API, deployment options, site configuration, and template development. A user running the script (default) running'example is used throughout the book to illustrate as howthe important CMS features are ' (2) Retain the CreatedBy properties of the implemented in real-world Web site development. Inside you'll find answers to such questions origin objects. If as: ' the original user does not exist in the destination, set the ' CreateBy property to the user executing Chapter 6: How do you customize workflow? the import. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 ' using Visual Studio .NET? ' RightsOnAdd (1) For objects that do not currently exist in the destination Chapter 17: How do you establish user rights? ' repository, leave all rights blank. ' (2) Inherit rights from the parent container Chapter 22: How do you best deploy CMS according to your organization's needs, size, (default) and ' resources? (3) Use the rights specified in the SDO ' Chapter 32: How do you publish dynamic data? ' RightsOnReplace (1) Keep the existing destination container rights. (defaul
[ Team 'LiB ] ' ' IncludeRightsGroups ' group already ' ' file. If the ' replace the user ' . (default)
(2) Use the rights in the SDO file. (1) Do not import any rights groups or users (2) Import rights groups without users.
If the
exists, keep the user list intact (3) Import groups and users included in the SDO rights group exists in the destination,
list with the one supplied in the SDO fil
myImportOptions.IncludeRightsGroups = 2 myImportOptions.RightsOnAdd = 3 • Table of Contents myImportOptions.RightsOnReplace = 2 MicrosoftmyImportOptions.IncludeCreatedBy Content Management Server 2002: A Complete = Guide 1 ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Dim strReportUrl ' Start the import Publisher: Addison Wesley
operation strReportUrl = myDeployObject.Import("c:\BOTSConsultingSite134200315235.sdo") Pub Date: October 31, 2003 ISBN: 0-321-19444-6
If ( Err.Number 0 ) Then Call MsgBox(Err.Description, vbCritical, "Import Problem Importing SDO") Set myDeployObject = Nothing Set myImportOptions = Nothing Exit Sub "This isEnd one If of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary 'Bushey, SharePoint MVP Provide messageServer that operation completed successfully and open Pages: 1136
' a browser to display the report ContentSet Management (CMS) is fast becoming a vital content-management tool that winShell Server = WScript.CreateObject("WScript.Shell") helps administrators and developers handle the ever-increasing amount of content on their Wscript.Echo("Import operation completed successfully.") Web sites. However, an authoritative source of product information been missing . . . until Wscript.Echo("Start a web browser to display importhas report.") now. Call winShell.Run("http://localhost" & strReportUrl, 7) Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ' Dispose of the objects how to effectively unlock the power of CMS. Administrators and developers alike will learn how Set myDeployObject = Nothing to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Set myImportOptions = Nothing API to manage content on the Microsoft platform. Set winShell = Nothing This thorough reference explains the product architecture, then shows you how to create and End content Sub edit and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Once you've completed your script, you should have a fully functional import process! implemented in real-world Web site development. Inside you'll find answers to such questions as:
Creating Profiles
Chapter 6: How do you customize workflow?
WhenChapter using SDM an do interactive mode, may want to preserve certainServer predetermined settings for a 10: in How you develop foryou Microsoft Content Management (CMS) 2002 deployment. For example, if you periodically need to export a specific set of objects, like new templates fro using Visual Studio .NET? development to production, you may want to create a profile. A profile allows you to preset deployment opt and save them17: in a file,do which can be used over and over again to perform a predetermined deployment. Chapter How you establish user rights?
ThereChapter are two22: types of do profiles in SDM. An CMS export profile stores allorganization's settings for a needs, predetermined export proc How you best deploy according to your size, Conversely, an import profile stores all the settings for a predetermined import process. Creating profiles fo and resources? semiregular export/import operations will ultimately save you time. Since we've covered a lot of ground in t chapter with regard to deployment, we're combining Chapter 32: How do you publish dynamic data? the creation of an export and an import profile in a mo generic description of creating a profile; both operations are similar enough that they don't require separate
[explanations. Team LiB ]
The first step in creating a profile is to start SDM interactively through Site Manager. Be sure to start SDM i appropriate mode for the profile you wish to create. For example, if you want to create an export profile, st SDM in export mode. If you're creating an export profile, select all the objects you wish to export. In an imp profile, you simply have to set how the import process occurs. Once you've finished making all the setting changes and/or selecting the objects, click the File menu. Next, click Save Import/Export Profile (Import or Export based on the mode you're in). Now, just browse to the directory where you want to save the profile provide the profile with a name, and click OK.
When you're ready to use your profile, begin by opening SDM in interactive mode through Site Manager. W SDM appears, click the File menu and choose Open Import/Export Profile. Once the profile has loaded, SDM automatically configure itself based on the settings in the profile. Now, just click the Import/Export button. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Automating Package Processing The scripts we provided in the previous sections give you the opportunity to automate the deployment process. However, to truly automate the deployment process, you need to be able to schedule running those scripts on some timed basis. We'll provide you with a brief explanation of using the Task Scheduler to help you with this process. The Task Scheduler is a utility that ships with Windows 2000/2003. It allows you to schedule jobs to run on the server without human intervention. In the case of our deployment, we want to be able to schedule the export and import scripts to run without our having to start them every time; in reality, you may end up combining the two scripts into one to provide more • Table of Contents seamlessContent deployment. HereServer is a list of instructions for scheduling our export task. Microsoft Management 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
1. Open the task schedule by choosing Start > Programs > Accessories > System Tools > Publisher: Addison WesleyIf the option is not listed, it may not have been installed on your server. Scheduled Tasks. Pub Date: October 31,the 2003 You can install utility through the Windows installation routine. ISBN: 0-321-19444-6
2. In Figure 21-9, you'll see the Task Scheduler interface. Double-click the Add Scheduled Pages: 1136 Task icon to start the Scheduled Task Wizard.
Figure 21-9. The Task Scheduler "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
3. Chapter When the wizard click Next. 10: How appears, do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 4. Click the Browse button when prompted for the application to run. Browse to the directory where your are establish stored, and select the VBS file you wish to run (Figure 21-10). Chapter 17:VBS Howfiles do you user rights? Click Open when you've made your selection. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Figure 21-10. Select your VBS file Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
5.Publisher: Type aAddison name Wesley for your task. The default is the name of the file you've selected. Pub Date: October 31, 2003
6. Select the reoccurrence. In our case, we've chosen to run the script daily (Figure 21-11). ISBN: 0-321-19444-6 However, you should choose the period that makes sense for you and click Next. Pages: 1136
Figure 21-11. Name your task and provide the timing "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
7. Since we've chosen Daily, we're asked to provide the time and start date of this daily task Chapter 6: How Once do you customize (Figure 21-12). you've madeworkflow? your selection, click Next. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 21-12. using Figure Visual Studio .NET?Choosing the time of day and the start date Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
8. Now, choose the credentials under which your job will run (Figure 21-13). If you're using Pub Date: October 31, 2003 AuthenticateAsUser in your script, you only need to provide credentials for a user with ISBN: 0-321-19444-6 authority to run jobs on your server. If you used AuthenticateAsCurrent User, you'll have Pages: 1136 to provide the credentials of a user who is either a channel manager or an administrator.
Figure 21-13. Entering credentials for the scheduled job "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
9. Chapter Finally, you'll be do prompted to finishworkflow? the configuration (Figure 21-14). Just click Finish. 6: How you customize Chapter 10:21-14. How do you develop Microsoft Content Management Server (CMS) 2002 Figure The final for confirmation prompt before adding the using Visual Studio .NET?
job
Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
After your job has been scheduled, it will show up in the list of scheduled jobs, shown in Figure Pub Date: October 31, 2003 21-15. ISBN: 0-321-19444-6
Pages: 1136
Figure 21-15. Our task has been added to the scheduled jobs on the server. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
[ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter we discussed how to deploy CMS packages. CMS provides a utility called Site Deployment Manager, which allows you to interactively import or export content. This utility also allows you to create profiles to eliminate the somewhat tedious tasks of reconfiguring a reoccurring import/export operation. In addition to the interactive SDM interface, CMS provides a rich deployment API. This COMbased API allows you to script incremental deployments. Once the scripts have been created, you can schedule those scripts through the Task Scheduler in Windows. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 22. Deployment Scenarios Overview Environments and Deployment Deployment Scenarios Deployment Guidelines •
Table of Contents
Summary Microsoft Content Management Server 2002: A Complete Guide [ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview Depending on the kind of application you're building with Content Management Server, it can be deployed in a number of ways. We'll start by discussing the various environments that may exist in any scenario. Then, we'll discuss how to combine the various environments for either an intranet or an Internet deployment. Finally, we'll discuss several guidelines for deploying your CMS site. Before deploying your CMS application, make sure that you fully analyze your requirements. In addition to this book, another resource is Microsoft, which provides best practices in its product documentation and informational articles on http://msdn.microsoft.com or on the Web at • Table of Contents http://msdn.microsoft.com/library/en-us/deploymt/htm/cms_de_deploy_hcte.asp. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Environments and Deployment It is a common practice in many firms to create separate environments within their infrastructure. Essentially, an environment is the collection of hardware, software, and staff to support your site at a given stage in the development cycle. The reason for this separation is to allow each environment to satisfy the needs of a specific audience or application without affecting any other. For example, a development environment would contain the hardware, software, and staff to support your developers and the creation or modification of functionality within your CMS-based Web application. This development environment typically has very early versions of code and/or components that are likely to be unstable or ill suited for a public or semipublic application. Since the hardware and software components in this environment are • Table of Contents constantly changing, potentially some features or functions while fixing others, the Microsoft Content Management Serverbreaking 2002: A Complete Guide development environment is the domain of the development staff only. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In this section we'll discuss various environments you may consider implementing as part of a typical deployment. One deployment could be made up of one or more environments discussed Publisher: Addison Wesley here. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Environment Guidelines Overall, your particular deployment strategy will be unique to your organization. In addition, a deployment may be different based on the audience that will be using the application. However, "This is one of those rare books that you will read to learn about the product and keep there are some basic guidelines that can be used in various forms to create an overall rereading to find those tidbits that you missed before." deployment strategy for your CMS application. —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that To begin, let's explore some of the questions you should ask as you plan your CMS helps administrators and developers handle the ever-increasing amount of content on their deployment. Who is the primary audience of your application? Are the users of your Web sites. However, an authoritative source of product information has been missing . . . until application internal to your company (and your network), are they external, or are they a now. mix? Public facing applications have additional security requirements and should be more "locked down" than applications that are completely internal. An example would be a Microsoft Content Management Server 2002: A Complete Guide is the first book that explains public Internet site verses an intranet application. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and How many content contributors will you have? How many content consumers will you API to manage content on the Microsoft platform. have? These questions will help you determine the number of CMS servers you'll need for a given environment. For more information on capacity planning, refer to Chapter 35. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Will you be hosting the CMS server internally or externally? If you're hosting CMS servers the Publishing API, deployment options, site configuration, and template development. A externally, you may want to limit the number of "moving" parts at the hosting provider. running example is used throughout the book to illustrate how important CMS features are In other words, you probably only want to have one environment at the hosting provider implemented in real-world Web site development. Inside you'll find answers to such questions and house all other environments internally. Also, most hosting services don't provide as: support for application servers like CMS, so it's a good idea to make sure that any environment that lives at a hosting provider be as clean as possible. Chapter 6: How do you customize workflow? Is the development of your CMS application done internally or externally? If it is primarily done externally, may be necessary to create a formal development environment; Chapter 10: Howitdo younot develop for Microsoft Content Management Server (CMS) 2002 the group or firm performing the development will handle this environment. However, you using Visual Studio .NET? may still want to have a quality assurance (QA) environment to allow your staff to properly 17: testHow the application in your environment. Chapter do you establish user rights?
Is there a need "test" Some organizations provide an extra review Chapter 22: Howtodo you content? best deploy CMS according toneed your to organization's needs, size, of the site, even beyond the typical workflow that CMS provides. If you have this and resources? requirement, you may need a content QA environment (sometimes called a staging environment). This allow data? various members of your organization to review Chapter 32: How doenvironment you publish will dynamic the complete Web site before it's published to the production environment.
[ Team LiBmany ] How developers are working on your site? The more developers you have, the more you need a technical QA environment where all the developers can contribute their code for testing. A technical QA environment will allow a group, other than the developers, to test all the components that have been written by the various developers. This environment could also be called "system test" since you're really doing a complete test of the application, as opposed to the component-level testing that a developer will typically perform. Another advantage of this environment is that it allows developers on the team to get the latest copies of code they're not writing.
How often does your content change? If your content changes frequently, you may want to create a content authoring environment. This environment will contain one or more CMS servers that are set up primarily to accept content from contributors.
of Contents Creating Table Environments
•
Microsoft Content Management Server 2002: A Complete Guide By English , Olga Londer , Shawn Shell, Todd InBill this section we'll briefly describe andBleeker show,Stephen differentCawood environment
types as they relate to CMS. Later, when we talk about specific deployment scenarios, we'll reference these environments to build a particular deployment. Publisher: Addison Wesley
ThePub most basic environment is a development environment. The development environment, as Date: October 31, 2003 discussed earlier, is where your developers will primarily work. This environment is made up of ISBN: 0-321-19444-6 a central server and all the development workstations your developers will be using. The Pages: 1136 central development server will run a copy of CMS and SQL. Both tools can be loaded on one physical box or they can be separate; the choice is up to you. This central CMS server will hold the "master" copy of all the templates and controls that make up your application. Because it's not possible to perform "remote" development on CMS (i.e., you can't remotely connect to a "This is one using of those rare books you willworkstation read to learn product keep along CMS server VS.NET), eachthat developer willabout have the its own copyand of CMS, rereading to find those tidbits that you missed before." with VS.NET. Each of the developer workstations will then connect to the central SQL server so —Gary Bushey, SharePoint Server MVP In this environment, each developer can develop their that they can share TGIs and postings. component of the application on their individual workstation. Once they're done, they either Content Management Server (CMS) is fast becoming a vital content-management tool that copy the component to the central server or simply check it in to the source control utility of helps administrators and developers handle the ever-increasing amount of content on their their choice. The development environment will likely be configured to use Windows Web sites. However, an authoritative source of product information has been missing . . . until authentication and have guest access disabled. Figure 22-1 shows a logical diagram of what now. this environment might be like. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Figure 22-1. A of CMS environment how to effectively unlock the power CMS.development Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Depending on the complexity of yourisapplication, youamay want a QA environment. This Content Management Server (CMS) fast becoming vitalalso content-management tool that environment will consist of one or more servers that can simulate your production helps administrators and developers handle the ever-increasing amount of content on their environment. The QAan environment may or may not have productionhas content, it will. . . until Web sites. However, authoritative source of product information been but missing certainly have all the "final" templates, user controls, or other components. Ideally, you will now. test all aspects of functionality and performance to determine if the application performs acceptably. If this Management environment Server is configured the same production environment, Microsoft Content 2002: exactly A Complete Guideasisyour the first book that explains you should be able to accurately predict the application's behavior once it's been moved tohow your how to effectively unlock the power of CMS. Administrators and developers alike will learn production CMS, scalability, in this environment, be configured forCMS Forms to enhance environment. their Web servers' flexibility, will and likely extensibility by using features and authentication allow your QAMicrosoft staff to test the different user roles. A picture of a QA API to manage to content on the platform. environment is provided in Figure 22-2. Keep in mind, when we cover the production environment, shouldexplains be able the to see similarities in the logical configuration some This thorough you reference product architecture, then shows you howwithout to create andof the physical network security. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the A book to illustrate how important CMS features are Figure 22-2. CMS QA environment implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API,does deployment options, siteon configuration, Authoring in CMS place a certain load a CMS serverand andtemplate providesdevelopment. the ability to A create running is used throughout the book to illustrate CMS features are content.example As a result, Microsoft recommends that you have how one important or more CMS servers dedicated implemented in real-world Web site development. you'll to such questions to content contribution. This environment not onlyInside reduces the find loadanswers on the production as: environment, but also provides additional security by removing unnecessary entry points to CMS. This environment will consist of one or more authoring servers running a server edition of Windows in addition to one or more servers running SQL Server. CMS, in this environment, will 6: How doWindows you customize workflow? likely Chapter be configured for authentication without guest access enabled. Depending on the number of content contributors you have, the authoring environment may or may not be Chapter 10: How do22-3 you we've develop for Microsoft Content Server (CMS) load balanced. In Figure provided a picture of an Management authoring environment; we 2002 show a using Visual Studio .NET? load balanced environment, even though it's not required. Chapter 17: How do you establish user rights?
Figure 22-3. An authoring environment for CMS
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance servers'additional scalability, flexibility, extensibility using CMS features and Some firms their want Web to perform quality tests and to ensure proper by application function. API to manage content on the Microsoft platform. Although the code should have already been tested in earlier QA phases, a staging environment
allows content-specific testing. This environment will allow you to perform additional quality This thorough reference explains the product architecture, then shows you how to create and tests on the site as it might look in production. Unlike the earlier QA environment, which may edit content and use the workflow. Topic coverage includes CMS administration and security, not contain production content, this environment will have both production content and a copy the Publishing API, deployment options, site configuration, and template development. A of all of the production code. As long as you do not need to perform additional load or running example is used throughout the book to illustrate how important CMS features are performance testing, it's unlikely that you'll need more than one server, running both SQL and implemented in real-world Web site development. Inside you'll find answers to such questions CMS. There may be some confusion between this environment and the QA environment we as: discussed earlier, since they seemingly accomplish the same thing. However, unlike the QA environment, the staging environment is primarily for taking one last look at the content that's been Chapter contributed and do pushing the content, templates, and code to production; think of the 6: How you customize workflow? staging environment as the last stop before your application goes live. The staging environment, like How the QA willMicrosoft likely useContent Forms authentication to allow the content Chapter 10: do environment, you develop for Management Server (CMS) 2002 to be using viewed by the various user roles that may be visiting your site. Visual Studio .NET? Chapter 17: How do you establish user rights? ChapterThe 22:staging How doenvironment you best deploy CMS according to yourtoorganization's needs, size, NOTE: is logically set up similarly the QA environment and resources? we've discussed here, so we didn't provide a figure. Chapter 32: How do you publish dynamic data?
lastLiB environment you need to create is the production environment. This environment will [The Team ] serve your site to all content consumers. You should have at least one database server and one CMS server. We would always recommend load balancing two CMS servers for any site, regardless of traffic; load balancing makes maintaining your Web servers easier by allowing you to take one down to install patches or software updates. In addition, load balancing provides application integrity by reducing downtime caused by hardware failure. You may also want to consider database server clustering. Depending on the kind of production environment you need, you could have one of several different authentication methodologies, such as Passport, Windows, or Forms; in an intranet environment, it's likely you'll use either Forms or Windows. For an Internet deployment, you'll probably use Passport or Forms, and you'll also enable guest (anonymous) access, whereas in an intranet environment, guest access will probably not be enabled. In Figure 22-4 we've provided a logical diagram of a typical production environment. •
Table of Contents
Figure 22-4. A production CMS environment
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Can You Combine the Authoring and Production Environments in One Physical Environment? There are various opinions on whether the authoring environment and the production environment can be the same. Microsoft generally recommends that the authoring environment and the production environment be separate for performance and security reasons. It is technically possible to combine both logical environments into one physical environment, but we would not recommend this configuration in a public site, although it may be appropriate for an intranet application. The primary reason, beyond security, not to combine the environments is performance—as you contribute content, you defeat your cache, thereby affecting performance (to what extent depends on your application). To determine the optimal configuration for your • Table of Contents organization, you should consult network and software architects to review your Microsoft Content Management Server 2002: A Complete Guide specific requirements. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Deployment Scenarios Now that we've had a chance to discuss the various environments, we can begin to put them together for specific deployment scenarios. Each of these deployment scenarios will describe a generic application focus, such as an intranet or an Internet deployment. These deployment scenarios are meant to provide some guidance when you are deploying your application. However, you should always consult network and application architects to evaluate your specific needs.
•
Table of Contents
NOTE: Extranet deployments share similarities with Microsoft Content Management Server 2002: A Complete Guide
both intranet and Internet applications. However, extranets should generally be deployed similarly to Internet ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood applications, since they technically serve users outside your physical network. Publisher: Addison Wesley Pub Date: October 31, 2003
Intranet ISBN: Deployment 0-321-19444-6 Pages: 1136
An intranet deployment describes how you might deploy a CMS-based application to a set of internal users. This application will also receive content from contributors inside your organization. One of the reasons you probably picked CMS for your intranet is that there are frequent content updates and/orthat you you wanted to distribute management thekeep intranet to "This is one of those rare books will read to learn the about the productofand the various thattidbits may own of the microsites. rereading togroups find those thateach you missed before." Of the environments we discussed earlier, Bushey, an intranet deployment typically —Gary SharePoint Server MVP includes a development environment, an authoring environment, and a production environment. In Figure 22-5 we've provided a somewhat abstracted "swim lane"Server drawing, which shows the flowa of templates and content from Content Management (CMS) is fast becoming vital content-management toolthe that different environments that may exist for an intranet deployment. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Figure 22-5. A typical intranet deployment Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
In Figure 22-5 you can see the basic flow from one environment to another. From the development environment to the authoring environment, you use Site Deployment Manager "This one of those rare TGIs booksand thatchannels you will as read toas learn about In theaddition, product you and would keep move (SDM)ismanually to move well galleries. rereading to find tidbits that you assets, missed such before." the template filesthose and other file-based as images and user controls. Microsoft —Gary Bushey, SharePoint Server MVPServer to move file-based assets. However, you can recommends using Application Center simply copy the files using XCOPY. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle ever-increasing amount of content on their Once the application-related components arethe copied to the authoring environment, content Web sites. However, an content. authoritative sourceisofcontributed, product information has been missing . . back . untilto contributors can create As content it is simultaneously deployed now. the development environment as well as to the production environment. Pushing content back to the development environment (a manual operation) allows the developers to work with Microsoft Management Server A Complete Guide Be is the first when book that explains productionContent content, simulating how the2002: site looks in production. careful you move how to effectively unlocktothe power of CMS. Administrators andtry developers will learn how content from authoring development, because SDM will also to move alike the templates to enhancewith theireach Webdeployed servers' scalability, flexibility, extensibility by usingisCMS features associated posting. The best wayand to handle this situation to create an and API to manage content on the Microsoft platform. SDO file with your TGIs and galleries. Then, import the new postings from the authoring environment and reimport the original TGIs you exported in the first step. This thorough reference explains the product architecture, then shows you how to create and edit and use the workflow. Topic coverage includes CMS administration security, to Aftercontent all of the content has been created, the production content and templates and are deployed the Publishing deployment options, site step configuration, and template development. production API, environment. This is the last in the process, where you're actually A running example used throughout book illustrate how important features "publishing" both is the application codethe and the to content produced in earlierCMS stages. The are implemented in real-world Web site development. Inside you'll find answers to such production environment, unlike the other environments, will be configured with only questions one readas: only entry point (see Chapter 18 for more information on creating entry points). Unlike moving templates or postings between development and authoring, moving content to production will likely be automated using an incremental script. For more information on scripted deployments, 6: 21. How do you customize workflow? refer Chapter to Chapter Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Internet Deployment
Chapter 17: How do you establish user rights?
An Internet deployment of CMS involves a few more steps than the intranet scenario. The Chapter 22: How do you best deploy CMS according to your organization's needs, size, Internet deployment and the intranet deployment share the development and authoring and resources? environments. However, given the public visibility of an Internet site, we would recommend adding some additional environments to properly test your application. In Figure 22-6 we Chapter 32: How do you publish dynamic data? provide a swim lane diagram that shows the progression of code and content in an Internet
[deployment. Team LiB ]
Figure 22-6. A typical Internet deployment
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how You should immediately notice scalability, the additional environments added to by theusing Internet to enhance their Web servers' flexibility, and extensibility CMSdeployment, features and the first of which is a QAonenvironment. adding a specific QA environment we're not API to manage content the MicrosoftBy platform. suggesting that testing is less important in an intranet deployment. In fact, we're simply This thorough reference the product architecture, then and shows you how to create suggesting that Internet explains applications tend to be more complex, because Internet sitesand are edit content use may the workflow. TopicThis coverage includes CMS andgroup security, public, more and testing be necessary. QA environment will administration allow a separate of the Publishing API, deployment options, site configuration, template development. individuals to perform load and performance testing as welland as full functionality testing. A Unlike running example is used throughout the book to illustrate how important CMS features are an intranet application, which has a predictable consumption audience, with a presumably implemented in software real-world Webbrowser site development. Inside you'll find answers toasuch questions standard set of (e.g., version, utilities), an Internet site has somewhat as: unpredictable traffic level, with users who have varied browser versions, desktop operating systems, and utility software. Chapter do you customize workflow? In addition to 6: theHow QA environment, the Internet deployment has a staging environment. The staging environment will provide an additional testing environment, which includes not only Chapter do you develop for Just Microsoft Management Server (CMS) 2002 finalized code,10: butHow all production content. as theContent earlier QA environment provided the using Visual Studio .NET? opportunity for rigorous testing of the application, the staging environment provides the same kind of environment for reviewing the content. You may be thinking that the QA environment Chapter 17: How do you establish user rights? theoretically takes care of content testing. However, traditional QA environments are primarily focused on application testing, not content testing. As a result, a real quality process isn't Chapter 22: How do you best deploy CMS according to your organization's needs, size, performed. For example, the staging environment will serve departments like marketing or and resources? legal, which may need to see "final" content in the context of the site before its deployment to the production environment. Chapter 32: How do you publish dynamic data?
addition [InTeam LiB to ] providing a final QA environment for content, the staging environment is the "launch pad" for deployment to the production environment. Depending on the size of your site and the amount of content changes, having a staging environment provides a virtually dedicated environment to deploying content to the production environment. The staging environment may run not only CMS, but Application Center Server for deploying file assets. In this way, you can be assured that all necessary objects for deploying to production are in one place. Further, any load that deployment places on equipment doesn't affect environments that are heavily active, like authoring.
CMS and Firewalls In this section, we'll provide a brief overview of the firewall issues as they relate to CMS. Obviously, this discussion could entail an entire book since firewall security is a highly complex and exhaustive area of study. So we don't claim this discussion is exhaustive; rather, we are • Table of Contents trying toContent point out some of Server the more basic considerations when it comes to deploying CMS on Microsoft Management 2002: A Complete Guide the Internet as it relates to your firewall structures. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
As for any external Web site, one of the biggest issues is the network topology required to support the CMS infrastructure. An example network topology for a CMS Internet site Publisher: Addison Wesley infrastructure is shown in Figure 22-7. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Figure 22-7. CMS Internet site infrastructure
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? In this example, there are two firewalls used to separate the production environment from the Chapter 17: How do you establish Internet and from the internal network. user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
First Firewall
Chapter 32: How do you publish dynamic data? The first firewall separates the production CMS servers from the Internet originating traffic. It
have 80 open for HTTP traffic, and if your site uses HTTPS, it must also have port [must Team LiB port ] 443 open for SSL. The production servers are clustered for scalability, with a network load balancer (NLB) that directs traffic to the servers to provide high availability and performance. Only the NLB IP address is exposed to the Internet. The advantage of NLB is that the clustered servers can all be accessed by a URL from the Internet.
NOTE: You can learn more about NLB by referencing the white paper Understanding Network Load Balancing from Microsoft.
Microsoft Application Center can be used for deployment of CMS assets, such as ASP.NET files and registry settings, from the staging environment to the production environment. If you are using Application you need to configure every production server in the cluster to use • Table Center, of Contents specifiedContent restricted TCP ports for DCOM. Microsoft Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: By default, DCOM can use any TCP port from 1024 to 65535. This is not a firewall-friendly configuration, because leaving such a wide range of ports open Pub Date: October 31, 2003 presents a big security hole. To this end, we need to restrict the number of DCOM ISBN: 0-321-19444-6 ports.
Publisher: Addison Wesley
Pages: 1136
It is recommended that you use ports in the range above 5000 and allocate 15 to 20 ports. To set upisDCOM restrictions, create registry key "This one ofport those rare booksusing that regedit32.exe you will read to learn the about the product and keep HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\Internet, add a value named Ports with the rereading to find those tidbits that you missed before." data type REG_MULTI_SZ, specify —Gary Bushey, SharePoint and Server MVPthe data value as 5000 to 5020. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators Second Firewall and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. The second firewall separates the production environment from the internal network, which hosts the CMS development environment as well as the content authoring and staging Microsoft Content Management Server 2002: A Complete Guide is the first book that explains environments. The site is deployed to the CMS production cluster from the staging how to effectively unlock the power of CMS. Administrators and developers alike will learn how environment. CMS Site Deployment uses port 80. If you plan to use the SCA on a production to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and server, you will need to open port 443. API to manage content on the Microsoft platform.
If you use Application Center for deployment, there are additional ports you need to open. This thorough reference explains the product architecture, then shows you how to create and Application Center requires that TCP ports 4243 and 4244 are open for data transfer, and TCP edit content and use the workflow. Topic coverage includes CMS administration and security, port 4242 is open for remote administration. You also need to open the DCOM ports that you the Publishing API, deployment options, site configuration, and template development. A configured on the production servers—for example, 5000 to 5020. In a DCOM environment, running example is used throughout the book to illustrate how important CMS features are clients discover the port associated with a particular object by connecting to and using the implemented in real-world Web site development. Inside you'll find answers to such questions services provided by DCOM's Service Control Manager (SCM). The SCM always operates at a as: fixed network port on every computer; this is always port 135 for both TCP and UDP. Depending on 6: your company security policy, you may consider changing the network topology Chapter How do you customize workflow? discussed in our example. For instance, you may use an additional firewall in the production environment separate and the SQL server hosting the (CMS) CMS Content Chapter to 10: How doCMS you production develop for servers Microsoft Content Management Server 2002 Repository 22-8)..NET? For simplicity, only one SQL server is shown; however, for resilience, using (Figure Visual Studio high availability, and scalability, SQL servers may be clustered. Chapter 17: How do you establish user rights?
Figure 22-8. CMS Internet site infrastructure, with production Chapter 22: How do you best deploy CMS according to your organization's needs, size, servers and SQL server separated by the firewall and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
The second Figure 22-8 requires additional portsabout to be open for communication with "This is one firewall of thoseinrare books that you will read to learn the product and keep the SQL server. default, thethat SQLyou server uses TCP port 1433 to receive data; this can be rereading to findBy those tidbits missed before." changedBushey, if required. The firewall should —Gary SharePoint Server MVP be configured to forward the production server IP address through the default port 1433 or through another TCP port configured for the SQL server toManagement receive data.Server The SQL server usesbecoming UDP porta1434 establish communications links Content (CMS) is fast vital to content-management tool that from applications; therefore, the firewall should also be configured to forward requests for helps administrators and developers handle the ever-increasing amount of content on theirUDP port 1434 the same address. source of product information has been missing . . . until Web sites.on However, anIP authoritative now. Once again, if you are using Application Center for deployment to the CMS production cluster using TCP,Content ports 4243 and 4244Server need to be open for dataGuide transfer, port 4242 forthat remote Microsoft Management 2002: A Complete is the first book explains administration, ports 5000 to 5020 for DCOM, and port 135 (both TCP and UDP) for how to effectively unlock the power of CMS. Administrators and developers alike will SCM. learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. NOTE: If reference you wish to providethe a full user architecture, acceptance testing (UAT) you environment for and This thorough explains product then shows how to create your CMS site, you need to replicate the firewall configuration using a separate edit content and use the workflow. Topic coverage includes CMS administration and security, perimeterAPI, network. the Publishing deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: How many firewalls to use in your environment must be defined based on the anticipated security risks and your company security policy. Chapter 6: How do you customize workflow? [ Team LiB ] 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Chapter using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Deployment Guidelines Regardless of the deployment scenario you're working with, there are some basic guidelines for deploying a CMS site. Create deployment profiles. Creating deployment profiles in SDM will eliminate the manual selection of objects to deploy and will reduce human error. You'll probably create several profiles for the manual deployments between environments. Use scripted incremental deployments for moving content to production. As content is Table of Contents added to the final environment, it can be moved automatically to production on a Microsoft Content Management Server 2002: A Complete Guide scheduled basis. •
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Make sure to move file-based assets to an environment before using SDM to move CMSbased assets. Moving CMS-based assets to an environment before the file-based assets Publisher: Addison WesleyFor example, if a TGI is moved to an environment before the template can cause errors. Pub Date: 31, 2003 file, allOctober postings dependent on that TGI will "break." ISBN: 0-321-19444-6
Use a SQL backup and restore to initially move a CMS database. Especially for large Pages: 1136 repositories, using a SQL backup and restore will be faster than using SDM. However, if you're moving a database between environments that use different Active Directory structures, you'll have to manually reconfigure the destination CMS environment so that it uses the appropriate tree and user IDs. "This is one of those rare books that you will read to learn about the product and keep rereading to find thoseup tidbits that you missed All environments to production should before." use a common Active Directory structure. In an —Gary Bushey, SharePoint Server MVP intranet deployment, all environments, including production, will likely use the same Active Directory structure. In an Internet deployment, however, the production Content Management (CMS) fast becoming vital content-management tool that environment will Server probably use aisseparate Active aDirectory structure. Keep this in mind helps when administrators and developers handle the ever-increasing amount of content on their you've moving TGIs, channels, or templates between environments. For most Web sites. However,you'll an authoritative source of product information missing . . . until environments, need to move groups and users along withhas thebeen content. However, now. when moving content from production, you may or may not need to move groups and users. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how [ Team LiB ] to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter we discussed how to deploy CMS. We started by discussing various environments that may make up a deployment scenario. These include a development environment, an authoring environment, and a production environment. After we provided the basic explanation for each environment, we discussed how to combine these environments into a deployment scenario. We specifically discussed deployment for an intranet and an Internet site. Finally, we provided some deployment guidelines to help you avoid some common pitfalls. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part VI: Publishing API Chapter 23. Introducing PAPI Chapter 24. Obtaining Context Chapter 25. Traversing Channels Chapter 26. Managing Postings •
ChapterTable 27. ofManipulating Placeholders Contents
Microsoft Content Management Server 2002: A Complete Guide
Chapter 28. Searching for CMS Assets [ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 23. Introducing PAPI There have been many APIs to grapple with over the years. We progressed from Win32 to Microsoft Foundation Classes (MFC) to Component Object Model (COM) to Application Template Library (ATL) to the .NET Framework. OK, we skipped a few; but sometimes you could get away with just a cursory understanding of the API. Not so with CMS. Rarely will anyone implement a CMS solution without interfacing with the CMS Publishing API, commonly referred to as PAPI. Fortunately, Microsoft created a .NET-based version of the PAPI in the latest CMS release. PAPI now exposes nearly every facet of the underlying CMS engine. • Table Framework, of Contents Microsoft even exposes the underlying base classes from which As with the .NET Microsoft Server 2002: A Complete Guide the CMS Content classesManagement are derived. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In this chapter, we will discuss the principal objects of PAPI and how they relate, and we will touch on the base classes and namespaces from which they derive. In addition, we introduce the Publisher: concept Addison of Context, Wesley the primary topic of the next chapter. Pub Date: October 31, 2003
Understanding the core CMS building blocks like channels, galleries, templates, postings, and ISBN: 0-321-19444-6 placeholders will be very helpful as we progress through these chapters. These concepts are Pages: 1136 covered in depth in previous sections in this book. There is much to learn, so let's get started. [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Who Will Need PAPI Since you are reading this book, it is most likely you. However, not everyone on a CMS project team will care about PAPI. Most of the predefined security roles, such as administrators, channel managers, resource managers, moderators, editors, authors, and subscribers, won't even be aware that PAPI exists. However, template designers, Web site engineers, application architects, and perhaps even information architects and operations personnel will be the key consumers of PAPI. If you have VS.NET on your desktop and are planning on coding using CMS, you will want to understand this API. Unlike manyTable of Microsoft's • of Contentsproducts, CMS does not have many wizards or shortcuts. Although it is true that CMSManagement integrationServer into VS.NET makes an excellent Microsoft Content 2002: A Complete Guide
template-building environment, for advanced CMS work, you will have to rely on PAPI. For example, PAPI will be required to ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood construct site navigation, summary templates, custom placeholders, and much more. [ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
.NET-Based versus COM-Based APIs Previous versions of CMS only had a COM-based API. However, Microsoft recommends using the .NET-based PAPI version discussed in this book for all new site development. If you have an existing CMS site that you want to migrate to the current release of CMS, the COM-based API will be helpful for this transition and has been enhanced to interact with the content stored in the newest CMS database schema. We briefly describe the COM-based API here. The COM-based API included in the current release of CMS is primarily for backward compatibility with existing CMS 2001 Web sites and ASP development in the current release of CMS. The COM-based API is divided into the two groups of objects that follow: • Table of Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English , Olga Londer , Shawn , Todd Bleeker , Stephen Cawood Publishing objects: AllShell previously available functionality
can be found in the Publishing group of COM components. However, a few methods and properties previously available in the Publishing group have been marked as deprecated. In all cases, newer methods Publisher: Addison Wesley and properties exist and provide developers with more control than the deprecated ones. Pub Date: October 31, 2003
Site Deployment ISBN: 0-321-19444-6 objects: This new group can be used to automate incremental deployment Pages: 1136 of CMS Web sites from a development environment to a production environment or more generally from any source environment to one or more target environments. "This is one of those rare books that you will read to learn about the product and keep rereading to The find COM-based those tidbitsAPI that before." NOTE: is you onlymissed discussed briefly in this section of our book. —Gary Bushey, SharePoint Server MVP Although the CMS Site Deployment functionality is only exposed through the COM-
based API, most other references in this book are to .NET-based PAPI. There is a Content Management Server (CMS) is fast becoming a vital content-management tool that complete set of documentation about the COM-based API on MSDN. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Even though parts of the .NET-based PAPI are currently just a veneer (APIs available in Microsoft Content Management Server 2002: A Complete Guide is the first book that explains previous versions of CMS are merely wrapped versions of the equivalent COM-based APIs, how to effectively unlock the power of CMS. Administrators and developers alike will learn how while the new APIs are managed code throughout), anyone doing new development is to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and encouraged to use these interfaces because they will be carried forward in future releases of API to manage content on the Microsoft platform. CMS, whereas the COM-based API will not. Microsoft wrapped the COM-based code using the .NET-based managed-code programming paradigm so thatthen programmers easily use This thorough reference explains the product architecture, shows youcould how more to create and the future interfaces in VS.NET and languages like ASP.NET, VB.NET, and C#. The .NET-based edit content and use the workflow. Topic coverage includes CMS administration and security, PAPIPublishing sports a clean, new object options, model. As weconfiguration, see in the next all development. objects in thatAmodel the API, deployment site andsection, template are accessed through one entry point called a Context. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Context as the Entry Point to PAPI A Context is the entry point into PAPI from which all interrelated publishing objects exist and can be accessed and manipulated.
NOTE: In previous versions of CMS, what we refer to as Context was called Autosession. Autosession is still available in CMS when you are using an ASP-based solution. We will be covering the ASP.NET-based solution. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In a Web site, when an ASPX page runs, a Context instance is established by CMS using the intrinsic credentials and mode of the HttpRequest found in the query string. From that Context every other object can be immediately accessed. These interrelated objects do not need to be Publisher: Addison Wesley created in order to be used, because CMS will have already initialized and instantiated all the Pub Date: October 2003 of the Posting or Channel we requested. The specific type of Context objects within the 31, Context 0-321-19444-6 createdISBN: by CMS on an ASP.NET Web site is a CmsHttpContext. Pages: 1136
We cannot create an instance of CmsHttpContext, but we can get a handle to the instance that CMS created for our HttpRequest using the Current property. Since only one CmsHttpContext is allowed per running HttpRequest, Current either will return the instance that CMS created or it will create, and return Context instance it does not yet "This is oneinitialize, of those rare books a that you will read toif learn about the exist. product and keep rereading to find those tidbits that you missed before." Unlike previous versions of CMS, the current release also allows for the creation of a Context in —Gary Bushey, SharePoint Server MVP a stand-alone solution potentially outside the confines of IIS. Using the CmsApplicationContext class, weManagement can instantiate a Context credentials of our choosing in the mode our Content Server (CMS)using is fastthe becoming a vital content-management toolofthat choosing. Although most of the objects in the model can be accessed in much the same way as helps administrators and developers handle the ever-increasing amount of content on their they are within a CmsHttpContext, the concept of a current Posting and a current Channel Web sites. However, an authoritative source of product information has been missing . . . until don't make sense and therefore aren't available. Specific Channels and Postings can certainly now. be located and manipulated using the Searches property. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and NOTE: Thecontent next chapter CmsHttpContext and CmsApplication Context in API to manage on the covers Microsoft platform. depth. The Searches property is covered in detail in Chapter 28. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Once weexample have a Context, we can access objects in the how object model. So, discuss what running is used throughout the the book to illustrate important CMSlet's features are we have at our disposal. implemented in real-world Web site development. Inside you'll find answers to such questions as:
[ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Principal Objects The PAPI object model illustrated in this chapter primarily focuses on the objects that are most commonly used. Objects in the model that correspond to the following entities in CMS are referred to as principal objects: Context, Channel, Posting, Template, TemplateGallery, Resource, ResourceGallery, Placeholder, and PlaceholderDefinition. These are all discussed in detail from an API perspective in the chapters that follow. Principal objects are the tangible objects that are frequently accessed in an ASPX code-behind in template files. For instance, dynamic navigation and breadcrumbs are typically generated using the channel hierarchy and Posting collections on nearly every page of most sites. •
Table of Contents
We haveContent also included in the object model the following Microsoft Management Server 2002: A Complete Guide
support objects in CMS, referred to as auxiliary objects: CustomProperty, CustomPropertyDefinition, Searches, SessionSettings, User, ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood and various collections (most of which are covered in the illustrated model). Some objects are not depicted in our PAPI object model. These objects implement a wide range Publisher: Addison Wesley of concepts in the current release of CMS but don't fit easily into a graphical representation. Pub include Date: October 31, 2003events (which enable code-based customization of workflow), the Web These publishing 0-321-19444-6 Author,ISBN: caching of whole and partial Web pages, limited security, and processing exceptions. Pages: 1136
[ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
PAPI Object Model The .NET-based PAPI object model includes all the traditional classes that CMS has always supported and some new classes as well. For instance, Templates are now accessible from the API. Although the root of all CMS objects is the Context in which the request was made, things can get a bit confusing because objects can contain collections of objects that in turn can contain collections of objects ad infinitum. These collections contain objects that have objects that point back to the containing collection and potentially even the Context. The cyclical nature of the object modelTable can of beContents somewhat daunting and difficult to illustrate. So, we break it into eight • separateContent relatedManagement submodels. Microsoft Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Object models typically show objects and collections of objects, and their relationship to one another. PAPI is represented in this way in Figures 23-1 through 23-8. To concisely represent the infinite possibilities of this model, we use markers to reference common objects found Publisher: Addison Wesley within the model. Table 23-1 shows which marker represents each PAPI object. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 23-1. PAPI object model—Context
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Figure 23-8. PAPI object model—Searches API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage onobject the Microsoft platform. So, we give youcontent the PAPI model, starting with Context (Figure 23-1). This thorough reference the product architecture, then shows how to create As stated earlier, Contextexplains is the entry point into the CMS object model.you As illustrated, we and can edit content and use the workflow. Topic coverage CMSthe administration and security, access the current Channel or the current Posting. includes Remember, CmsHttpContext object is the Publishing API, deployment site configuration, and template template file development. A instantiated and initialized in theoptions, ASP.NET DLL before an ASPX is run. In contrast, running example is used throughout the book to illustrate how important CMS features are the CmsApplicationContext object is instantiated manually by the developer, and it provides implemented in real-world Web site development. Inside you'll find answers to such questions access to a subset of objects that is nearly the same as the set of objects that are accessible as: through CmsHttpContext. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Table 23-1. PAPI Objects and Their Object Model Markers using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
PAPIObject
Object Model Marker
Channel Posting ResourceGallery TemplateGallery Template
•
Placeholder
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Searches
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
There is a polymorphic object (not illustrated in Figure 23-1) that provides access to the Publisher: Addison Wesley ChannelItem, which, depending on the current state of the request or the requested asset, will Pub Date: October 31, 2003 provide access to the current Posting, if available, or to the current Channel. ISBN: 0-321-19444-6 1136 There Pages: are references to the root object for each of the three hierarchies: RootChannel, RootResourceGallery, and RootTemplateGallery. Be aware that the roots will always be the built-in CMS objects called Channels, Resources, and Templates. So, if the Posting being viewed was in the leaf Channel of a hierarchy like this—/MyChannel/Cool Channel/SubChannel—the RootChannel SubChannel would beyou thewill built-in Channel than So, "This is one ofofthose rare books that readChannels to learn about therather product andMyChannel. keep a better representation would that look you like this—/Channels/MyChannel/CoolChannel/SubChannel. rereading to find those tidbits missed before." This is similar toSharePoint a hard drive, where C:\ is the root directory rather than one of the —Gary Bushey, Server MVP subdirectories. Content Management Server (CMS) is fast becoming a vital content-management tool that Searches is a powerful, potentially expensive, that can be used locateon specific helps administrators andif developers handle the property ever-increasing amount of to content their objects. WeHowever, describe an theauthoritative Searches objects in of Figure 23-8 and give example code for each Web sites. source product information has been missing . . . until property in Chapter 28. now.
The User object very weak in Server this release ThereGuide isn't very done Microsoft Contentis Management 2002:ofACMS. Complete is themuch first that bookcan thatbeexplains programmatically with the User object outside of a couple of names and whether the user in how to effectively unlock the power of CMS. Administrators and developers alike will learn is how theenhance Everybody group. to their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Lastly, the Context includes a SessionsSettings object that determines things like the automatic filtering of hidden items in collections and what locale an internationalized This thorough reference explains the product architecture, then shows yousite howwill to use. create and edit content and use the workflow. Topic coverage includes CMS administration and security, A Channel (Figure in a CMS Web site the conceptual equivalent folders (directories) the Publishing API,23-2) deployment options, siteisconfiguration, and templateof development. A in a Windows file system. Channels serve as containers for Postings and other Since running example is used throughout the book to illustrate how important CMS Channels. features are a Channel can contain other Channels, the Parent property is the Channel that the referencing implemented in real-world Web site development. Inside you'll find answers to such questions Channel is contained within. So, if we had a Channel hierarchy like as: this—/MyChannel/CoolChannel/SubChannel—the parent of SubChannel would be CoolChannel, the parent of CoolChannel would be MyChannel, and the parent of MyChannel would be the built-in Channels object. The customize parent of the built-in Channels object is null. Chapter 6: How do you workflow? Chapter 10: How do you23-2. develop for Microsoft Content Management Server (CMS) 2002 Figure PAPI object model—Channel using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product then shows how to create and NOTE: We will explore all aspects of the architecture, Channel object in the APIyou in Chapter 25. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented real-world site development. Inside you'll find answers to such questions On a Windowsinfile system, Web a subdirectory can contain other subdirectories and/or files. as: Similarly, Channels can contain other Channels or Postings. So, not surprisingly, there is a potential collection of Channel objects and a potential collection of Posting objects in every Channel. CMS also provides an all-encompassing collection called AllChildren that contains all Chapter 6: How the do you customize workflow? the members of both Channels and the Postings collections. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
NOTE: All CMS collections can be iterated using the .NET Framework's foreach Chapter 17: How do you establish user rights? syntax. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Each Channel has a potential collection of name/value pairs called CustomProperties. Some Chapter 32: How do you publish dynamic data? people use a CustomProperty to capture the constraints on an object. Each CustomProperty
an associated CustomPropertyDefinition. [has Team LiB ]
NOTE: We cover the use of channel custom properties in Chapter 16.
The DefaultResourceGallery and the DefaultTemplateGallery for a Channel contain the Resource objects and Template objects that authors are encouraged to use when creating new Postings in that Channel. However, authors are not limited to using only the default gallery; they can use any gallery that they have access to. If our code references either of these objects, and they have not previously been set to a value, CMS will throw a trappable error. A Posting (Figure 23-3) in a CMS Web site is a particular instance of a Template, combined with content for each Placeholders. Just as with a Channel, the Parent property of a Posting is • Table of of its Contents the Channel that the referenced is contained within. So, a Posting's Parent property has Microsoft Content Management ServerPosting 2002: A Complete Guide all the members that a Channel object has. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 23-3. PAPI object model—Posting Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
NOTE: We will explore all aspects of the Posting object in the API in Chapter 26. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 A ConnectedPosting shares Placeholder content with the referenced Posting. So, there is a using Visual Studio .NET? potential collection of ConnectedPostings. Checking the IsConnected property of a Posting will Chapter 17: How you establish user rights? establish whether theredo are ConnectedPostings or not. Likewise, there is a potential collection of ConnectedTemplates. A ConnectedTemplate represents the various ways that a given Chapter 22: can Howbe dorendered. you best deploy CMS according to your organization's needs, size, Posting's content and resources? Like the Channel object, each Posting object has a potential collection of name/value pairs 32: How do you publish dynamic data? calledChapter CustomProperties.
[ Team LiB ]
NOTE: We cover the use of posting custom properties in Chapter 5.
Every Posting will likely have one or more Placeholders in which content contributors put their content. So, naturally, there is a potential collection of Placeholder objects. Every Posting is based upon a specific Template, so just as naturally, there is a specific Template object for the referenced Posting. Postings can be changed over time. It is possible that the current Posting is not yet approved or published. So, PAPI provides the WorkingRevision Posting object as a way to get to an unpublished version of a Posting object in code. •
Table of Contents
A ResourceGallery (Figure 23-4) is a container for Resources and other ResourceGalleries in the CMS Resource hierarchy. It is a hierarchical structure that has parents and children, much like By BillChannel English, Olga Londer , Shawn Shell, Toddearlier Bleekerin , Stephen Cawood However, a ResourceGallery object the object that we discussed this chapter. contains multimedia Resource objects (including images) used to create Templates and Postings rather than the Postings themselves. Resources are basically content stored in the Addison Wesley CMSPublisher: Content Repository that are referenced by URLs from CMS Postings. Microsoft Content Management Server 2002: A Complete Guide
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 23-4. PAPI object model—ResourceGallery
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 32: How docan youcontain publishanother dynamic data? SinceChapter a ResourceGallery ResourceGallery, the Parent property is the
that the referenced ResourceGallery is contained within. So, if we had a [ResourceGallery Team LiB ] ResourceGallery hierarchy like this—/MyResourceGallery/CoolResourceGallery/SubResourceGallery—the parent of SubResourceGallery would be CoolResourceGallery, the parent of CoolResourceGallery would be MyResourceGallery, and the parent of MyResourceGallery would be the built-in Resources object. The parent of the built-in Resources object is null.
NOTE: We will explore the use of a resource gallery in Chapter 9.
There wouldn't be much use for a ResourceGallery without a collection of Resource objects. It isn't surprising that a referenced Resource object has a Parent property that identifies the ResourceGallery that Resource object is located. • Tablein ofwhich Contents Microsoft Content Management Server 2002: A Complete Guide
A TemplateGallery (Figure 23-5) is a container for Templates and other TemplateGalleries in the CMS Template hierarchy. It has parents and children much like the Channel object that we discussed earlier in this chapter. However, a TemplateGallery contains Template objects used to create Postings rather than the Postings themselves.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Pub Date: October 31, 2003
Figure 23-5. PAPI object model—TemplateGallery
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Visual Studio .NET? Sinceusing a TemplateGallery can contain another TemplateGallery, the Parent property is the TemplateGallery that the referenced TemplateGallery is contained within. So, if we had a Chapter 17:hierarchy How do you TemplateGallery like establish user rights? this—/MyTemplateGallery/CoolTemplateGallery/SubTemplateGallery—the parent of Chapter 22: How do you best deploy CMS according to your needs, would size, SubTemplateGallery would be CoolTemplateGallery, the parent of organization's CoolTemplateGallery and resources? be MyTemplateGallery, and the parent of MyTemplateGallery would be the built-in Templates object. The parent of the built-in Templates object is null. Chapter 32: How do you publish dynamic data?
[ Team LiB ] NOTE: We will explore the use of a template gallery in Chapter 9.
There wouldn't be much use for a TemplateGallery without a collection of Template objects. We illustrate the Template object in Figure 23-6.
Figure 23-6. PAPI object model—Template
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow?
A Template is the logical representation of a physical template file upon which one or more Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Postings may be based. Each Template object has a Parent property that indicates in which using Visual Studio .NET? TemplateGallery the referenced Template object can be found. Chapter 17: How do you establish user rights? The Parent object of a Template is the TemplateGallery that the referenced Template object is contained within. Template's has allto of your the members that aneeds, size, Chapter 22: So, Howa do you best parent deploy property CMS according organization's TemplateGallery object has. and resources?
Each Chapter Template32: hasHow a potential collection of ConnectedTemplates. Checking the IsConnected do you publish dynamic data? property of a Template will establish whether there are ConnectedTemplates or not.
[Similar Team to LiBthe ] Channel object, each Template object has a potential collection of custom values called CustomPropertiesDefinitions.
NOTE: We cover the use of templates in Chapter 12 and template custom properties in Chapter 10.
Every Template will likely have one or more PlaceholderDefinitions that describe the structure of the template file. So, naturally, there is a potential collection of PlaceholderDefinition objects. We illustrate the Placeholder object in Figure 23-7. •
Figure 23-7. PAPI object model—Placeholder
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Webpolymorphically servers' scalability, flexibility,aand extensibility using CMS features and A Placeholder object encapsulates particular type ofbycontent in a CMS API to manage content on the Microsoft platform. Posting. A Posting orchestrates the displaying of content in a collection of Placeholders based
upon the positioning and style dictated by an underlying Template (and template file), using This thorough reference explains the product architecture, then shows you how to create and PlaceholderDefinition objects as a logical reference to the physical placeholder controls found in edit content and use the workflow. Topic coverage includes CMS administration and security, the file system. The following is a list of the various placeholder types that come with CMS: the Publishing API, deployment options, site configuration, and template development. A AttachmentPlaceholder, HtmlPlaceholder, ImagePlaceholder, InvalidPlaceholder, running example is used throughout the book to illustrate how important CMS features are OfficeAttachmentPlaceholder, OfficeHtmlPlaceholder, and XmlPlaceholder. A developer can implemented in real-world Web site development. Inside you'll find answers to such questions create a custom Placeholder to handle unique content. as: Chapter 6: How do you customize workflow? NOTE: We will explore all aspects of the Channel object in the API in Chapter 25, and the Searches object thedevelop API in Chapter 28. We explored the use of Server Placeholders Chapter 10: How doinyou for Microsoft Content Management (CMS)in2002 Chapter 13. Studio .NET? using Visual Chapter 17: How do you establish user rights?
As important todeploy CMS, the object modeltofor them isn't very complex. Chapter as 22:Placeholders How do youare best CMS according your organization's needs, size, Logically, each Placeholder has an associated PlaceholderDefinition object. and resources? A Datasource object allows a Placeholder objectdata? to use a source other than CMS to save and Chapter 32: How do you publish dynamic load its data. Cool.
[The Team LiB ] referenced Placeholder will belong to a specific Posting, so there is a Posting object with all the members of a posting. This behaves much the same way you would expect a Parent property (which isn't available) would behave.
The Searches method enables you to search for Channels, Postings, Templates, TemplateGalleries, Resources, and ResourceGalleries that match specific criteria. As you can see depicted in the object model (Figure 23-8), most searches return a collection of objects, but there are three that return a single polymorphic object. The results of a search will typically need to be cast as a specific data type in order for the object to be assigned to a variable. The following two lines of code both are equally effective at casting the search result as a posting:
myPosting = CmsHttpContext.Current.Searches.GetByGuid(sGuid) as Posting; • of Contents myPosting =Table (Posting) CmsHttpContext.Current.Searches.GetByGuid (sGuid); Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The code in this book typically casts objects using the "as" keyword followed by the data type because it is easier for the code to flow to multiple lines, which is good for displaying code in a Publisher: Addison limited-width book.Wesley However, preceding the cast object with the data type in parentheses works well 31, in VS.NET. Pub just Date:as October 2003 ISBN: 0-321-19444-6
Like most CMS objects, the Searches object automatically takes into consideration the rights Pages: 1136 and privileges of the User, the current Mode, and the possibility that multiple versions of an object exist when performing a search. Deleted items are never returned. "This is LiB one]of those rare books that you will read to learn about the product and keep [ Team rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Relationship between Principal Objects With a little thought, we can mostly infer relationships between the principal objects from the object model. Relationships written as business rules (similar to the cardinality and optionality that might be captured for a database model) follow: A CmsHttpContext has one and only one current Channel. •
Table of Contents A CmsHttpContext may have zero or one current Posting.
Microsoft Content Management Server 2002: A Complete Guide
A CmsApplicationContext has no current Channel. ByBill English , Olga Londer, Shawn Shell , Todd Bleeker, Stephen Cawood A CmsApplicationContext has no current Posting. Publisher: Addison Wesley
Any Context has one and only one RootChannel.
Pub Date: October 31, 2003
ISBN: 0-321-19444-6 Any Context has one and only one RootResourceGallery. Pages: 1136
Any Context has one and only one RootTemplateGallery. Any Context has one and only one Searches engine. "This is one of those rare books that you will read to learn about the product and keep Any Context has one andthat onlyyou onemissed User. before." rereading to find those tidbits —Gary Bushey, SharePoint Server MVP Any Context has one and only one SessionSettings. Content Management Server (CMS) is fast becoming a vital content-management tool that If a Channel includes the following objects—Channel, RootChannel, Parent as Channel, and helps administrators and developers handle the ever-increasing amount of content on their member of a ChannelCollection—then the following rules apply: Web sites. However, an authoritative source of product information has been missing . . . until now.
A Channel may have zero or one Parent as Channel. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to unlock power of CMS. Administrators and developers alike will learn how A effectively Channel may havethe zero or one collection of Channels. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API toAmanage on the platform.of Postings. Channel content may have zeroMicrosoft or one collection This thorough reference explains architecture, then shows you how to create and A Channel may have zero orthe oneproduct collection of CustomProperties. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment options, site configuration, and template development. A A ChannelAPI, may have zero or one DefaultResourceGallery. running example is used throughout the book to illustrate how important CMS features are A Channel may have zero DefaultTemplateGallery. implemented in real-world Web or siteone development. Inside you'll find answers to such questions as: If a Posting includes the following objects—Posting, WorkingRevision, and member of a PostingCollection—then the following rules apply: Chapter 6: How do you customize workflow?
A Posting10: hasHow onedo and only one Parent as Channel. Chapter you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? A Posting may have zero or one collection of ConnectedPostings. Chapter 17: How do you establish user rights? A Posting may have zero or one collection of ConnectedTemplates. Chapter 22: How do you best deploy CMS according to your organization's needs, size, A Posting may have zero or one collection of CustomProperties. and resources? A Posting32: may have or one collection of Placeholders. Chapter How do zero you publish dynamic data?
A Posting [ Team LiB ] has one and only one Template. A Posting may have zero or one WorkingRevision as Posting. If a ResourceGallery includes the following objects—ResourceGallery, RootResourceGallery, Parent as ResourceGallery, DefaultResourceGallery, and member of a ResourceGalleryCollection—then the following rules apply: A ResourceGallery may have one or zero Parents as ResourceGallery. A ResourceGallery may have zero or one collection of ResourceGalleries. A ResourceGallery may have zero or one collection of Resources. •
A Resource has one and only one ResourceGallery. Table of Contents
Microsoft Content Management Server A Complete Guide If a TemplateGallery includes the 2002: following objects—TemplateGallery,
Parent as TemplateGallery, TemplateGallery, and member By Bill English , Olga Londer, ShawnDefault Shell, Todd Bleeker, Stephen Cawood
RootTemplateGallery, of a
TemplateGalleryCollection—then the following rules apply: Publisher: Addison Wesley
A TemplateGallery may have one or zero Parents as TemplateGallery.
Pub Date: October 31, 2003
0-321-19444-6 AISBN: TemplateGallery may have zero or one collection of TemplateGalleries. Pages: 1136
A TemplateGallery may have zero or one collection of Templates. If a Template includes the following objects—Template and member of a TemplateCollection—then the following rules "This is one of those rare books that you will apply: read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP A Template has one and only one Parent as TemplateGallery. Content Management Server (CMS) is fast becoming a vital content-management tool that A Template may have zero or one collection of ConnectedTemplates. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, authoritative source of product information has been missing . . . until A Template mayan have zero or one collection of CustomProperty Definitions. now. A Template may have zero or one collection of PlaceholderDefinitions. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to unlock of CMS. Administrators and developers alike will learn how A effectively Template has one the andpower only one SourceFile. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manage content the Microsoft platform. If a to Placeholder includeson the following objects—Placeholder and member of a PlaceholderCollection—then the following rules apply: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, A Placeholder has one and options, only onesite Definition as Placeholder Definition. the Publishing API, deployment configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are A Placeholder has oneWeb and site onlydevelopment. one DataSource. implemented in real-world Inside you'll find answers to such questions as: A Placeholder has one and only one Posting.
Searches will be at customize length in Chapter 28. Chapter 6: discussed How do you workflow? [ Team LiB ] 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Chapter using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Base Classes As previously mentioned, in the .NET-based PAPI, Microsoft has exposed the underlying base classes from which the CMS classes are derived. These classes are typically not intended to be instantiated. They are exposed for the purpose of highlighting class inheritance as an important aspect of the .NET programming paradigm. Let's put the CMS Context classes into context (Figure 23-9). The items with dotted lines are discussed in other chapters in this book. •
Table of Contents Figure
23-9. CMS Context context
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is that explains The System.Object class is the ultimate superclass of all classes in the the first .NETbook Framework. As how effectively the of CMS. Administrators and developers alikelow-level will learn how such to it supports allunlock classes in power the .NET Framework class hierarchy and provides to enhance their Web servers' scalability, flexibility,isand by using features and services to classes derived from it. System.Object the extensibility root of the .NET type CMS hierarchy. API to manage content on the Microsoft platform. CMS derives CmsContext, the base class for all classes that allow you to access PAPI, from This thorough reference explains class the product architecture, then shows how tocommon create and System.Object. The CmsContext provides the base properties andyou methods to edit content and use workflow. TopicWeb coverage CMS administration security, CmsHttpContext (thethe context of a CMS page),includes CmsApplicationContext (the and context when the Publishing API, URL deployment options, site configuration, and template development. A and there is no posting involved, as is the case in Web Services, stand-alone applications, running example is used throughout the book to illustrate how important CMS features are Web pages that need a context other than the one handed them by CMS), and Autosession implemented in real-world Web siteof development. Inside you'll such questions (the context used in older versions CMS and in ASP pages forfind theanswers current to release of CMS). as: We discuss the first two of these contexts separately in Chapter 24.
Interestingly, Microsoft has included one additional level of abstraction called CmsAspContext. Chapter 6: How doinherits you customize workflow? This intermediate class a lot of its functionality from CmsContext but adds critical functionality for accessing channel- and posting-specific content common to both Chapter 10:and HowAutosession do you develop Microsoftcomponent Content Management (CMS) 2002 CmsHttpContext (this for COM-based is included Server for backward using Visual Studio .NET? compatibility with previous versions and for ASP-based CMS development). So, CmsAspContext and CmsApplicationContext are on the same level in the class hierarchy, but we will never Chapter 17: How do you establish user rights? interact directly with CmsAspContext. Chapter 22: How do you best deploy CMS according to your organization's needs, size, The HierarchyItem class provides the base functionality for dealing with all three CMS and resources? hierarchies. ChannelItem, ResourceGalleryItem, and TemplateGalleryItem all provide the unique functionality common for their respective hierarchy. Chapter 32: How do you publish dynamic data?
[Similarly, Team LiBthe ] CmsCollection class provides the base functionality for dealing with CMS collections. CmsManagedCollection, HierachyItemCollection, and ChannelItemCollection then provide the various specific collections with the unique functionality common for their respective collections.
Placeholder and PlaceholderDefinition provide the base functionality for dealing with CMS Placeholders, while LegacyPlaceholder provides functionality for placeholder types used in previous versions of CMS. CMS has nine types of exceptions that all inherit their base functionality from the CmsException and CmsPublishingException base classes. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Exploring Namespaces Although this concept is not necessarily new, the .NET Framework adopted the concept of a namespace. Think of a namespace as a way to categorize classes so that they are easy to find. For the same reason you use meaningful subdirectory names in a file system rather than keeping all your files in the root, CMS classes are organized into ten meaningful namespaces (generally referred to as PAPI).
.Publishing Namespaces
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The CMS .Publishing namespaces are by far the largest group of classes, referencing nearly groups that follow:
By Bill English , Olga Shell,are Toddsubdivided Bleeker, Stephen Cawood every aspect of aLonder CMS,Shawn site. They into the four
Publisher: Addison Wesley Microsoft.ContentManagement.Publishing
namespace: This group contains the core with CMS, such as obtaining Context (Chapter 24), traversing channels (Chapter 25), managing postings (Chapter 26), and locating assets (Chapter ISBN: 0-321-19444-6 28). These Pages: 1136 and other classes are all accomplished through this namespace.
classes used 31, to interact Pub Date: October 2003
Microsoft.ContentManagement.Publishing.Events namespace: This group contains classes used for reacting to things that are happening when users are interacting with CMS. Extending the default CMS publishing workflow (Chapter 31) and responding to "This workflow is one of those rare books that6) you read to that learncan about the product and keep and events (Chapter arewill key tasks be accomplished using classes in rereading to find those tidbits that you missed before." this namespace. —Gary Bushey, SharePoint Server MVP Microsoft.ContentManagement.Publishing.Extensions.Placeholders namespace: Content Server (CMS) is for fastmanipulating becoming a vital content-management that ThisManagement group contains classes used placeholder definitions (for tool placeholder helps controls administrators developersnamespace). handle the ever-increasing amount of content their see theand .WebControls There are classes for each distincton type of Web sites. However, an HTML, authoritative of product information hasspecifically been missing . . . Word until content, including images,source XML, and attachments. Classes for MS now. are found in the final .Publishing namespace. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Microsoft.ContentManagement.Publishing.Extensions.Placeholders.Office how to effectively unlock the power of CMS. Administrators and developers alike will learn how namespace: This group contains classes used for manipulating placeholder definitions to enhance theirby Web scalability, flexibility, by using features and populated theservers' Authoring Connector (Chapterand 7).extensibility There are classes for CMS Office HTML and API toOffice manage content on the Microsoft platform. attachments. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, .Web Namespaces the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented real-world Web development. you'll find suchapplications questions The CMS .Webinnamespaces are site automatically usedInside for working withanswers ASP.NETtoWeb as: and are subdivided into the three groups that follow: Chapter 6: How do you customize workflow? Microsoft.ContentManagement.Web namespace: This group contains classes used for ensuring that CMS-enabled Web applications properly release resources, extending the Chapter How do you developtofor Microsoft Content Management Server (CMS) 2002 ASP.NET10: OutputCache directive support caching by several new VaryByCustom using Visual Studio .NET? attributes: CmsPosting, CmsControl, CmsRoles, CmsUser, and so on. This namespace is referenced by VS.NET by default and should not be removed unless you intend to handle Chapter 17: authentication How do you establish user rights? caching and in a proprietary way. Chapter 22: How do you best deploy CMS according to your organization's size, Microsoft.ContentManagement.Web.Caching namespace: This groupneeds, contains and resources? classes used for registering a cache validation callback for the current posting, not caching
unpublished content, and spoiling the cache when changes are made within the CMS Chapter 32: How do you publish dynamic data? server.
Microsoft.ContentManagement.Web.Security namespace: This group contains [ Team LiB ] classes used to ensure that all users are authenticated, for managing both CMS and ASP.NET authentication tickets (cookies).
.WebControls Namespaces The CMS .WebControls namespaces automatically manage placeholder controls, helper controls, and console controls. They are subdivided into the three groups that follow: Microsoft.ContentManagement.WebControls namespace: This group contains classes used for manipulating intrinsic and custom placeholder controls (Chapters 13,27, and29), including retrieving saved content and saving new content, and managing authoring, and error mode containers. This namespace is referenced by • Tablepresentation, of Contents VS.NET byManagement default andServer should notAbe removed. Microsoft Content 2002: Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Microsoft.ContentManagement.WebControls.Console Controls namespace: This group contains classes used for manipulating and responding to console-specific controls and events, dictating what you want to happen when a posting is published, and Publisher: Addison Wesley automatically naming the creation of a new posting. Pub Date: October 31, 2003
ISBN: 0-321-19444-6 Microsoft.ContentManagement.WebControls.Design namespace: This group contains classes used to provide the user interface for design-time editing of Pages: 1136 PlaceholderToBind property values in VS.NET. CMS uses this class to manage the user interface that you see when you are setting up a placeholder definition. This is the namespace you would override to change the default design-time interface for this editor. is of notthose a common need.that you will read to learn about the product and keep "This This is one rare books
rereading to find those tidbits that you missed before." If you have spent any time working with the .NET Framework, you probably already know —Gary Bushey, SharePoint Server MVP about referencing namespaces. Similarly to the way header files in C++ or Project References in legacyManagement VB are handled, VS.NET first needs to be able to find the appropriate DLLs that Content Server (CMS) is fast becoming a vital content-management tool that contain the classes you want to use in your project. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until To reference a namespace in a VS.NET project, expand the built-in References folder from the now. Solution Explorer window, and you will see the DLLs that VS.NET includes in the project by default. PAPI .Publishing, .Web, Server .WebControls, many Guide others is should be listed. Right-click Microsoft Content Management 2002: Aand Complete the first book that explainsthe built-in References folder and select Add Reference (Add Web Reference is for referencing how to effectively unlock the power of CMS. Administrators and developers alike will learn Web how Services) from pop-up menu (Figure 23-10). to enhance theirthe Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Figure 23-10. Add Reference in VS.NET This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
A quickISBN: browse through the list of .NET assemblies in the resulting Add Reference dialog may 0-321-19444-6 still leave you wondering where the CMS DLLs live. Click the Browse button and navigate to the Pages: 1136 following default installation directory (if CMS is installed in another directory, you will need to use that installation path to find them): C:\Program Files\Microsoft Content Management Server\Server\bin\*.dll (Figure 23-11). "This is one of those rare books that you will read to learn about the product and keep Figure Selecting rereading to find those tidbits that23-11. you missed before." CMS DLLs —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Notice that many of the DLLs have exactly the same name and a one-to-one correspondence Chapter 17: How Nice. do you establish user rights? with their namespace. Some namespaces have been consolidated into a single DLL. That is OK too. The DLLs that you will most commonly reference are .Common.dll, .Publishing.dll, Chapter 22: How do you best deploy CMS according to your organization's needs, size, .Publishing.Extensions.Placeholders.dll, .Web.dll, and .WebControls.dll. and resources? Now that the VS.NET project knows where to find the DLLs that contain the namespaces Chapter 32: How do you publish dynamic starting with Microsoft.ContentManagement, wedata? can reference them independently in each of our Web Form (ASPX) and Web Control (ASCX) pages. At the top of the code-behind file for
pages, [these Team LiB ] where we need to use a class from any of the ten namespaces that we discussed earlier, we simply include a statement using that namespace. So, for instance, if we wanted to get the CMS current Context (Figure 23-12), we would include the following statement:
using Microsoft.ContentManagement.Publishing
Figure 23-12. Namespaces used in CMS Template
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their [ Team LiB However, ] Web sites. an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary We covered a lot of ground to become familiar with the foundations of PAPI. In this chapter we established that nearly every CMS project will need to use PAPI. We discussed the need for a new .NET-based PAPI, and we touched on the legacy COM-based API. We introduced the concept of Context and its importance to the CMS infrastructure. We discussed the details about significant objects found in the PAPI object model, the principal objects among them, and their relationship to one another. We talked about the base classes (common functionality) and namespaces (class organization) used by PAPI. In the next chapter, we delve deep into CMS Context, the key to accessing all other CMS objects. •
Table of Contents
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 24. Obtaining Context Now that we've been introduced to PAPI, let's dig in a little deeper. In order to interact with PAPI, we will need to gain access to a CMS entry point commonly referred to as a CMS Context. The dictionary defines "context" as the interrelated conditions in which something exists or occurs. CMS defines Context as the entry point into PAPI from which all interrelated publishing objects exist and can be accessed and/or manipulated. Said another way, Context is the only way to programmatically get to CMS functionality. • [ Team LiB ]Table of Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CMS Context Figure 24-1 depicts the boundaries of a CMS Context.
Figure 24-1. CMS Context
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock power CMS. Administrators and developers alike will how Fromtothe CMS Context wethe can, givenofsufficient user rights, access and manipulate alllearn channels, to enhance their Webchannel servers'(if scalability, flexibility, and extensibility CMS including features and including the current there is one); access and manipulateby allusing postings, the API to manage platform. objects that they contain; access and current posting content (if thereon is the one)Microsoft and the placeholder
manipulate both the template gallery and the resource gallery, including everything that they This thorough reference explains the product architecture, then shows you how to create and contain; and access and manipulate templates and their placeholder definitions. We can only edit content and use the workflow. Topic coverage includes CMS administration and security, access a few characteristics about the current user, and, unfortunately, we cannot manipulate the Publishing API, deployment options, site configuration, and template development. A the CMS security structure. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: NOTE: We cover setting up user rights in detail in Chapter 17. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 It is also possible to create temporary PlaceholderControls, but template files cannot be using Visual Studio .NET? permanently altered through PAPI. Chapter 17: How do you establish user rights? The two types of Context we explore in this chapter are CmsHttp Context and CmsApplicationContext. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[Scratchpad Team LiB ]
You are going to need a way to see the results of the code we write throughout Part VI. Sometimes it helps to simplify the environment so that you know everything that went into its creation. Most of what we do in these chapters will be the equivalent of using a scratchpad to do math problems. In the end, it isn't what is on the scratchpad that has any value; it is the principles that you learned from what you did on the scratchpad. Anything that is done of any consequence can be readily ported to your real project. Steps for creating the Scratchpad posting used throughout Part VI: Create a new channel. (See Chapter 16 for help with creating channels.)
• 1. Using Site TableManager of Contents as a CMS administrator, create a new channel called Microsoft Content Management Server 2002: A Complete Guide
Scratch. Just take all the defaults.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
2. In the Properties of the new Scratch channel, select the Publishing tab and remove all text, if any, from the Script URL text box in the Channel Rendering section. Publisher: Addison Wesley Pub Date: October 31, 2003
Create a new VS.NET project. (See Chapter 10 for help with creating projects.) ISBN: 0-321-19444-6
Pages: 1136
3. Using VS.NET, create a new C# project called http://localhost/vsScratchpad using the MCMS Web Application template. "This is one of those rare books that you will read to learn about the product and keep 4. When as missed a CMS administrator. rereading toprompted, find those authenticate tidbits that you before." —Gary Bushey, SharePoint Server MVP Create a new template file. (See Chapter 12 for help with creating a template file.) Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web an Solution authoritative source of aproduct information has been missing . . . until 5. sites. UsingHowever, the VS.NET Explorer, add New Item called now. ScratchpadTemplate.aspx using the MCMS Template File template. Microsoft Content Management Server 2002: A Complete Guide is thethe first book that explains 6. In the Properties of the new ScratchpadTemplate.aspx, change pageLayout how tofrom effectively unlock power of CMS. Administrators and developers alike will learn how GridLayout to the FlowLayout. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manage content on theForm Microsoft platform. 7.toDrop the following Web controls onto the ScratchpadTemplate.aspx Design palette: TextBox, Label, ListBox, and Button. This thorough reference explains the product architecture, then shows you how to create and edit usekey theafter workflow. Topic coverage CMSon administration 8. content Use theand Enter each control to place includes each control its own line. and security, the Publishing API, deployment options, site configuration, and template development. A running example usedofthroughout theLabel, book to illustrate important CMS features are 9. Change the is width the TextBox, and ListBoxhow to 600px. implemented in real-world Web site development. Inside you'll find answers to such questions 10. Drop the DefaultConsole.ascx from the Console directory onto the as: ScratchpadTemplate.aspx Design palette after the Web Form Button control. 6: How youForm customize 11. Chapter Double-click thedo Web Buttonworkflow? control to create the Button1_Click function in the code-behind window. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studiodefinition. .NET? Create a new template (Again, see Chapter 12 for help with creating a template definition.) Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, 12. and Using the VS.NET MCMS Template Explorer, create a new template called resources? ScratchpadTemplate. Chapter 32: How do you publish dynamic data? 13. In the TemplateFile property of the new ScratchpadTemplate, enter the text
12.
13. "/vsScratchpad/ScratchpadTemplate.aspx" or select the [ Team LiB ] ScratchpadTemplate.aspx file. 14. Select Build Solution from the VS.NET Build menu. Create a new posting based upon the new template in the new channel. (See Chapter 5 for help with creating a posting.)
15. Using Internet Explorer, browse to the Scratch channel: http://localhost/Scratch. 16. When prompted, authenticate as a CMS administrator. If you get the Homeport page instead of the channel Welcome page, you forgot to remove the Script URL in step 2 when creating the channel. You can do it now.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
17. Click the Switch to Edit Site link, click the Create a New Page link, click the ByBill English , Olga Londer , Shawn Shell , Todd Bleeker , Stephen Cawood Templates link under the Template Gallery column, and select the ScratchpadTemplate. 18.Publisher: Click the Save New Page link. Addison Wesley Pub Date: October 31, 2003
19. In the resulting dialog, enter "Pad" into the Name text box and click the OK ISBN: 0-321-19444-6 button. Pages: 1136
20. Click the Approve link and then close Internet Explorer. Open Internet Explorer and browse to http://localhost/Scratch/Pad to see the Pad posting (Figure 24-2)rare we books created. You may required to about authenticate. "This is one of those that you willbe read to learn the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Figure 24-2. Scratchpad in Internet Explorer Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Now we can repeatedly enter code into the Button1_Click function of the underlying template file, 17: refresh and see results of that code in this posting. Chapter Howthe do browser, you establish userthe rights? Sweet. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? [ Team LiB ] Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CmsHttpContext CmsHttpContext is an object that represents the ASP.NET entry point into PAPI. It is instantiated by CMS on our behalf when we are interacting with a CMS-aware Web application. CMS gets the four pieces of information it needs to create a CmsHttpContext primarily through the QueryString: Authenticated user •
Publishing mode
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Channel
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Posting In aPublisher: Web application, either the user is authenticated by the application using Integrated Addison Wesley Windows security, Forms-based authentication, propriety authentication, IIS anonymous access Pub Date: October 31, 2003 using the ASP.NET and IUSR_Machinename users, or guest access is enabled and CMS ISBN: 0-321-19444-6 authenticates the user using the guest account. There are variations on each of these security Pages: 1136 approaches, but in all cases the user is authenticated as a specific user.
"ThisNOTE: is one of thoseguest rare books you willon read to learn about the product Unless accessthat is enabled, pages where the user has notand yet keep rereading to find those thatlogin you form), missedthe before." authenticated (liketidbits a typical CmsHttpContext will return an access —Gary Bushey, SharePoint Server MVP denied error. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative of product beenfor missing . . . until The URL QueryString usually specifiessource a specific posting information in a specific has channel CMS to now. retrieve. It will also typically contain the publishing mode for CMS to create the Context in. If a publishing mode is not provided, the mode defaults to Published. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft NOTE: In previous versions of CMS,platform. what we refer to as Context was called Autosession. Autosession is still available in CMS when you are using an ASP-based This thorough reference architecture, then shows you how to create and solution. We will be explains coveringthe theproduct ASP.NET-based solution. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in sample real-world Web siteway development. Perhaps a code is the best to explain. Inside you'll find answers to such questions as: Open VS.NET to any project you can code in, or follow the steps in the Scratchpad sidebar. Although it is not the best programming practice, we will leave references to all elements as the Chapter How do you customize workflow? default names6: the VS.NET IDE gives to them. In essence, we need to create a template file with the following ASP.NET Web Form controls—TextBox, Label, ListBox, and Button—using Chapterproperties 10: How do you develop Microsoft ContentItManagement Server (CMS) their default plus the defaultfor console, of course. should look something like 2002 Figure using Visual Studio .NET? 24-2. We will be repeatedly replacing the contents of the Button1_Click function. Chapter 17: doForm you Double-clicking theHow Web function in the code-behind of Chapter 22: How do you code: and resources?
establish user rights? Button control in the Design palette will create the Button1_Click the template file. Replace the entire function with the following best deploy CMS according to your organization's needs, size,
Chapter 32: How do you publish dynamic data? private void Button1_Click(object sender, System.EventArgs e)
[{ Team LiB ] //1. Grab the current CMS context CmsHttpContext cmsContext = CmsHttpContext.Current;
//2. Populate the label with the Publishing Mode Label1.Text = cmsContext.Mode.ToString(); }
At the top of the code window is a list of namespaces in use. If there isn't a line that looks like the following, you will need to add it:
using Microsoft.ContentManagement.Publishing; •
Table of Contents
Choose Build Solution from Server the VS.NET menu (Ctrl-Shift-B) Microsoft Content Management 2002: ABuild Complete Guide
or from the drop-down menu that results from right-clicking the solution name. When the build is done, the text
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Build: 1 succeeded, 0 failed, 0 skipped Publisher: Addison Wesley Pub Date: October 31, 2003 0-321-19444-6 should ISBN: be displayed at the bottom of the VS.NET Output window. Compile errors, if any, will need to be addressed before you proceed. VS.NET does a pretty good job of providing feedback Pages: 1136 when things aren't quite right.
Open Internet Explorer and browse to http://localhost/Scratch/Pad. Click the Button, and the label will display Published (Figure 24-3) in place of its default value of Label. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." 24-3. Context publishing mode —Gary Bushey, Figure SharePoint ServerCurrent MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using VisualtoStudio .NET? Click the Switch Edit Site link, and then click the Button again. This time the label displays Unpublished. Cool. Chapter 17: How do you establish user rights? Let's take a closer look at that code. The first executable line looks like this: Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? CmsHttpContext cmsContext = CmsHttpContext.Current; Chapter 32: How do you publish dynamic data?
are declaring a variable named cmsContext (this can be any name we choose), using [We Team LiB ] CmsHttpContext as the data type and immediately assigning it to the Current property of the existing CmsHttp Context that CMS creates for us using the IIS ISAPI filter when the posting is requested. Notice that there is not a new constructor but a declarative assignment statement instead. Current is declared by the CmsHttpContext class as Static, so it does not require the "new" keyword to instantiate it. Because there is only one CmsHttpContext allowed per HTTP request, the Current property controls access, ensuring that additional instances are not created. The CmsHttpContext class cannot be inherited or created by any other class. The second executable line looks like this:
Label1.Text = cmsContext.Mode.ToString();
Position yourTable cursor just after the cmsContext variable name and type a period. An Intellisense • of Contents window (Figure 24-4) should appear. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 24-4. Exploring CmsHttpContext Intellisense
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Taketo a close look at the items in theof list. Compare it with Table in Appendix Choose any how effectively unlock the power CMS. Administrators and B-1 developers alike B. will learn how property (preceded byservers' an icon scalability, of a hand pointing to and a paper) and type after it.and to enhance their Web flexibility, extensibility by".ToString();" using CMS features For instance, if we usedon thethe first propertyplatform. in the list, Channel, the resulting assignment API to manage content Microsoft statement would look like this: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Label1.Text cmsContext.Channel.ToString(); the Publishing = API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Build the solution and then browse to or refresh the posting in Internet Explorer. Click the as: Button, and the label will display the value of the current channel rendered as a string. Since we didn't choose a specific property (characteristic) of the Channel object, like Chapter 6: How do you customize workflow? .NET just shows us what type of object it is. cmsContext.Channel.DisplayName.ToString(), So, Label displays the text Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Microsoft.ContentManagement.Publishing.Channel. Chapter 17: How do you establish user rights? 22: How do youwith bestthe deploy CMS items according toIntellisense your organization's needs,that size, SpendChapter some time just toying different in the list. The worst you could and do isresources? end up with syntax errors. Remember, every change made in the code window will only be reflected in the browser after a successful VS.NET build. Chapter 32: How do you publish dynamic data?
[ Team LiB ] NOTE: The first attempt to browse a recently compiled page will require a just in time (JIT) compilation of the changes so it will consequently take longer than subsequent requests.
But we have a problem—we can't use the CmsHttpContext if we need to access CMS with a different set of credentials than were provided by the user, or when we need to use a different mode than the posting is in (although it is possible to redirect the user to another publishing mode, we may not want to), or when we aren't in a posting at all. For situations where the CmsHttpContext isn't available or isn't what we need, we use the CmsApplicationContext. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CmsApplicationContext Unlike previous versions of CMS, the current release allows the creation of a Context in a stand-alone situation—potentially outside the confines of IIS. For instance, console-based applications, Web Services, or WinForm applications, to name a few, can benefit from the use of a CmsApplicationContext. CmsApplicationContext is the entry point into PAPI for applications when there is no URL involved. It can also be very useful in a Web application when the current CmsHttpContext isn't what we need. CMS needs the following two pieces of information to fully hydrate a CmsApplicationContext object: •
Table of Contents
Authenticated user
Microsoft Content Management Server 2002: A Complete Guide ByBill English , Olga mode Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Publishing
There is no URL, so channel and posting are not provided. This type of Context is never Publisher: Addison Wesley automatically created for us, so we create an instance of this object using a constructor. The Pub Date: October 31, 2003 CmsApplicationContext provides four methods for authenticating the Context (discussed in detail later this chapter) as a specific user in a specific publishing mode. So, we can ISBN: in 0-321-19444-6 instantiate Context using the credentials of our choosing in the mode of our choosing. Outside Pages:a1136 of the constructor and authentication methods, the functionality of the CmsApplicationContext is inherited from the same base class as CmsHttpContext. So, aside from not having a current Channel object or a current Posting object, the CmsApplicationContext works much the same way that the CmsHttpContext did. Specific Channel and Posting objects can certainly be located "This is one of those rare books that you will read to learn about the product and keep and manipulated using root hierarchy properties or the Searches property. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that NOTE: The Searches property is discussed at length in Chapter 28. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Also, all three hierarchies (channel, resource gallery, and template gallery) are available using Microsoft Content Management Server 2002: A Complete Guide is the first book that explains the CmsApplicationContext class. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance Web servers' scalability, flexibility, and extensibility by of using CMS features Because wetheir control the creation of CmsApplicationContext, the number instances that weand API to manage content on the Microsoft platform. can create is limited only by the hardware. But like the CmsHttpContext class, the CmsApplicationContext cannot be inherited by any other class. This thorough reference explains the product architecture, then shows you how to create and edit content useCmsApplicationContext, the workflow. Topic coverage includes administration and of security, When we areand using it is possible to CMS expend a large amount time the Publishing API, deployment options, site configuration, and template development. A between an object's modification and the commitment or abandonment (rollback) of that running example is used throughout the book to illustrate how important CMS features modification. Because other users may be blocked from accessing areas of the site whileare these implemented in real-world Web site development. Inside you'll answers such questions transactions are in an uncommitted state, CommitAll should befind called swiftlyto after any as: modification. As always, is not recommended that you wait for a response from the user before calling CommitAll. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 NOTE: WhenStudio you are using a CmsApplicationContext to alter an object, users can be using Visual .NET? blocked from using portions of CMS if alterations are not swiftly committed. Also, transactions be you committed one at a time. Chapter 17: must How do establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The "new" keyword must be used when you are declaring the CmsApplicationContext Context. For instance, wedo used following codedata? to get a handle to the CmsHttpContext in our Chapter earlier 32: How youthe publish dynamic template file:
[ Team LiB ] CmsHttpContext cmsContext = CmsHttpContext.Current;
But to get a handle to the CmsApplicationContext in a stand-alone situation, we would use something similar to the following code:
CmsApplicationContext cmsContext = new CmsApplicationContext();
Next we need to use one of the four authentication methods of the CmsApplicationContext class; otherwise, this new Context doesn't know what credentials or mode to use, and we won't be able to access or manipulate anything. If we skip this step, we will receive one of those verbose .NET error pages that basically says, Login required. The requested action can only be • Table of Contents performed after a successful login has been completed. The current session is not logged in. Microsoft Content Management Server 2002: A Complete Guide
The authentication methods By Billfour English , Olga Londer, Shawn Shell,are: Todd Bleeker, Stephen Cawood AuthenticateAsUser Publisher: Addison Wesley Pub Date: October 31, 2003
AuthenticateAsGuest ISBN: 0-321-19444-6
Pages: 1136 AuthenticateAsCurrentUser
AuthenticateUsingUserHandle "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." AuthenticateAsUser —Gary Bushey, SharePoint Server MVP
In our initial example, we will use the AuthenticateAsUser method to authenticate to CMS. This Content Management Server (CMS) is fast becoming a vital content-management tool that method requires, at a minimum, the programmer to provide values for a user name, password, helps administrators and developers handle the ever-increasing amount of content on their and publishing mode (Update, in this example). The values for the user name and password Web sites. However, an authoritative source of product information has been missing . . . until could be hardcoded, but we are going to use the ClientAccountName of the current user and a now. password entered into the TextBox on our posting. The mode will be hardcoded to Update. This implies that the account we log Server in with 2002: must have sufficient security rights update Microsoft Content Management A Complete Guide is the first to book that the explains posting. If we log in with an invalid user, or, more likely, we forget to type our password how to effectively unlock the power of CMS. Administrators and developers alike will learninto how theenhance TextBox, we will one of those verbose .NET pages that basically Loginand to their Webreceive servers' scalability, flexibility, anderror extensibility by using CMSsays, features attempt failed. Access denied. API to manage contentison the Microsoft platform. Replace the Button1_Click function ofproduct our Scratchpad template theyou following This thorough reference explains the architecture, then with shows how tocode: create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A private void Button1_Click(object sender, System.EventArgs e) running example is used throughout the book to illustrate how important CMS features are { implemented in real-world Web site development. Inside you'll find answers to such questions //1. Grab an Application Context as: CmsApplicationContext cmsContextApp = new CmsApplicationContext(); //2. Log in Chapter 6: to HowCMS do you customize workflow? // Use User ID used to authenticate to Posting // Chapter Use password inyou TextBox 10: How do develop for Microsoft Content Management Server (CMS) 2002 // using PutVisual the Studio created Context into Update mode .NET? cmsContextApp.AuthenticateAsUser( Chapter 17: How do you establish user rights? cmsContextHttp.Current.User.ClientAccountName, TextBox1.Text, Chapter 22: How do you best deploy CMS according to your organization's needs, size, PublishingMode.Update); andPopulate resources? //3. the label with the user name and mode Label1.Text = "UserName:" + Chapter 32: How do you publish dynamic data? cmsContextApp.User.ToString() +
" AppMode: " + cmsContextApp.Mode.ToString(); [ Team LiB ] }
The comments should adequately explain what the code is doing. Build the solution and then browse to or refresh the posting in Internet Explorer. Type your password into the TextBox and click the button labeled Button. The page should reload, and the Label should display the following (Figure 24-5):
UserName: WinNT://Machinename/UserName AppMode: Update
Figure 24-5. AuthenticateAsUser •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. where Machinename will be the name of your PC, assuming it is hosted on localhost, and Microsoft Management 2002: Complete Guide the first book that explains UserNameContent will be the user nameServer you used to A authenticate to theisapplication. how to effectively unlock the power of CMS. Administrators and developers alike will learn how If you forgettheir to enter password or the password isn't for the user to enhance Web your servers' scalability, flexibility, and extensibility byinusing CMS features and cmsContextHttp.User.ClientAccountName, you will receive one of those verbose .NET error API to manage content on the Microsoft platform. pages that basically says, Login attempt failed. Access is denied. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A AuthenticateAsGuest running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Next we will use the AuthenticateAsGuest method to authenticate to CMS. This method requires as: the programmer to simply provide the publishing mode (Update, in this example) with which the guest user will be authenticated. The built-in guest account will be used to authenticate. If Chapter 6: How do you workflow? the guest account hasn't beencustomize enabled and configured by the CMS Server Configuration Application (SCA), we will get one of those verbose .NET error pages when we run this code Chapter says, 10: How you develop for not Microsoft Content that basically Thedo current user does have rights to Management the requestedServer item. (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? NOTE: Using the Server Configuration Application is discussed at length in Chapter Chapter 22: How do you best deploy CMS according to your organization's needs, size, 18. and resources? Chapter 32: How do you publish dynamic data?
implies [This Team LiB ]that the account we log in with must have sufficient security rights to update the posting. If we log in with an invalid user, we will receive one of those verbose .NET error pages that basically says, Login attempt failed. Access is denied. Replace the Button1_Click function of our Scratchpad template file with the following code:
private void Button1_Click(object sender, System.EventArgs e) { //1. Grab an Application Context CmsApplicationContext cmsContextApp = new CmsApplicationContext(); //2. Log in to CMS as Guest // Will only work if Guest Access is enabled in the SCA cmsContextApp.AuthenticateAsGuest(PublishingMode.Update); label with the user name and mode • //3. Populate Table ofthe Contents Label1.Text = "UserName:" + Microsoft Content Management Server 2002: A Complete Guide cmsContextApp.User.ToString() + ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood " AppMode: " + cmsContextApp.Mode.ToString(); } Publisher: Addison Wesley Pub Date: October 31, 2003
The comments should adequately explain what the code is doing. The only difference between ISBN: 0-321-19444-6 this code sample and the previous one is the way in which we are authenticating the Pages: 1136 CmsApplicationContext. Build the solution and then browse to or refresh the posting in Internet Explorer. The only visible change in the output is the user name displayed, and, of course, no password was required in the text box (Figure 24-6). "This is one of those rareFigure books that you will read to learn about the product and keep 24-6. AuthenticateAsGuest rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
using Visual Studio .NET? AuthenticateAsCurrentUser
Chapter 17:the How do you establish user rights? Next we will use AuthenticateAsCurrentUser method to authenticate to CMS. This method requires the programmer to simply provide the publishing mode (Update, in this example) with Chapter 22: How do you best deploy CMS according to your organization's needs, size, which the CmsApplicationContext will be authenticated. The current user will be used to and resources? authenticate. Chapter 32: How do you publish dynamic data?
[ Team LiB ]Be aware, AuthenticateAsCurrentUser may not work as you expect within an NOTE: ASPX page. IIS has its own set of users (like ASPNET, IUSR_Machinename, and IWAM_Machinename) that it uses to perform things while processing a Web request. It will also behave in different ways depending on the impersonation settings in the web.config and machine.config files. Authentication modes selected for the CMS virtual directory in IIS can also have an impact.
If the guest account is enabled and configured by the CMS Server Configuration Application, it will be used to authenticate, and we will see the actual IIS user being used in the resulting posting. Alternatively, the ASP.NET user (usually ASPNET) could be configured by Site Manager with sufficient security rights to update the posting. However, if one of these options isn't implemented, we will receive one of those verbose .NET error pages that basically says, Login attempt failed. Access is denied.
•
Table of Contents
Microsoft Content Management function Server 2002: A Complete Guidetemplate Replace the Button1_Click of our Scratchpad
file with the following code:
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
private void Button1_Click(object sender, System.EventArgs e) { Publisher: Addison Wesley //1. Grab an Application Context Pub Date: October 31, 2003 CmsApplicationContext cmsContextApp = ISBN: 0-321-19444-6 new CmsApplicationContext(); Pages: 1136 //2. Log in to CMS as Guest // Will only work if Guest Access is enabled in the SCA cmsContextApp.AuthenticateAsCurrentUser(PublishingMode.Update); //3. Populate the label with the user name and mode "This is one of those rare books that you will Label1.Text = "UserName:" + read to learn about the product and keep rereading to find those tidbits that you missed before." cmsContextApp.User.ToString() + —Gary Bushey, SharePoint Server MVP " AppMode: " + cmsContextApp.Mode.ToString(); } Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, authoritative source of product has been missing between . . . until The comments shouldanadequately explain what the codeinformation is doing. The only difference now. this code sample and the previous one is the way in which we are authenticating the CmsApplicationContext. Build the solution and then browse to or refresh the posting in Internet Microsoft Server Complete the first(Figure book that explains Explorer. Content The onlyManagement visible change in the2002: outputA is the userGuide name is displayed 24-7). how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Figure AuthenticateAsCurrentUser API to manage content on the24-7. Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
AuthenticateUsingUserHandle Finally, we will use the AuthenticateUsingUserHandle method to authenticate to CMS. This method requires the programmer to provide a WindowsIdentity token along with the publishing mode (Update, in this example). The user associated with that WindowsIdentity token (the actual current Windows user, in this example) will be used to authenticate in that mode. The guest account must be enabled and configured by the CMS Server Configuration Application to use this mode. The Windows user must also be configured by Site Manager with sufficient security rights to update the posting. Also, the IIS Web site must be configured using Windows authentication. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NOTE: Setting up IIS security is covered in Chapter 19.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley As previously stated, these conditions must all be met, or we will receive one of those verbose Pub Date:pages Octoberthat 31, 2003 .NET error basically says, Login attempt failed. Access is denied. ISBN: 0-321-19444-6
Replace the 1136 Button1_Click function of our Scratchpad template file with the following code: Pages: private void Button1_Click(object sender, System.EventArgs e) { "This is one of an those rare books that you will read to learn about the product and keep //1. Grab Application Context rereading to find those tidbitscmsContextApp that you missed=before." CmsApplicationContext —Gary SharePoint Server MVP newBushey, CmsApplicationContext(); //2. Assign current Windows User to a WindowsIdentity variable Content Management Server (CMS) is fast becoming a vital content-management tool that // This will only work if IIS is set to Windows Authentication helps administrators and developers handle the ever-increasing amount of content on their // and Guest Access is enabled in the SCA Web sites. However, an authoritative source of product information has been missing . . . until System.Security.Principal.WindowsIdentity identCurrentUser = now. System.Security.Principal.WindowsIdentity.GetCurrent(); //3. Log in to CMS Microsoft Content Management Server 2002: A Complete Guide is the first book that explains // Use the currently authenticated Windows User for credentials how to effectively unlock the power of CMS. Administrators and developers alike will learn how // Put the created Context into Update mode to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and cmsContextApp.AuthenticateUsingUserHandle( API to manage content on the Microsoft platform. identCurrentUser.Token, PublishingMode.Update); This thorough reference explains the product architecture, then shows you how to create and //4. Populate the withTopic the coverage user token and CMS modeadministration and security, edit content and use thelabel workflow. includes = "UserToken:" theLabel1.Text Publishing API, deployment options, site+configuration, and template development. A identCurrentUser.Token.ToString() running example is used throughout the book +to illustrate how important CMS features are " AppMode: "Web + cmsContextApp.Mode.ToString(); implemented in real-world site development. Inside you'll find answers to such questions } as:
The comments adequately explain what the code is doing. The second line of code is Chapter 6:should How do you customize workflow? key; it retrieves the token that we use to seed this authentication method. Build the solution Chapter 10:to How do you develop for Microsoft Management Server (CMS)in2002 and then browse or refresh the posting in InternetContent Explorer. The only visible change the using Visual .NET? output is the user Studio name displayed (Figure 24-8). Chapter 17: How do you establish user rights?
Figure 24-8. AuthenticateUsingUserHandle
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley When you are using Windows authentication, the identity of the current user under Pub Date: October 31, 2003 CmsApplicationContext can be affected by the value of the identity tag in the web.config and/or ISBN: 0-321-19444-6 machine.config files. The current user will not be the authenticated Windows user unless you enablePages: impersonation——in one of the .config files. 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Context Publishing Modes In the coding examples we used to authenticate to the CmsApplicationContext, we hardcoded the CMS Update publishing mode. There are four publishing modes that we can use: Published mode presents the live site to the user. Only published objects are visible, and updating is not allowed. •
Table of Contents Unpublished mode lets the user view the live site plus any unpublished objects, but updating is still not allowed.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Update mode lets the user see unpublished and preview objects, and, as the name implies, update objects in the model. Publisher: Addison Wesley
Staging mode31, is2003 used Pub Date: October
by the CMS Site Stager when staging a site, and updating is not
permitted. ISBN: 0-321-19444-6
Pages: 1136 By default, the published version of a posting, if there is one, is returned in both Published mode and Staging mode. The unpublished version of a posting, if there is one, is returned in both Unpublished and Update modes. In the event that there isn't an unpublished posting, a copy of the published version is returned ready for alteration. "This is one of those rare books that you will read to learn about the product and keep rereading to findtothose tidbits of that you missed before." If we are going the trouble creating a Context, we will likely use Update mode. However, it —Gary Bushey, SharePoint Server MVP is feasible that Published and Unpublished modes could be helpful in some circumstances.
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web NOTE: sites. However, an authoritative source of product information has been . . . until Web Author mode has a refinement of the publishing mode and ismissing discussed now. at length in Chapters 5 and 30. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance [ Team LiB ]their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary Let's put this chapter in "context." We discussed when we would anticipate using each of the various CMS Contexts. We defined the properties and methods of CmsHttpContext and CmsApplicationContext as well as the constructor for CmsApplicationContext. We coded some simple scratchpad examples to see these CMS Contexts at work, including all the ways we can authenticate a CmsApplicationContext. Last, we discussed the Context publishing modes. Next, we take our newfound CMS Context knowledge and traverse the CMS hierarchies: channels and galleries. [ Team LiB ]Table of Contents • Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 25. Traversing Channels Now that we've got context, we can begin to organize and exercise the assets in our Web Property. In this chapter we discuss one of the three primary hierarchies of CMS: the channel. Hierarchies abound. They are used all around us to help us understand and interact with large, potentially complex groups of items. Grocery stores, department stores, hardware stores, stores of all kinds organize their wares hierarchically (see the Hierarchies in Our Lives sidebar).
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Hierarchies in Our Lives
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Hierarchies are used all around us. For example, grocery stores organize general areas of theAddison store Wesley first by groups like produce, meats, refrigerated goods, frozen Publisher: goods, dry goods, canned goods, bread, dairy, health, and beauty. Within each Pub Date: October 31, 2003 group, the store organizes products by labeled aisles of similar products, and within ISBN: 0-321-19444-6 each aisle by product type. For instance, in the bread aisle we will find a section for Pages: 1136 white bread, another for wheat bread, another for rye and odd breads, still another for hot dog and hamburger buns, and perhaps even an area for day-old bread. Within each section, we will likely find different manufacturers and maybe even different sizes from the same manufacturer. This is done to help us quickly locate a "This one within of those you will read to learn about the product and keep givenisitem therare vastbooks arraythat of items they offer. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server Restaurants typically organize theirMVP menus hierarchically, first dividing the offered items by sections like appetizer, sandwich, meal, dessert, beverage, and bar. Then Content (CMS) is there fast becoming a vital like content-management within a Management given section,Server like beverage, may be groups carbonated, coffee,tool that helps and developers thethere ever-increasing amount of contentlike on their milk, administrators tea. Even within a given group,handle like milk, may be further subdivision, Web an authoritative source of product information has been missing . . . until skim,sites. 2%, However, and whole. now. Perhaps the best example of a hierarchy is the military; a corps is made up of Microsoft Management 2002: A CompleteaGuide is the book that explains divisions,Content a division of brigades,Server a brigade of regiments, regiment of first battle groups, how to effectively unlock the apower of CMS. Administrators and developers alike will a battle group of battalions, battalion of squadrons, a squadron of companies, a learn how to enhanceoftheir Web servers' scalability, extensibility by using company batteries, a battery of troops,flexibility, a troop ofand platoons, a platoon of CMS features and API to manageacontent on theofMicrosoft detachments, detachment sections,platform. a section of squads, a squad of teams, a team of crews, and a crew is made up of various soldiers, airmen, and/or seamen. This thorough product architecture, then shows you how Within each ofreference these is aexplains specific the hierarchical chain of command, and within thattoa create and edit contentofand use by thespecialty. workflow. Topic coverage includes CMS administration and security, separation duties the Publishing API, deployment options, site configuration, and template development. A running exampleon is the usedubiquitous throughout the book to concept. illustrate how important CMS features are CMS capitalizes nature of this implemented in real-world Web site development. Inside you'll find answers to such questions as: Many other hierarchy examples could be given (sports, your house, animals, government, religion, and transportation systems, to name a few), but to the point: Hierarchies do make it Chapter 6: How do you customize workflow? easier to understand and interact with the objects that they organize. One of the key hierarchies available in do CMS is develop the channel. A CMS channel used to organize, store, retrieve, Chapter 10: How you for Microsoft ContentisManagement Server (CMS) 2002 and manage postings within our Web Property. using Visual Studio .NET? Chapter 17: How do you establish user rights?
NOTE: theHow nextdo chapter, wedeploy explore postings at length. For now, think ofneeds, a posting ChapterIn22: you best CMS according to your organization's size, as a resources? collection of information that we want someone to understand and potentially and interact with. Chapter 32: How do you publish dynamic data?
[InTeam ] a channel provides functionality similar to a virtual directory in a traditional Web manyLiB ways site. It can be used not only to organize information but also to limit access to it. As with all hierarchies, there is one single, master RootChannel called Channels from which every other channel gets its genesis.
However, unlike a directory, Channel objects can have properties, can be easily sorted using multiple keys, can be moved or renamed in part or in whole without breaking links in the site, can be easily traversed both up (using the Parent Channel property) and down (using foreach on the contained Channel objects collection) the hierarchy, are typically used to generate dynamic navigation to their contents, and can even be deleted in code. In fact, all of this functionality is available from within the PAPI Context.
NOTE: The ability to move a channel (or a posting) to a new location without any Table of Contents broken links is a feature of CMS called Managed Links. Links are not stored in the Microsoft Content Management Server 2002: A Complete Guide database as links but instead as object references. Location is just a characteristic of ByBill the English , Olga Londer , Shawnan Shell , Todd to Bleeker , Stephen Cawood object. So, moving object a new location simply changes that characteristic, and any link reference will render to the current location. •
Publisher: Addison Wesley Pub Date: October 31, 2003
All code in this chapter will refer to a posting based upon a template with the following ASP.NET ISBN: 0-321-19444-6 Web Form Label, ListBox, and Button—using their default properties plus Pages:controls—TextBox, 1136 the default console, of course. Follow the steps in the Scratchpad sidebar, in Chapter 24, to recreate exactly the same results shown here, or use your own channels, templates, and postings and just apply the concepts. We will be repeatedly replacing the contents of the Button1_Click function. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Also, since we will be working with the channel hierarchy, it will be very helpful to have a —Gary Bushey, SharePoint Server MVP structure to traverse. Figure 25-1 shows the structure of the potentially familiar hierarchy as viewed in the CMS Site Manager. This structure will be created later in this chapter in the Content Management Server (CMS) is fast becoming a vital content-management tool that Creating and Deleting Objects in a Channel section. The structure will be used with the other helps administrators and developers handle the ever-increasing amount of content on their examples in this chapter. Web sites. However, an authoritative source of product information has been missing . . . until now.
Figure 25-1. Scratch channel hierarchy
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
NOTE: Using Site Manager to create channels is covered in depth in Chapter 9.
Initially, the only channel that has a posting in it is the Scratch channel. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Checking Channel User Rights It is typically desirable to verify that the current user is allowed to perform an action rather than handling the access denied exception that occurs if we allow them to try to do something when they don't have sufficient rights.
Sufficient Rights •
Table of Contents
CMS help files outline the specific rights that a user must have to be considered sufficient for virtually any task. Since the goal of this chapter isn't about securing ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood your site, this is left to other areas of the book. (See Chapter 17 for more information on how to set up user rights in Site Manager, and Chapters 19 and 20 for best practices on securing your CMS site.) Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley
Pub Date:most October 2003 That said, of31, the code in this part of the book assumes that the user logged in to CMSISBN: has0-321-19444-6 sufficient rights to manipulate all the assets in the hierarchy. The easiest way to ensure Pages: 1136that insufficient rights are not a problem while you are testing your site locally is to authenticate using the CMS administrator credentials or add the user that you log in to Windows with to the CMS Administrator group using Site Manger, and set IIS to use Integrated Windows authentication for your CMS site.
"This is one of those rare books that you will read to learn about the product and keep Alternatively, use the AuthenticateAsUser method of the CmsApplication Context, rereading to find those tidbits that you missed before." passing in the user name and password of the CMS administrator, rather than using —Gary Bushey, SharePoint Server MVP the CmsHttpContext, as shown in most of the code examples. This way you can always dictate the user and Context 24 for more tool that Content Management Server (CMS) isPublishingMode. fast becoming a(See vitalChapter content-management information on using the AuthenticateAsUser method of CmsApplicationContext.) helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Knowing what the user is allowed to do and not allowed to do can be helpful in dynamically generating navigation. It can beServer desirable to proactively that the current Microsoft Content Management 2002: A Completeleave Guideoffisfunctionality the first book that explains user to isn't allowed to perform. It can of also be desirable to visually indicate areas the user how effectively unlock the power CMS. Administrators and developers alikewhere will learn how is allowed perform (such as by showing a certain by icon in front a link and to enhancetotheir Web certain servers'functions scalability, flexibility, and extensibility using CMSoffeatures where the user content is allowed perform a given function). This can easily be accomplished using API to manage onto the Microsoft platform. the user rights properties of the Channel object displayed in the following code. This thorough reference explains the product architecture, then shows you how to create and The simple handling in the code throughout codeCMS samples isn't meant to security, be the edit contenterror and use the workflow. Topic coveragethese includes administration and model for how API, to handle CMS exceptions; there is an application code block from Microsoft the Publishing deployment options, site configuration, and template development. A on how to do exception handling in .NET. These alsohow assume the presence of bothare a running example is used throughout the bookfunctions to illustrate important CMS features ListBox1 and a to provide visual feedback toInside the user, certainlytowon't be implemented inLabel1 real-world Web site development. you'llwhich find answers suchtypically questions normal, but it works for our purposes. as:
Replace the Button1_Click function of our Scratchpad template file (see the Scratchpad sidebar Chapter 6: How do you workflow? in Chapter 24 for details) with customize the following code: Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 usingvoid Visual Studio .NET? private Button1_Click(object sender, System.EventArgs e) { tryChapter 17: How do you establish user rights? { Chapter 22:the Howcurrent do you best CMS according to your organization's needs, size, //1. Grab CMS deploy Context and resources? CmsHttpContext cmsContext = CmsHttpContext.Current; Chapter 32: Howthe do you publish data? //2. Populate label withdynamic the name of the Channel, the
// LiBPublishingMode, and an anchor tag to the Update Mode URL [ Team ] // (if the user clicks this, the page will repost in CMS // Update Mode for the current Posting) Label1.Text = "Channel: " + cmsContext.Channel.Name.ToString() + "
PublishingMode: " + cmsContext.Mode.ToString() + "
Link to Update Mode"; //3. Populate the ListBox with values for the various // user rights ListBox1.Items.Add( "CanDelete: " + cmsContext.Channel.CanDelete.ToString() ); ListBox1.Items.Add( "CanCreateChannels: " + • Table of Contents cmsContext.Channel.CanCreateChannels.ToString() Microsoft); Content Management Server 2002: A Complete Guide + ByBill ListBox1.Items.Add( English, Olga Londer, Shawn "CanCreatePostings: Shell, Todd Bleeker, Stephen " Cawood cmsContext.Channel.CanCreatePostings.ToString() ); ListBox1.Items.Add( "CanSetProperties: " + Publisher: Addison Wesley cmsContext.Channel.CanSetProperties.ToString() Pub Date: October 31, 2003 ); ISBN: 0-321-19444-6 } Pages: 1136 catch(Exception eError) { //4. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); "This } is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." } —Gary Bushey, SharePoint Server MVP Content (CMS)the is fast becoming a vitalincontent-management thatto it Build theManagement solution and Server then refresh Scratchpad posting Internet Explorer, or tool browse helps administrators of content on their and click the Button. and The developers page shouldhandle reloadthe andever-increasing look similar to amount Figure 25-2. Web sites. However, an authoritative source of product information has been missing . . . until now.
Figure 25-2. Channel user rights
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? As you can probably surmise from the preceding example, CMS allows us to programmatically
[create, Team alter, LiB ] and delete channels and create postings and connected postings in a referencing Channel object. What may not be self-evident is that the creation, alteration, and deletion of a channel do not have to be submitted or approved to take place. If the user has the authority to alter a channel and that change is committed, that change is live. These Channel properties will help us determine whether we could allow the current user access to this functionality.
The Boolean result of each property is strictly an indicator of the user's rights rather than the proper Context PublishingMode to perform the function. This way, we can provide a visual indication in the dynamic navigation of the user's ability or lack thereof to perform these functions regardless of the mode of the current Context. Therefore, just because one of these properties returns true, that doesn't automatically mean that any attempt to modify an object will succeed. To that end, it is always wise to place the verification that a user has sufficient rights and the actual modification within a .NET try/catch block. Also, all the following Channel properties cannot be read for objects after they have been deleted and always return false for historical revisions of a Channel object. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
A more representative coding example follows in the next main section of this chapter, Creating and Deleting Objects in a Channel.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
CanDelete (Inherited from HierarchyItem) Pub Date: October 31, 2003 ISBN: 0-321-19444-6
The CanDelete Pages: 1136property indicates whether the authenticated user can delete the referencing Channel object. This property will return true if the authenticated user has sufficient rights (see theSufficient Rights sidebar) to delete the channel. This property will return false if the authenticated user does not have sufficient rights or if the "This is one of those rare books that you will read to learn about the product and keep channel contains any children (channels or postings). In the preceding code example, rereading to find those tidbits that you missed before." CanDelete will always be false because we are asking if the user can delete the channel that —Gary Bushey, SharePoint Server MVP this posting is in. Of course they can't; this channel has at least one child: the posting in which the codeManagement is running. Also, the (CMS) CanDelete property will aalways return false if the referencing Content Server is fast becoming vital content-management tool that Channel object is the RootChannel. The RootChannel is a built-in entity and therefore helps administrators and developers handle the ever-increasing amount of content on can't their be deleted by anyone. Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains CanCreateChannels how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and The CanCreateChannels property indicates whether the authenticated user can create channels API to manage content on the Microsoft platform. within the referencing Channel object. This property will return true if the authenticated user has sufficient rights (see the Sufficient Rights sidebar) to create a channel within the This thorough reference explains the product architecture, then shows you how to create and referencing Channel object. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A This property will return false if the authenticated user does not have sufficient rights. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
CanCreatePostings
Chapter 6: How doproperty you customize workflow? The CanCreatePostings indicates whether the authenticated user can create postings within the referencing Channel object. This property will return true if the authenticated user Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 has sufficient rights to create a posting within the referencing Channel object. using Visual Studio .NET?
This property will return false if the authenticated user does not have sufficient rights. Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? CanSetProperties (Inherited from HierarchyItem) Chapter 32: How do you publish dynamic data? The CanSetProperties property indicates whether the authenticated user can indeed alter the
[properties Team LiBof ] the referencing channel object. This requires the same sufficient rights as creating and deleting a channel.
This property will return true if the authenticated user has sufficient rights and false if they do not have sufficient rights. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating and Deleting Objects in a Channel To programmatically build the hierarchy illustrated in Figure 25-1, we will use the CreateChannel method of the current channel that our posting is in. We will then create a posting in one of the created channels. We will discuss, but not illustrate, the creation of a ConnectedPosting using the CreateConnectedPosting method. Using Site Manager, we will view our hierarchical masterpiece. And finally, we will delete the entire hierarchy.
CreateChannel
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
To successfully use the CreateChannel method, the CanCreateChannels property must return must be set to Update. Ensuring that CanCreateChannels returns true isn't too difficult (see the Sufficient Rights sidebar). Getting the referencing Channel object into Update PublishingMode requires a little Publisher: Addison Wesley more work. If we skip this step, we will receive a verbose .NET error page that basically says, Date: 31, 2003 YouPub must beOctober in Update mode to do this.
By Bill for English Londer, Shawn Shellobject, , Todd Bleeker , Stephen Cawood true the,Olga referencing Channel and the PublishingMode
ISBN: 0-321-19444-6
Although it may Pages: 1136 sound a little more challenging at first, we will use the second approach in the Getting into Update PublishingMode sidebar for the examples that follow. It is a universal solution that can be applied in many places in the code to follow. The next two code listings will help us break the task of creating a channel hierarchy into "This is one of those rare books that you will read to learn about the product and keep manageable, potentially reusable functions. rereading to find those tidbits that you missed before." —Gary MVP The firstBushey, functionSharePoint will returnServer an authenticated CmsApplication Context to the calling method. In Listing 25-1 we are using the AuthenticateUsingUserHandle authentication method, but you can Content Management Server (CMS) is fast becoming a vital content-management tool that use your preferred CmsApplicationContext authentication method. By encapsulating this helps administrators and developers handle the ever-increasing amount of content on their functionality, we can simply call the GetAuthenticated CmsApplicationContext function, passing Web sites. However, an authoritative source of product information has been missing . . . until it the PublishingMode we want it to have, and we can be confident that we will successfully get now. a valid CmsApplicationContext in the specified mode. The comments should adequately explain what the code is doing. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. NOTE: Authentication methods of the CmsApplicationContext are covered in detail in Chapter 24. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Listing 25-1 Function tosite get authenticated CmsApplicationContext implemented in real-world Web development. Inside you'll find answers to such questions as: private CmsApplicationContext GetAuthenticatedCmsApplicationContext Chapter 6: How cmsMode) do you customize workflow? (PublishingMode //***************************************************************** Chapter 10: CmsApplicationContext How do you develop for Microsoft Content Management Server (CMS) 2002 //Create a new and authenticate it using Visual Studio .NET? //Pass the created Context back to the calling method //***************************************************************** Chapter 17: How do you establish user rights? { //1. Declare Context Chapter 22: a How do you variable best deploy CMS according to your organization's needs, size, CmsApplicationContext cmsContextApp = null; and resources? try { Chapter 32: How do you publish dynamic data? //2. Grab a new Application Context
cmsContextApp = new CmsApplicationContext(); [ Team LiB ] //3. Assign current Windows User to a WindowsIdentity variable // This will only work if IIS is set to Windows // Authentication and Guest Access is enabled in the SCA System.Security.Principal.WindowsIdentity identCurrentUser = System.Security.Principal.WindowsIdentity.GetCurrent(); //4. Log in to CMS // Use the currently authenticated Windows User credentials // Put Context into the PublishingMode passed to the function cmsContextApp.AuthenticateUsingUserHandle( identCurrentUser.Token, cmsMode); //5. Return the Authenticated Context of Contents return Table cmsContextApp;
•
Microsoft Content Management Server 2002: A Complete Guide }
catch(Exception ByBill English, Olga LondereError) , Shawn Shell, Todd Bleeker, Stephen Cawood { //6. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); Publisher: Addison Wesley Pub Date: October 31, 2003
//7. Return the null Context in the event of an error ISBN: 0-321-19444-6 return cmsContextApp; }
Pages: 1136
} "This is one function, of those rare books25-2, that creates you will a read to learn about the product and keep The second in Listing Channel object and returns it to the calling rereading toencapsulating find those tidbits you missed method. By thisthat functionality, webefore." can simply call the CreateNewChannel function, —Gary SharePoint Server MVPwe want the new channel created, along with the name passingBushey, it the Channel object in which we want the new channel to have, and we can be confident that, assuming sufficient user rights Content Server is fast becoming a vital content-management tool that exist, weManagement will successfully get (CMS) back the created Channel object. The comments should helps administrators and the developers handle the ever-increasing amount of content on their adequately explain what code is doing. Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Getting into Update how to effectively unlock thePublishingMode power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the platform. There are at least two ways toMicrosoft get a CMS Context into Update PublishingMode: This thorough reference explains the product architecture, then shows you how to create and edit andoruse the workflow. Topic coverage includes CMSauthenticated administration and security, 1. content Navigate redirect the posting to the URL that puts the user's the Publishing API, deployment options, site configuration, and template development. A CmsHttpContext into an Update PublishingMode. In an earlier example in this running example is used throughout the book to illustrate how important CMS features chapter, we included an unexplained anchor tag called Link to Update Mode. We are implemented in real-world Web site development. Inside find answers to such constructed the link using a Channel property calledyou'll UrlModeUpdate that we questions as: talk about later in this chapter. Run that sample and try clicking that link, and then click the Button. You will see that the PublishingMode changes from Published to Update. Alternatively, redirection could be used to put the Chapter 6: How do you customize workflow? See the following code for an CmsHttpContext into Update PublishingMode. example of how this might be accomplished (the Woodgrove sample uses this Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 approach): using Visual Studio .NET? Chapter 17: How do you establish user rights? if(cmsContext.Mode != PublishingMode.Update) { Chapter 22: How do you best deploy CMS according to your organization's needs, size, Response.Redirect(cmsContext.Channel.UrlModeUpdate, true); and resources? } else Chapter 32: How do you publish dynamic data? {
[ Team LiB ] // Create Channel here }
2. Use the CmsApplicationContext to authenticate into a stand-alone Context in Update PublishingMode, as we did in Chapter 24. However, the CmsApplicationContext will not be privy to the current channel, so an extra step will be required to position this stand-alone Context on the channel where we want to create our new channel. The steps in this approach include creating and authenticating a new CmsApplication Context in Update PublishingMode, positioning the CmsApplication Context to the current CmsHttpContext Channel, creating our Channel(s), committing our changes, and disposing of the CmsApplication Context. understand both methods, but standardizing on a single method and •It is good toTable of Contents using it Content consistently acrossServer the entire is wise.Guide Microsoft Management 2002:site A Complete ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
If the CreateNewChannel function fails for any reason, the Channel object passed back will simply be null. Publisher: Addison Wesley Pub Date: October 31, 2003
Listing 25-2 Function to create a new channel ISBN: 0-321-19444-6 Pages: 1136
private Channel CreateNewChannel (Channel parentChannel, string newChannelName) //***************************************************************** "This is one of those rare books that you will read to learn about the product and keep //Create a new Channel in the parentChannel using the rereading to find those tidbits that you missed before." //newChannelName both passed to the function —Gary Bushey, SharePoint Server MVP //Pass the created Channel back to the calling method //***************************************************************** Content Management Server (CMS) is fast becoming a vital content-management tool that { helps administrators and developers handle the ever-increasing amount of content on their //1. Declare a Channel variable Web sites. However, an authoritative source of product information has been missing . . . until Channel cmsNewChannel = null; now. try Microsoft Content Management Server 2002: A Complete Guide is the first book that explains { how to effectively unlock the power of CMS. Administrators and developers alike will learn how //2. Determine if the scalability, user has flexibility, sufficient to create to enhance their Web servers' andrights extensibility by using CMS features and //manage a Channel from would-beplatform. parent Channel API to content on the the Microsoft if(parentChannel.CanCreateChannels) { This thorough reference explains the product architecture, then shows you how to create and //3. Create the edit content and use theChannel workflow. Topic coverage includes CMS administration and security, cmsNewChannel = parentChannel.CreateChannel(); the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are //4. Validate successful implemented in real-world Web sitecreation development. Inside you'll find answers to such questions as: if(cmsNewChannel != null) { //5. Give it the Name passed to the function Chapter 6: How do you customize workflow? cmsNewChannel.Name = newChannelName; Chapter 10: How visual do you develop for of Microsoft Content Management Server (CMS) 2002 //6. Provide feedback Channel creation in Listbox1 using Visual Studio .NET? ListBox1.Items.Add(newChannelName + " Channel created in " +
parentChannel.Name.ToString() + " Channel" Chapter 17: How do you establish user rights? ); } Chapter 22: How do you best deploy CMS according to your organization's needs, size, else and resources? { //7. Provide feedback of creation failure in Listbox1 Chapter 32: How visual do you publish dynamic data? ListBox1.Items.Add(newChannelName +
" ]Channel creation failed"); [ Team LiB } } else { //8. Provide nonerror feedback to the developer Label1.Text = "User NOT allowed to create Channels"; } //9. Return the created Channel return cmsNewChannel; } catch(Exception eError) { //10. Provide error feedback to the developer • Table of=Contents Label1.Text "Error: " + eError.Message.ToString(); Microsoft Content Management Server 2002: A Complete Guide
Return the null Channel in the event of an ByBill //11. English, Olga Londer , Shawn Shell , Todd Bleeker , Stephen Cawood
error
return cmsNewChannel; } }
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
A new channel is not saved to the database until the CommitAll method is called on the Pages: 1136 Context. The default values for properties are either empty, inherited from the parent channel (including rights), or intuitive. Also, CMS allows the creation of duplicate channels even though this can lead to a situation where ambiguous objects in the hierarchy are created. Of course, they will have different GUIDs, so CMS won't get confused, but it may be confusing to users. So "This one of those rare books that programmatically. you will read to learn about the product and keep it mayisbe wise to prevent duplicates rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server along MVP with some elementary PAPI code, to create the Now let's use these two functions, channel hierarchy depicted in Figure 25-1. Ensure that the code from Listings 25-1 and 25-2 is Content Management Server (CMS) is fastofbecoming a vital content-management tool that entered above the Button1_Click function our Scratchpad template file. helps administrators and developers handle the ever-increasing amount of content on their Web sites. an authoritative of product information has the been missing code: . . . until Replace theHowever, Button1_Click function of source our Scratchpad template file with following now. Microsoft Management Server 2002: A Complete Guide is the first private Content void Button1_Click(object sender, System.EventArgs e) book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how { to try enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API{ to manage content on the Microsoft platform. //1. Grab the current CMS Context This thorough reference explains the product architecture, then shows you how to create and CmsHttpContext cmsContextHttp = CmsHttpContext.Current; edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, options, site configuration, and template development. A //2. Grab andeployment Authenticated Context in Update PublishingMode running example is used throughout the book to illustrate how important CMS features are // using the GetAuthenticatedCmsApplicationContext function implemented in real-world Web site development. Inside you'll find answers to such questions // from Listing 25–1 as: CmsApplicationContext cmsContextApp = GetAuthenticatedCmsApplicationContext(PublishingMode.Update); Chapter 6: How the do you customize workflow? //3. Position Application Context to the current // CmsHttpContext Channel using its GUID (the most efficient Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 // Searches method) using Visual Studio .NET? // Cast the result of the Searches object as a Channel Channel currentChannel = Chapter 17: How do you establish user rights? cmsContextApp.Searches.GetByGuid(cmsContextHttp.Channel.Guid) as Channel; Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? //4. Populate the label with the name of the Application // Context Channel PublishingMode Chapter 32: How do you and publish dynamic data? Label1.Text = "Channel: " +
+ [ Team currentChannel.Name.ToString() LiB ] "
PublishingMode: " + cmsContextApp.Mode.ToString(); //5. Create the Channel hierarchy depicted in Figure 25–1 // using the CreateNewChannel function from Listing 25–2 Channel FamilyChannel; Channel ParentChannel; Channel ChildChannel; familyChannel = CreateNewChannel(currentChannel, "Brady"); parentChannel = CreateNewChannel(familyChannel, "Alice");
•
parentChannel = CreateNewChannel(familyChannel, "Carol"); childChannel = CreateNewChannel(parentChannel, "Jan"); childChannel = CreateNewChannel(parentChannel, "Marsha"); Table of Contents childChannel = CreateNewChannel(parentChannel, "Cindy");
Microsoft Content Management Server 2002: A Complete Guide
CreateNewChannel(familyChannel, ByBill parentChannel English, Olga Londer=, Shawn Shell, Todd Bleeker, Stephen Cawood childChannel = CreateNewChannel(parentChannel, childChannel = CreateNewChannel(parentChannel, childChannel = CreateNewChannel(parentChannel, Publisher: Addison Wesley
"Mike"); "Greg"); "Peter"); "Bobby");
Pub Date: October 31, 2003
//6. Commit of all changes. If not explicitly called, the ISBN: 0-321-19444-6 // disposition of changes will be based upon Pages: 1136 // RollbackOnSessionEnd cmsContextApp.CommitAll(); //7. Dispose of the stand-alone Application Context "ThiscmsContextApp.Dispose(); is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." } —Gary Bushey, SharePoint Server MVP catch(Exception eError) { Content Management Server (CMS) is to fastthe becoming a vital content-management tool that //8. Provide error feedback developer helpsLabel1.Text administrators and developers handle the ever-increasing amount of content on their = "Error: " + eError.Message.ToString(); Web sites. However, an authoritative source of product information has been missing . . . until } now. } Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. NOTE: The Searches method of a CMS Context is covered in detail in Chapter 28. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it running example is used throughout the book to illustrate how important CMS features are and click the Button. The page should reload and look similar to Figure 25-3. implemented in real-world Web site development. Inside you'll find answers to such questions as:
Figure 25-3. Create channel hierarchy
Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pubdown Date: October 31, 2003 Scroll the ListBox to see all the channels created. Open Site Manager or choose Global RefreshISBN: from the Site Manager View menu if it is already open. The channel hierarchy as 0-321-19444-6 depicted in Figure 25-1 should be displayed. Pages: 1136
CreatePosting "This is one of those rare books that you will read to learn about the product and keep rereading todon't find those you missed Hierarchies do us tidbits a lot ofthat good unless we before." can put postings in them. Channel hierarchies —Gary Bushey, SharePoint Server MVP are designed to house postings. To successfully use the CreatePosting method, the
CanCreatePostings property must return true for the referencing Channel object, and the Content Management Server is fast becoming vital content-management toolisn't thattoo PublishingMode must be set to(CMS) Update. Ensuring that aCanCreatePostings returns true helps administrators and developers handle the ever-increasing amount of content on their difficult. Remember, you must be in Update Mode to do this (see the Getting into Update Web sites. However, an authoritative source of product information has been missing . . . until PublishingMode sidebar). now. A new posting is not saved to the database until the CommitAll method is called on the Microsoft Content Management 2002: Complete Guide is the first book that explains Context. The default values for Server properties areAeither empty or intuitive. Also, CMS allows the how to effectively unlock the power of CMS. Administrators and developers alike will learn creation of duplicate postings. This can lead to a situation where ambiguous objects in the how to enhance their Web servers' scalability, and extensibility by using features and hierarchy are created. Of course, they willflexibility, have different GUIDs, so CMS won'tCMS get confused, API to manage content on the Microsoft platform. but it may be confusing to users. So it may be wise to prevent duplicates programmatically. This thorough reference explains the product architecture, shows you how to function create and Similar to the CreateNewChannel function in Listing 25-2 isthen the CreateNewPosting in edit content and use the workflow. Topic coverage includes CMS administration and security, Listing 25-3. We can simply call the CreateNewPosting function, passing it the Channel object in the Publishing development. which we wantAPI, the deployment new posting options, created, site the configuration, name we wantand the template new posting to have, asAwell as running example is used throughout the book to illustrate how important CMS features are the template we want to base the new posting on, and we can be confident that, assuming implemented in real-world Web site development. Inside you'll find answers to such questions sufficient user rights exist, we will successfully get back the created Posting object. The as: comments should adequately explain what the code is doing. If the CreateNewPosting function
fails for any reason, the Posting object that is passed back will simply be null. Chapter 6: How do you customize workflow?
Listing 25-3 Function to create a new posting Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? private Posting CreateNewPosting ChapterparentChannel, 17: How do you establish user rights? (Channel string newPostingName, Template cmsTemplate) Chapter 22: How do you best deploy CMS according to your organization's needs, size, //**************************************************************** and resources? //Create a new Posting in the parentChannel using the //newPostingName based upon the cmsTemplate all passed to the Chapter 32: How do you publish dynamic data? //function. Pass the created Posting back to the calling method
[//**************************************************************** Team LiB ] { //1. Declare a Posting variable Posting cmsNewPosting = null;
try { //2. Determine if the user has sufficient rights to create // a Posting from the would-be parent Channel if(parentChannel.CanCreatePostings) { //3. Create the Posting using the Template passed to // the function cmsNewPosting = parentChannel.CreatePosting(cmsTemplate); //4. Validate successful creation • Table of Contents != null) if(cmsNewPosting Microsoft{Content Management Server 2002: A Complete Guide //5. the Shell Name passed the function ByBill English , OlgaGive Londerit , Shawn , Todd Bleekerto , Stephen Cawood cmsNewPosting.Name = newPostingName; //6. Provide visual feedback of Posting creation ListBox1.Items.Add( newPostingName + Publisher: Addison Wesley " Posting created in " + Pub Date: October 31, 2003 parentChannel.Name.ToString() + " Channel" ISBN: 0-321-19444-6 ); Pages: 1136 } else { //7. Provide visual feedback of creation failure "This is one of those rare books that you will read to ListBox1.Items.Add(newPostingName + learn about the product and keep rereading to"find those tidbits that failed" you missed before." Posting creation —Gary Bushey, ); SharePoint Server MVP } Content } Management Server (CMS) is fast becoming a vital content-management tool that helpselse administrators and developers handle the ever-increasing amount of content on their Web {sites. However, an authoritative source of product information has been missing . . . until now. //8. Provide nonerror feedback to the developer Label1.Text = "User NOT allowed to create Postings"; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains } how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and //9. Return the created Posting API to manage content on the Microsoft platform. return cmsNewPosting; } This thorough reference explains the product architecture, then shows you how to create and catch(Exception eError) edit content and use the workflow. Topic coverage includes CMS administration and security, the{ Publishing API, deployment options, site configuration, and template development. A //10. Provide error feedback thetodeveloper running example is used throughout theto book illustrate how important CMS features are Label1.Text = "Error: " + eError.Message.ToString(); implemented in real-world Web site development. Inside you'll find answers to such questions as:
//11. Return the null Posting in the event of an error return cmsNewPosting; } Chapter 6: How do you customize workflow?
} Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Next we will create a posting named Sam based upon our Scratchpad template file from the Chapter 17: Howcalled do you establish in user Root TemplateGallery Templates therights? Alice channel (/Channels/Scratch/Brady/Alice) of the channel hierarchy created in the previous code example. Ensure that the code from Listings Chapter How doabove you best CMS according needs, file size, 25-1 and 25-322: is entered thedeploy Button1_Click functiontoofyour our organization's Scratchpad template and andchannel resources? that the hierarchy from the previous code example is visible in Site Manager. Thus far, our posting doesn't have any placeholders to be troubled with. Chapter 32: How do you publish dynamic data? Replace the Button1_Click function of our Scratchpad template file with the following code:
[ Team LiB ]
private void Button1_Click(object sender, System.EventArgs e) { try { //1. Grab the current CMS Context CmsHttpContext cmsContextHttp = CmsHttpContext.Current; //2. Grab the Template to create a Posting using its path // Cast the result of the Searches object as a Template Template scratchpadTemplate = cmsContextHttp.Searches.GetByPath( "/Templates/ScratchpadTemplate") as Template; •
Table of Contents
Microsoft Content Server 2002: A Complete //3. GrabManagement an Authenticated Context inGuide Update
PublishingMode // using the GetAuthenticatedCmsApplicationContext function ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood // from Listing 25–1 CmsApplicationContext cmsContextApp = GetAuthenticatedCmsApplicationContext(PublishingMode.Update); Publisher: Addison Wesley Pub Date: October 31, 2003
//4. Grab the Channel to create a Posting using its path ISBN: 0-321-19444-6 // Cast the result of the Searches object as a Channel Pages: 1136 Channel cmsAliceChannel = cmsContextApp.Searches.GetByPath( "/Channels/Scratch/Brady/Alice") as Channel; "This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missed before." //5. to Create a new Posting called Sam in the Alice Channel —Gary Bushey, SharePoint Server MVP // based upon the Scratchpad Template using the // CreateNewPosting function from Listing 25–3 Content Management Server is fast becoming a vital content-management tool that Posting cmsPosting = (CMS) CreateNewPosting(cmsAliceChannel, helps administrators and developers handle the ever-increasing amount of content on their "Sam", Web sites. However, an authoritative source of product information has been missing . . . until scratchpadTemplate); now. //6. If Posting was successfully created it will not be null Microsoft Content Management if(cmsPosting != null) Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how { to enhance their Web servers' scalability, flexibility, extensibility by using CMS features and //7. Populate the label with the name ofand the Application API to manage content on the Microsoft platform. // Context Channel, then name of the created Posting, // and PublishingMode This thorough reference explains the product architecture, then shows you how to create and Label1.Text = "Channel: " + edit content and use the workflow. Topic coverage includes CMS administration and security, cmsAliceChannel.Name.ToString() + the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are "
Posting: " + implemented in real-world Web site development. Inside you'll find answers to such questions cmsPosting.Name.ToString() + as: "
PublishingMode: " + cmsContextApp.Mode.ToString(); Chapter 6: How do you customize workflow? } //8. Commit of all changes. explicitly the Server (CMS) 2002 Chapter 10: How do you develop If for not Microsoft Content called, Management // of changes will be based upon using disposition Visual Studio .NET? // RollbackOnSessionEnd Chapter 17: How do you establish user rights? cmsContextApp.CommitAll(); Chapter 22: How youstand-alone best deploy CMS according Context to your organization's needs, size, //9. Dispose of do the Application and resources? cmsContextApp.Dispose();
} Chapter 32: HoweError) do you publish dynamic data? catch(Exception
{ [ Team LiB ] //10. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); } }
Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. The page should reload and look similar to Figure 25-4.
Figure 25-4. Create posting
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Open Site Manager or choose Global Refresh from the Site Manager View menu if it is already now. open. Drill into the channel hierarchy until you can highlight the Alice channel. The new Sam Microsoft Content Server A Complete Guide is the25-5. first book that explains posting should be Management visible in the pane to2002: the right, as shown in Figure how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Figure Web servers' scalability, flexibility, and extensibility by using CMS features and 25-5. Created posting in Site Manager API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
CreateConnectedPosting Sometimes sense for postings share will the explore this and concept "This is one itofmakes those rare books that youtowill readcontent. to learnWe about product keepin detail in the nexttochapter. Fortidbits now, just aware of the rules: To successfully use the rereading find those thatbe you missed before." CreateConnectedPosting method, CanCreatePostings property and the CanSetProperties —Gary Bushey, SharePoint Serverthe MVP property must both return true for the referencing Channel and Posting objects, respectively. As always, the PublishingMode must is befast set becoming to Update.a Avital newcontent-management ConnectedPosting is not Content Management Server (CMS) toolsaved that to the database until theand CommitAll method is called on the Context. The default values helps administrators developers handle the ever-increasing amount of content onfor their properties either empty or intuitive; however, the following properties aremissing shared between Web sites. are However, an authoritative source of product information has been . . . until ConnectedPosting objects: Description, Name, Placeholders, and CustomProperties. CMS allows now. the creation of ConnectedPosting objects with duplicate names. There is also a material limit of Microsoft Management A Complete Guide is the first book that explains 15 distinctContent Template objects forServer a pool 2002: of ConnectedPostings to share. Attempting to go beyond how to effectively power of Administrators and developers alike will learn how that limit will resultunlock in an the exception. It CMS. may be wise to create a CreateNewConnectedPosting to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and function to encapsulate that functionality. API to manage content on the Microsoft platform. The state of the newly created ConnectedPosting is dependent on the state of the existing This thorough referencewhether explainsthe thechannel producthas architecture, then you how create and posting and sometimes a moderator orshows not. Table 25-1to provides the edit content andvalues. use the workflow. Topic coverage includes CMS administration and security, matrix of state the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Delete (Inherited from HierarchyItem) as: We've created a channel hierarchy using PAPI; let's delete that hierarchy in like manner. To Chapteruse 6: the HowDelete do you customize successfully method, the workflow? CanDelete property must return true for the referencing HierarchyItem (Channel or Posting). See the rules for CanDelete earlier in this Chapter 10: How you develop for Microsoft Management Server (CMS) 2002 chapter. As before, thedo PublishingMode must be set Content to Update. using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best Initial deploy CMS according to your organization's Table 25-1. ConnectedPosting State needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ] Posting Existing State
Channel Moderator
New ConnectedPosting State
New
Yes or No
New
Saved
Yes or No
Saved
Waiting For
Yes or No
Waiting For Editor Approval Editor Approval
Editor Declined
Yes or No
Editor Declined
Waiting For
No
Approved, Published, or Expired Moderator Approval
Moderator Declined
No
Approved, Published, or Expired
No Table of Contents
Approved, Published, or Expired
• Approved
Microsoft Content Management Server 2002: A Complete Guide
Published
No
Approved, Published, or Expired
Expired
No
Approved, Published, or Expired
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Waiting ForAddison Wesley Yes Publisher: Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Moderator Declined Yes
Waiting For Moderator Approval Moderator Approval Waiting For Moderator Approval
Pages: 1136
Approved
Yes
Waiting For Moderator Approval
Published
Yes
Waiting For Moderator Approval
"This is one of those rare Yes books that you will read to learn the product and keep Expired Waiting For about Moderator Approval rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Calling the Delete method merely marks an item for deletion. The item isn't actually deleted from theManagement database until CommitAll is called. after a CommitAll, thethat item Content Server (CMS)onis the fastContext becoming a vital Even content-management tool isn't actually deleted from any in-memory collection in which it existed before deletion. helps administrators and developers handle the ever-increasing amount of content on their Interaction with a deleted item beforesource CommitAll will return read-only values; interaction Web sites. However, an authoritative of product information has been missing . . . with untila deleted item after CommitAll will cause an exception. Unlike with Site Manager, deletion of an now. item after a CommitAll cannot be undone. The item is not moved into a Deleted Items folder. It is possibleContent to undoManagement a delete before a CommitAll by calling a RollbackAll. Anybook attempt delete Microsoft Server 2002: A Complete Guide is the first thatto explains an item that is being edited by another user will cause an exception. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and In Listing 25-4 iscontent a function called DeleteAllChildrenFrom. We can use it to delete all the API to manage on the Microsoft platform. postings and channels for the Channel object passed to the function. The child channels must be empty for CMS to delete them.the So,product it is implied that anythen postings and channels any and This thorough reference explains architecture, shows you how to of create decedents will also be deleted. We will call this function recursively to accomplish this task. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running is used throughout the book illustrate how important CMS features are Listingexample 25-4 Function to delete alltochildren from a channel implemented in real-world Web site development. Inside you'll find answers to such questions as:
private void DeleteAllChildrenFrom(Channel cmsChannel) //***************************************************************** Chapter 6: How do you customize workflow? //Delete all Postings and Channels from the cmsChannel //passed to 10: theHow function. If a child ChannelContent has children, this Chapter do you develop for Microsoft Management Server (CMS) 2002 //function is called recursively using Visual Studio .NET? //***************************************************************** { Chapter 17: How do you establish user rights? try { Chapter 22: How do you best deploy CMS according to your organization's needs, size, //1. Iterate each Channel in the Channels collection and resources? foreach (Channel cmsChildChannel in cmsChannel.Channels) {Chapter 32: How do you publish dynamic data? //2. Check to see if a child Channel has children
> 0) [ Team if(cmsChildChannel.AllChildren.Count LiB ] { //3. Call this function recursively DeleteAllChildrenFrom(cmsChildChannel); } //4. Check if the user has sufficient rights to delete if(cmsChildChannel.CanDelete) { //5. Delete empty Channel cmsChildChannel.Delete(); //6. Provide visual feedback of Channel deletion ListBox1.Items.Add( cmsChildChannel.Name + " Channel was deleted from " + • Table of Contents cmsChannel.Name.ToString() + " Channel " Microsoft Content ); Management Server 2002: A Complete Guide } ,Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill English } //7. Iterate each Posting in the Postings collection foreach (Posting Publisher: Addison Wesley cmsChildPosting in cmsChannel.Postings) { Pub Date: October 31, 2003 //8. Check if the user has sufficient rights to delete ISBN: 0-321-19444-6 if(cmsChildPosting.CanDelete) Pages: 1136 { //9. Delete the Posting cmsChildPosting.Delete(); "This is one of those rare books that you deletion will read to learn about the product and keep //10. Validate successful rereading if(cmsChildPosting.IsDeleted) to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP {
//11. Provide visual feedback of Posting deletion Content Management Server is fastof becoming a vital content-management tool that // Notice that(CMS) the Name a deleted item can be helps administrators and developers handle the ever-increasing amount of content on their // referenced as read-only Web sites.ListBox1.Items.Add( However, an authoritative source of product information has been missing . . . until cmsChildPosting.Name + now. " Posting was deleted from " + cmsChannel.Name.ToString() + " Channel" Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ); how to effectively unlock the power of CMS. Administrators and developers alike will learn how } to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and } API to manage content on the Microsoft platform. } } thorough reference explains the product architecture, then shows you how to create and This catch(Exception eError) edit content and use the workflow. Topic coverage includes CMS administration and security, the{ Publishing API, deployment options, site configuration, and template development. A //12. Provide error feedback thetodeveloper running example is used throughout theto book illustrate how important CMS features are Label1.Text = "Error: " + eError.Message.ToString(); implemented in real-world Web site development. Inside you'll find answers to such questions as:} } Chapter 6: How do you customize workflow? Next we'll delete the entire channel hierarchy we created earlier in this section (posting and all), leaving original Scratch channel the single Pad posting. Chapterthe 10: How do you develop forand Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Replace the Button1_Click function of our Scratchpad template file with the following code: Chapter 17: How do you establish user rights?
private void22: Button1_Click(object sender, System.EventArgs e) Chapter How do you best deploy CMS according to your organization's needs, size, { and resources? try { Chapter 32: How do you publish dynamic data? //1. Grab the current CMS Context
CmsHttpContext cmsContextHttp = CmsHttpContext.Current; [ Team LiB ] //2. Grab an Authenticated Context in Update PublishingMode // using the GetAuthenticatedCmsApplicationContext function // from Listing 25–1 CmsApplicationContext cmsContextApp = GetAuthenticatedCmsApplicationContext(PublishingMode.Update); //3. Grab the Channel to expunge // Cast the result of the Searches object as a Channel Channel cmsBradyChannel = cmsContextApp.Searches.GetByPath("/Channels/Scratch/Brady") as Channel; //4. Populate the label with the name of the Application Table of Contents // Context Channel and PublishingMode Microsoft Content Management Server 2002: A Complete Guide Label1.Text = "Channel: " + cmsBradyChannel.Name.ToString() + ByBill English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood •
"
PublishingMode: " + cmsContextApp.Mode.ToString(); Publisher: Addison Wesley Pub Date: October 31, 2003
//5. Delete all Channels (and their descendants) and Postings ISBN: 0-321-19444-6 DeleteAllChildrenFrom(cmsBradyChannel); Pages: 1136
//6. Check if the user has sufficient rights to delete if(cmsBradyChannel.CanDelete) { "This is//7. one ofDelete those rare books that you will read to learn about the product and keep empty parent Channel rereading to find those tidbits that you missed before." cmsBradyChannel.Delete(); —Gary Bushey, SharePoint Server MVP //8. Provide visual feedback of Posting creation in Listbox1 ContentListBox1.Items.Add( Management Server (CMS) is fast becoming a vital cmsBradyChannel.Name + content-management tool that helps administrators and developers handle the ever-increasing amount of content on their " Channel was deleted from " + Web sites.cmsBradyChannel.Parent.Name.ToString() However, an authoritative source of product information has"been missing . . . until + " Channel now. ); } Microsoft Content Management Server 2002: A Complete Guide is the first book that explains //9. Commit of all changes. If not explicitly called the how to effectively unlock the power of CMS. Administrators and developers alike will learn how // disposition of changes will be based upon to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and // RollbackOnSessionEnd API to manage content on the Microsoft platform. cmsContextApp.CommitAll(); This thorough reference explains the product architecture, then shows you how to create and //10. Dispose of workflow. the stand-alone Application edit content and use the Topic coverage includesContext CMS administration and security, cmsContextApp.Dispose(); the Publishing API, deployment options, site configuration, and template development. A } running example is used throughout the book to illustrate how important CMS features are catch(Exception eError) implemented in real-world Web site development. Inside you'll find answers to such questions { as: //11. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); } Chapter 6: How do you customize workflow? } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it Chapter 17: HowThe do page you establish user rights? and click the Button. should reload and look similar to Figure 25-6. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Figure 25-6. Delete channel hierarchy and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pubdown Date: October 2003 Scroll the list31, box to see all the channels and postings deleted. Open Site Manager or chooseISBN: Global Refresh from the Site Manager View menu if it is already open. The entire 0-321-19444-6 channel hierarchy as depicted in Figure 25-1 should be expunged. Notice that you don't even Pages: 1136 find it in the Deleted Items hive.
Of course, create and delete functionality is typically the domain of a CMS administrator. This PAPI functionality would naturally be manifest in custom administration pages or Web Author "This is one of those rare books that you will read to learn about the product and keep customizations. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that NOTE: See Chapter 30 for details on customizing the Web Author. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Working with Channel Members Channels have a vast store of characteristics to be tapped by the developer using PAPI. Some can be changed in code, while others are for retrieval only. We focus on the read-only members first. We start with a comprehensive code example, then an alphabetical list of read-only members specific to Channel objects, followed by an alphabetical list of read-only members inherited for use by Channel objects. Then we focus on read/write members. Again, we start with a comprehensive code example, then an alphabetical list of read/write members specific to Channel objects, followed by an alphabetical Table list ofofread/write • Contents members inherited for use by Channel objects. Microsoft Content Management Server 2002: A Complete Guide
There are some common facts and concepts about CMS dates that will help us throughout the list of members (see the CMS Dates sidebar for details).
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
CMSISBN: Dates 0-321-19444-6 Pages: 1136
All date and time fields use Coordinated Universal Time. The time can be converted to local time using the ToLocalTime method like this: "This is one of those rare books that you will read to learn about the product and keep x = CmsHttpContext.Channel.ChangeDate.ToLocalTime; rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
ToLocalTime can also be used in client-side JavaScript so that the time zone on the Content Serverthan (CMS) fastzone becoming vital content-management tool that browsingManagement PC is used rather the is time on theaserver. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative product information hastime beenproperty missing . . . until To indicate that a ChannelItem objectsource never of expires, set the date and now. to January 01, 3000. If the date property is January 01, 3000, this property is displayed using the string "Never" in the corresponding user interfaces. Similarly, Microsoft Content Management A Complete Guide is the first that explains script should be written so that Server a date 2002: of January 01, 3000 is displayed by book your code how to effectively unlock the power of CMS. Administrators and developers alike will learn how as the string "Never". to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to 25-2 manage content on the Microsoft Table summarizes the five channelplatform. date and time fields and how they relate to one another. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A After a channel has been deleted but before it is committed, all properties become read-only. running example is used throughout the book to illustrate how important CMS features are However, even after a deleted channel is committed, it may still reside in an in-memory implemented in real-world Web site development. Inside you'll find answers to such questions collection. IsDeleted is one of the few properties that can still be read after a deletion and as: before a commit. Most other properties will cause an exception if they are referenced. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Table 25-2. Channel Date and Time Fields using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Created Team LiB ] Date
Date created.
ChangeDate
Date of implicit change.
Never Equal to most changes. recent date greater than today: LastModifiedDate, StartDate, or ExpiryDate.
•
Table of Contents
StartDate
ExpiryDate
Date object becomes visible.
Date object ceases to be Visible.
Always less than ExpiryDate.
Always more recent than StartDate.
Within range of parent StartDate and ExpiryDate.
Within range of parent StartDate and ExpiryDate
LastModified Date
RevisionDate
Date of explicit Date of most change. recent ChangeDate for Always more revisions, if recent than or any. equal to CreatedDate. If January 01, 3000, there is not a historical revision.
Microsoft Content Management Server 2002: A Complete Guide
Historical revisions of a channel don't keep the value By Bill English , Olga Londer , Shawn Shell , Toddtypically Bleeker, Stephen Cawood
that was associated with the revision when it was the current version. The following properties are the only ones that can be different across all revisions: ChangeDate, CreatedBy, CreatedDate, Description, and Revision Date. All other properties Publisher: Addison Wesley represent the value of the current revision regardless of the value when the historical revision was the current revision. Attempting to assign a value to these Pub Date: October 31, 2003 properties for a historical revision will result in an exception. ISBN: 0-321-19444-6 Pages: 1136
Read-Only Members "This is one those rare books that you will readmembers to learn about the product and keep The code to of see all the read-only Channel object is presented comprehensively. rereading toitfind missed before." to better understand it, but we don't Sometimes justthose helpstidbits to seethat the you output of a property —Gary SharePoint MVP want toBushey, mess with a million Server code examples. Content Management Server (CMS)ofis our fastScratchpad becoming atemplate vital content-management toolcode: that Replace the Button1_Click function file with the following helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until private void Button1_Click(object sender, System.EventArgs e) now. { //1. Put current Channel Server into variable Microsoft Content Management 2002: A Complete Guide is the first book that explains Channel cmsChannel CmsHttpContext.Current.Channel; how to effectively unlock = the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Populate the on label with read-only API//2. to manage content the Microsoft platform.properties of a Channel Label1.Text = This thorough reference " explains product architecture, then shows "
IsRoot: + the cmsChannel.IsRoot.ToString() + you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, "
Channel: " + cmsChannel.Name.ToString() + the Publishing API, deployment options, site configuration, and template development. A "
ChangeDate: " + cmsChannel.ChangeDate.ToString() + running example is used throughout the book to illustrate how important CMS features are "
CreatedBy: " + cmsChannel.CreatedBy.ToString() + implemented in real-world Web site development. Inside you'll find answers to such questions "
CreatedDate: " + as: cmsChannel.CreatedDate.ToString() + "
DisplayPath: " + cmsChannel.DisplayPath.ToString() + Chapter 6: How do you customize "
GetHashCode: " + workflow? cmsChannel.GetHashCode().ToString() + Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 "
GetType: " + cmsChannel.GetType().ToString() + using Visual Studio .NET? "
Guid: " + cmsChannel.Guid.ToString() + "
IsDeleted: " + cmsChannel.IsDeleted.ToString() + Chapter 17: How do you establish user rights? "
IsDescendantOf: " + cmsChannel.IsDescendantOf(cmsChannel.Parent).ToString() + Chapter 22: How do you best deploy CMS according to your organization's needs, size, "
IsWorkingRevision: " + and resources? cmsChannel.IsWorkingRevision.ToString() + "
LastModifiedBy: " + Chapter 32: How do you publish dynamic data? cmsChannel.LastModifiedBy.ToString() +
"
LastModifiedDate: " + [ Team LiB ] cmsChannel.LastModifiedDate.ToString() + "
OwnedBy: " + cmsChannel.OwnedBy.ToString() + "
Path: " + cmsChannel.Path.ToString() + "
QueryString: " + cmsChannel.QueryString.ToString() + "
QueryStringModeUnpublished: " + cmsChannel.QueryStringModeUnpublished.ToString() + "
QueryStringModeUpdate: " + cmsChannel.QueryStringModeUpdate.ToString() + "
RevisionDate: " + cmsChannel.RevisionDate.ToString() + "
Url: " + cmsChannel.Url.ToString() + "
UrlInner: " + cmsChannel.UrlInner.ToString() + "
UrlInnerPlain: " + • Table of Contents cmsChannel.UrlInnerPlain.ToString() + Microsoft Content Management Server 2002: A Complete Guide "
UrlModePublished: " + cmsChannel.UrlModePublished.ToString() + ByBill English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood "
UrlModeUnpublished: " + cmsChannel.UrlModeUnpublished.ToString() + "
UrlModeUpdate: " + Publisher: Addison Wesley cmsChannel.UrlModeUpdate.ToString(); Pub Date: October 31, 2003 } ISBN: 0-321-19444-6 Pages: 1136
Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. The page should reload and look similar to Figure 25-7. "This is one of those rare books that you will read to learn about the product and keep Figure 25-7. Show read-only members rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and Read-Only Members Channels edit content and use theSpecific workflow.to Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions IsRoot as:
The IsRoot property is the only read-only member of the Channel object that is not inherited from another Asdo discussed at the beginning Chapter class. 6: How you customize workflow? of this chapter, there can only be one RootChannel, and it is built in to CMS. It is always called /Channels. If the Channel represented 10: How do you develop for Microsoft Management Server by theChapter object is the built-in CMS RootChannel, it will Content return true; otherwise, it will (CMS) return 2002 false. using Visual Studio .NET? This member can be useful for determining when we are at the top of the channel hierarchy 17: How do you establish rights? when Chapter dynamically building navigation oruser a breadcrumb display. It is essentially a shortcut for determining if the current object equals the RootChannel. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Read-Only Members Inherited for Use by Channels Chapter 32: How do you publish dynamic data?
[ Team LiB ]
ChangeDate (Inherited from ChannelItem) The ChangeDate property retrieves the date and time of the latest implicit change. It has the standard characteristics of a CMS date and time field described and summarized with the other dates at the beginning of this section. This date can change without any user interaction. The passage of time could bring a ChannelItem to its StartDate or its ExpiryDate, resulting in a change in ChannelItem status. The date of these implicit changes is recorded here. So, this date will be equal to the most recent LastModifiedDate, StartDate, or ExpiryDate that is greater than today. This member can be useful for identifying fresh content on a Web Property.
CreatedBy Table (Inherited from HierarchyItem) of Contents
•
Microsoft Content Management Server 2002: A Complete Guide
The CreatedBy property retrieves a User object indicating the user that created the referencing ChannelItem.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
This member can be useful for showing a few characteristics about the user that created the Publisher: Addison Wesley ChannelItem. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
CreatedDate (Inherited from HierarchyItem) The CreatedDate property retrieves the date and time that the ChannelItem was created. It has the standard characteristics of a CMS date and time field described and summarized with "This is one of those books that yousection. will read to learn about the product and keep the other dates at therare beginning of this rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP the date and time that the ChannelItem was created or This member can be useful for showing identifying aged information still found on a Web Property. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until DisplayPath (Inherited from ChannelItem) now. The DisplayPath retrieves the 2002: fully qualified pathGuide using the DisplayName rather than Microsoft Contentproperty Management Server A Complete is the first book that explains the Name of the ChannelItems involved. TheAdministrators DisplayPath begins, ends, and alike is delimited with a how to effectively unlock the power of CMS. and developers will learn how forward slash ("/"). The RootChannel is concatenated sequentially with name each to enhance their Web servers' scalability, flexibility, and extensibility bythe using CMSoffeatures and ChannelItem in content the object's ancestry. API to manage on the Microsoft platform. member can be useful for showing the full path to thisthen Channel Item can usedand as This thorough reference explains the product architecture, shows youbut how tobe create inputcontent to the Searches method of a Context or for dynamically constructing a URL. edit and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web siteCmsObject) development. Inside you'll find answers to such questions GetHashCode (Inherited from as: The GetHashCode method retrieves the hash code for the object. Chapter 6: How do you customize workflow? This identifier is not frequently used by the developer. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
GetType (Inherited from System.Object) Chapter 17: How do you establish user rights?
The GetType method retrieves the name of the namespace for the instance that the object Chapter 22: How do you best deploy CMS according to your organization's needs, size, represents. For example, Channel objects will always return and resources? Microsoft.ContentManagement.Publishing.Channel. Chapter 32: How do you publish dynamic data? This member can be useful for determining what kind of object is represented by an item in the
the ChannelItem property of a CmsHttpContext, or the result of Context [AllChildren Team LiB Collection, ] Searches.
Guid (Inherited from HierarchyItem) A GUID property by definition contains a globally unique identifier. This is generated when the object is created and committed into the CMS Repository, and it never changes. Effectively a candidate key, the GUID is alphanumeric, 32 characters long, separated by dashes, generated in part by the hardware on which the code is running, and guaranteed to be unique across the globe forever. When a new ChannelItem has been created but has yet to be committed, a temporary, all zero GUID is used. •
Table of Contents
This member can be especially useful for searching for a ChannelItem in a Context. This property was employed in the code example for creating a new ChannelItem earlier in this By Bill English , Olga Londer , ShawnGUID Shell, Todd Bleeker , Stephen Cawood chapter. Since the assigned doesn't change (like Name and therefore Path can), an object's GUID is a good candidate to be held in application state (query string, form element, view state, and cookie, to name a few), used to dynamically construct URLs (it contains no Publisher: Addison Wesley special characters), or used to index a custom collection. Microsoft Content Management Server 2002: A Complete Guide
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
IsDeleted (Inherited from HierarchyItem) Pages: 1136
The IsDeleted property retrieves a Boolean value that indicates whether the referencing ChannelItem has been deleted or not. It will be true if the referencing ChannelItem has been "This is one of those rare books that you will read to learn about the product and keep deleted. rereading to find those tidbits that you missed before." This member can be useful to check through a collection when a user wants to undo a deletion —Gary Bushey, SharePoint Server MVP before a commit. After a committed delete, this member is obviously useful to determine Content Server is fast a vital that whether Management a specific object in a (CMS) collection hasbecoming been deleted or content-management not. If it has, we avoidtool accessing helps administrators developers the ever-increasing amount of content any other method so and as not to invokehandle an exception. This property was employed in on thetheir code Web sites. of Item product information beenchapter. missing . . . until example forHowever, creating an andauthoritative deleting the source Channel hierarchy earlierhas in this now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains IsDescendantOf (Inherited from HierarchyItem) how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and The to IsDescendantOf method whether the referencing ChannelItem is an eventual API manage content on thedetermines Microsoft platform. child of another ChannelItem object. This is the only ChannelItem member that requires a parameter. Wereference must indicate what object we architecture, want to verifythen is the referencing ChannelItem's This thorough explains the product shows you how to create and ancestor. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A This member can is beused useful for dynamically creating navigation and breadcrumbs. running example throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
IsWorkingRevision (Inherited from HierarchyItem) Chapter 6: How do you customize workflow? The IsWorkingRevision property retrieves a Boolean value that indicates whether the referencing ChannelItem is a working revision (work in progress) rather than a historical Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 revision. It will be true if it is a working revision. Working revisions can be edited, whereas using Visual Studio .NET? historical revisions cannot. Chapter 17: How do you establish user rights? This member can be useful to determine if an edit will, regardless of user rights, even be possible. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? LastModifiedBy (Inherited from HierarchyItem)
LastModifiedBy property returns a User object indicating the user that created the [The Team LiB ] referencing ChannelItem. It is the same as the Created By property if the referencing ChannelItem has never been modified. This member can be useful for showing a few characteristics about the user that last modified the ChannelItem.
LastModifiedDate (Inherited from HierarchyItem) The LastModifiedDate property has the standard characteristics of a CMS date and time field described and summarized with the other dates at the beginning of this section. This member can be useful for showing the date and time that the ChannelItem was last modified or for identifying aged/fresh information found on a Web Property.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
OwnedBy (Inherited from HierarchyItem)
ThePublisher: OwnedBy property Addison Wesleyreturns a User object indicating the user that currently owns an object. When a user begins properties for a ChannelItem, they become the OwnedBy user Pub Date: October 31,updating 2003 unless someone else is making changes. Only one person at a time is allowed to make changes ISBN: 0-321-19444-6 to a ChannelItem, so there is a kind of automatic checkout process to prevent users from Pages: 1136 concurrently updating the same object. In communist states, this property can return a value of Everybody. When that happens, the ChannelItem becomes community property—edit at will, comrade. "This is one ofcan those books that will to learn about product keep to edit. This member be rare useful to find outyou who is read currently editing thethe object thatand we want rereading tocalling find those tidbits quickly that youenough, missed this before." If code isn't CommitAll can wreak havoc on a busy site. —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that Path (Inherited from HierarchyItem) helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until The Path property retrieves the fully qualified path using the Name property of the now. ChannelItems involved. The Path begins and ends with and is delimited by a forward slash ("/"). TheContent RootChannel is concatenated sequentially with each in the object's Microsoft Management Server 2002: A Complete GuideChannelItem is the first book that explains ancestry. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Thisto member can be useful for Microsoft searchingplatform. for a ChannelItem using the GetByPath Context API manage content on the Searches method when using a GUID is impractical. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. QueryString, QueryStringModeUnpublished, QueryStringModeUpdate (All A running example is used throughout the book to illustrate how important CMS features are Inherited from ChannelItem) implemented in real-world Web site development. Inside you'll find answers to such questions as: All three of these properties retrieve the URL query string parameters used to view the referencing ChannelItem. The QueryString property will present the parameters to use the sameChapter mode as6:currently use, while the QueryStringModeUnpublished and How do in you customize workflow? QueryStringModeUpdate will present the parameters that could be used to navigate to the referencing ChannelItem Unpublished orMicrosoft Update PublishingMode, respectively. Chapter 10: How doinyou develop for Content Management Server (CMS) 2002 using Visual Studio .NET? These members can be useful to redirect the user to the same ChannelItem in a different mode or to Chapter dynamically link.establish user rights? 17: create How doa you Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? RevisionDate (Inherited from HierarchyItem) Chapter 32: How do you publish dynamic data? The RevisionDate property has the standard characteristics of a CMS date and time field
[described Team LiBand ] summarized with the other dates at the beginning of this section.
This member can be useful for showing the date and time that the ChannelItem was last revised or for identifying aged/fresh information found on a Web Property.
Url (Inherited from ChannelItem) The Url property retrieves the root relative URL for the referencing ChannelItem that will execute the OuterScriptFile (see the OuterScript File property in the Read/Write Members section later in this chapter), if any. This member can be useful to redirect the user to the same Channel Item in the same mode or to dynamically create a link. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
UrlInner (Inherited from ChannelItem)
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The UrlInner property retrieves the root relative URL for the referencing ChannelItem that will not Publisher: executeAddison the OuterScriptFile (see the OuterScriptFile property in the Read/Write Members Wesley section later in this chapter), if any. Pub Date: October 31, 2003
ISBN: 0-321-19444-6 This member is not frequently used. Pages: 1136
UrlInnerPlain (Inherited from ChannelItem) "This is one of those rare books that you will read to learn about the product and keep The UrlInnerPlain property retrieves the root relative URL for the referencing ChannelItem that rereading to find those tidbits that you missed before." will not execute the OuterScriptFile (see the OuterScriptFile property in the Read/Write —Gary Bushey, SharePoint Server MVP Members section later in this chapter), if any, nor will it propagate any query string parameters from the current request. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their This member is not frequently used. Web sites. However, an authoritative source of product information has been missing . . . until now.
UrlModePublished, UrlModeUnpublished, UrlModeUpdate (All Inherited from Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how ChannelItem) to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. All three of these properties retrieve a root relative URL for the referencing ChannelItem based upon site configuration. Hierarchy-based sites will retrieve a path-based URL, while Node-IDThis thorough reference explains the product architecture, then shows you how to create and based sites will retrieve a GUID-based URL. Both URL versions accomplish the same function. edit content and use the workflow. Topic coverage includes CMS administration and security, The UrlModePublished, UrlModeUnpublished, and UrlMode Update will present the URL that the Publishing API, deployment options, site configuration, and template development. A could be used to navigate to the referencing ChannelItem in Published, Unpublished, or Update running example is used throughout the book to illustrate how important CMS features are Publishing Mode, respectively. implemented in real-world Web site development. Inside you'll find answers to such questions as: These members can be useful to redirect the user to the same ChannelItem in a specific mode or to dynamically create a link to that mode. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Read/Write Members using Visual Studio .NET?
As before, the code to see all the read/write Channel object members is presented Chapter 17: How do you establish user rights? comprehensively. All these members can be assigned a value in code or through various other user interfaces. However, nonebest of these changed values will permanent needs, until CommitAll Chapter 22: How do you deploy CMS according to become your organization's size, is called on the Context. Uncommitted changes can be discarded by calling RollbackAll. If and resources? neither method is explicitly called when the Context in which the change is made is destroyed (goesChapter out of scope or isdo disposed of), the disposition 32: How you publish dynamic data?of the changes will be decided by the value of the RollbackOn SessionEnd property. By default, this property is false, so all changes are
[committed. Team LiB ]In general, the properties of historical revisions can't be altered.
It is highly recommended that template file developers validate any date set to be sure that it is within the acceptable range for that property. Otherwise, CMS will have to alter it to be within the acceptable range when the change is committed. No message is generated when CMS changes the date, so the user could be surprised by the change. This problem can easily be avoided by validating dates before committing them. As we discovered earlier, a user must have sufficient rights to make changes to any property, and the Context must be in an Update Publishing Mode (see the Getting into Update PublishingMode sidebar earlier in this chapter). It is always wise to place the verification that a user has sufficient rights and the actual modification of a property within a .NET try/catch block.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Avoid Hack by Using HtmlEncode
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Users will likely be allowed by your Web Property to enter free-form text in properties like the Channel Name, DisplayName, and Description. In the likely event Publisher: Addison Wesley that those properties are rendered back to the user's browser on a posting, the Pub Date: October 31, 2003 template file developer should be aware of the following underlying risk. ISBN: 0-321-19444-6
Typical users will simply enter the text that was intended, and everything will work Pages: 1136 as smoothly as planned. But it is possible for the user to enter any text into those properties, including HTML or even script. A malicious or misguided user could enter values that might be undesirable or even hazardous. Consider the following benign examples. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The user enters the following text in the channel description: —Gary Bushey, SharePoint Server MVP
Really cool home page. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their When the channel description is rendered, the browser evaluates the text and Web sites. However, an authoritative source of product information has been missing . . . until displays now. Really cool home page. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to "home effectively unlock the power of CMS. Administrators and developers alike will learn how where page" is a clickable link. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the platform. Or worse, the user enters the Microsoft following text in the channel description: This thorough explains the productbody_onclick() architecture, then shows you howEnd to create and Really <script reference language=VBScript>Function Msgbox ('Gotcha') edit content and use theChannel. workflow. Topic coverage includes CMS administration and security, Function cool the Publishing API, deployment options, site configuration, and template development. A running example isdescription used throughout the book illustrate how important When the channel is rendered, theto browser evaluates the textCMS and features are implemented in real-world Web site development. Inside you'll find answers to such questions displays as: Really cool Channel. Chapter How do you customize workflow? Assuming that6:the HTML body tag (or some other tag) has an "id=body", which anyone could discover by simply viewing the source sent to their browser, when the 10: Howon dothe youbody develop forpage, Microsoft Server (CMS) 2002 user Chapter clicks anywhere of the they Content will get aManagement pop-up dialog using Visual Studio .NET? containing the message "Gotcha". Chapter 17: hack How could do yougoestablish userfor rights? This out-of-sight undetected a long time. A creative user could really wreak havoc, running potentially malicious scripts in windows that open behind Chapter do you best deploy CMS according to your organization's needs, size, the main page22: as How the page is loading, or worse. and resources? To prevent this kind of attack, we recommend that the template developer use the Chapter 32: How do you publish dynamic to data? HtmlEnode method of System.Web.HttpUtility prevent the browser from
[interpreting Team LiB ] the text in the property.
So, rather than coding like this:
x = CmsHttpContext.Current.Channel.Description;
protect yourself and code like this: [View full width] x = HttpUtility.HtmlEncode(CmsHttpContext.Current.Channel .Description);
An ounce of prevention, you know.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The read/write properties we can set in code using PAPI can also be set using the Site Manager interface. Publisher: Addison Wesley Replace the Button1_Click function of our Scratchpad template file with the following code: Pub Date: October 31, 2003 ISBN: 0-321-19444-6
private void Pages: 1136Button1_Click(object sender, System.EventArgs e) { //1. Put current Channel into variable Channel cmsChannel = CmsHttpContext.Current.Channel; "This is one of those rare books that you will read to learn about the product and keep //2. Populate the label with read/write properties of a Channel rereading to find those tidbits that you missed before." Label1.Text = —Gary Bushey, SharePoint Server MVP "
ApplyOuterScriptToPostings: " + cmsChannel.ApplyOuterScriptToPostings.ToString() + Content Management Server (CMS) is fast becoming a vital content-management tool that "
DefaultPostingName: " + helps administrators and developers handle the ever-increasing amount of content on their HttpUtility.HtmlEncode( Web sites. However, an authoritative source of product information has been missing . . . until cmsChannel.DefaultPostingName.ToString()) + now. "
OuterScriptFile: " + cmsChannel.OuterScriptFile.ToString() + Microsoft Content Management Server 2002: A Complete Guide is the first book that explains "
Description: " + how to effectively unlock the power of CMS. Administrators and developers alike will learn how HttpUtility.HtmlEncode(cmsChannel.Description.ToString()) + CMS features and to enhance their Web servers' scalability, flexibility, and extensibility by using " + API "
DisplayName: to manage content on the Microsoft platform. HttpUtility.HtmlEncode(cmsChannel.DisplayName.ToString()) + "the + cmsChannel.ExpiryDate.ToString() + to create and This"
ExpiryDate: thorough reference explains product architecture, then shows you how + includes CMS administration and security, edit"
IsHiddenModePublished: content and use the workflow. Topic " coverage cmsChannel.IsHiddenModePublished.ToString() the Publishing API, deployment options, site configuration, + and template development. A "
IsImportant: " +the cmsChannel.IsImportant.ToString() + running example is used throughout book to illustrate how important CMS features are "
IsRobotFollowable: + implemented in real-world Web site " development. Inside you'll find answers to such questions as: cmsChannel.IsRobotFollowable.ToString() + "
IsRobotIndexable: " + cmsChannel.IsRobotIndexable.ToString() + Chapter 6: How do you customize workflow? "
Name (HtmlEncoded): " + HttpUtility.HtmlEncode(cmsChannel.Name.ToString()) + Chapter 10: How do you" develop for Microsoft Content Management Server "
SortOrdinal: + cmsChannel.SortOrdinal.ToString() + (CMS) 2002 using Visual Studio .NET? "
StartDate: " + cmsChannel.StartDate.ToString(); } Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, Lines 3 and 4 in the code are necessary because the default galleries may not have been set and resources? and would return a null value. If we try to retrieve the Name property of a null value, we will receive an exception. fordynamic this condition Chapter 32: HowSo, do we youcheck publish data? and capture the name only if the gallery reference exists; otherwise, we show an empty string.
[Build Team LiB ] the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. The page should reload and look similar to Figure 25-8.
Figure 25-8. Show read/write members
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP As you can see, many of the read/write property values are not set by default for a Channel object. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Read/Write Members Specific to Channels now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how ApplyOuterScriptToPostings to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The ApplyOuterScript property holds the Boolean value that indicates whether the OuterScriptFile (see the OuterScriptFile property later in this section) will to notcreate be This thorough reference explains the product architecture, then showswill youorhow and executed when posting is requested by coverage URL. The includes OuterScriptFile is always executed when a edit content andause the workflow. Topic CMS administration and security, channel is requested by URL. The property be true if the referencing objectAwill the Publishing API, deployment options, sitewill configuration, and template Channel development. execute example the OuterScriptFile when a posting is requested byhow URL. The default value for this running is used throughout the book to illustrate important CMS features are property is false. implemented in real-world Web site development. Inside you'll find answers to such questions as: As a Boolean, this property can only be set to true or false. It must be set to true for frames to work correctly. Chapter 6: How do you customize workflow? This member can be useful to specify whether to run the Outer ScriptFile when a posting is Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 requested by URL. using Visual Studio .NET? Chapter 17: How do you establish user rights? DefaultPostingName Chapter 22: How do you best deploy CMS according to your organization's needs, size, The DefaultPostingName property holds the case-insensitive name of the posting that will be and resources? shown if a user requests the referencing channel without specifying a posting. This is similar to the default document anyou IISpublish virtual dynamic directory.data? However, unlike in IIS, there can only be one Chapter 32: Howindo default posting specified, and if the posting specified is not found, CMS will either display the
posting [first Team LiB ]in the channel or the CMS Welcome screen if there isn't a first posting. Since CMS does not prevent duplicate posting names, it is possible that this property could refer to an ambiguous name. However, CMS uses the SortOrdinal (see the SortOrdinal property later in this section) to choose which one to display. CMS will display the default posting for the appropriate PublishingMode requested. CMS will automatically trim leading and trailing spaces and truncate the length to 100 characters for any string assigned to this property. Typical alphanumeric characters are allowed, but we recommend against using spaces in posting names. This member can be useful to specify which posting to show by default when a channel is requested without a posting.
OuterScriptFile •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The OuterScriptFile property holds the virtual path (IIS virtual directory and ASPX file name) to posting (see the ApplyOuterScriptToPosting property earlier in this section), is requested by URL.
By Billscript English , Olga Londer, Shawn , Todd Bleeker , Stephen Cawood the file executed when Shell a channel, and perhaps when a
Addison Wesley CMSPublisher: will automatically trim leading and trailing spaces and truncate the length to 2000 characters any 31, string Pub Date:for October 2003assigned to this property. Typical alphanumeric characters are allowed, but0-321-19444-6 we recommend against using spaces. CMS does not validate the virtual path ISBN: provided against Pages: 1136 IIS for accuracy but does require that it begin with a forward slash ("/"). The virtual path must specify the frameset for frames to work correctly.
This member can be useful to specify the virtual path and name of the outer script file. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Read/Write Members Inherited for Use by Channels —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Description (Inherited from HierarchyItem) Web sites. However, an authoritative source of product information has been missing . . . until now. The Description property holds the free-form text description (see the Avoid Hack by Using HtmlEncode sidebar) for the referencing ChannelItem. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how CMS will automatically trim leading and trailing spaces and truncates the length to 500 to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and characters for any string assigned to this property. Typical alphanumeric characters are API to manage content on the Microsoft platform. allowed. This thorough reference explains the product architecture, then shows you how to create and This member can be useful for setting and showing a verbose description of the ChannelItem edit content and use the workflow. Topic coverage includes CMS administration and security, that the user is using. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions DisplayName (Inherited from ChannelItem) as:
The DisplayName property holds the free-form text of the long name or business name for the Chapter 6: How do you customize workflow? referencing ChannelItem intended for display purposes (see the Avoid Hack by Using HtmlEncode sidebar). If this property is empty or has never been set, the value in the Name Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 property will be used instead. Unlike the Name property, the DisplayName is never used to using Visual Studio .NET? construct URLs and doesn't indicate the Path to the Channel Item. It is the default sort order for any ChannelCollection. Chapter 17: How do you establish user rights? CMS will automatically trim leading and trailing spaces and truncate the length to 250 Chapter 22: How do you best deploy CMS according to your organization's needs, size, characters for any string assigned to this property. Typical alphanumeric characters are and resources? allowed. Chapter 32: How do you publish dynamic data? This member can be useful for setting and showing a user-friendly description of the
[ChannelItem Team LiB ] that the user is using. This is especially useful for constructing aesthetic dynamic navigation.
ExpiryDate (Inherited from ChannelItem) The ExpiryDate property holds the date value for when a ChannelItem will no longer be visible in Published PublishingMode. It has the standard characteristics of a CMS date and time field described and summarized with the other dates at the beginning of this section. This member can be useful for showing the date and time that the ChannelItem will expire. It can be an excellent field on which to sort ChannelItems in a collection. It could also be useful to proactively provide a warning to users about content that is about to expire. •
Table of Contents
IsHiddenModePublished (Inherited from ChannelItem)
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The IsHiddenModePublished property holds the Boolean value that indicates whether the referencing ChannelItem will or will not be included in any ChannelItem collection when the Context is inAddison Published Publisher: Wesleyor Staging PublishingMode. It will be true if it should be excluded from the Pub collection and false if it should be included in the collection. This does not restrict access to Date: October 31, 2003 the hidden object; it just removes it from the collection. The default value for this property is ISBN: 0-321-19444-6 false. Pages: 1136
If the AutoFilterHidden property of the Context SessionSettings is set to false the setting in this property is ignored, and all ChannelItems are displayed in all collections in all PublishingModes. As a Boolean, property can only trueto orlearn false.about the product and keep "This is one of this those rare books that be youset willtoread rereading to find those tidbits that you missed before." This member can be useful to control what is visible when developers are dynamically —Gary Bushey, SharePoint Server MVP constructing site navigation. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until IsImportant (Inherited from ChannelItem) now. The IsImportant property holds the Boolean value that indicates whether the referencing Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ChannelItem is important or not. It will be true if the ChannelItem is important and false if it how to effectively unlock the power of CMS. Administrators and developers alike will learn how isn't. Importance of a ChannelItem is determined entirely by the user. The default value for this to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and property is false. API to manage content on the Microsoft platform. As a Boolean, this property can only be set to true or false. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, This member can be useful in classifying ChannelItems into two categories, important and not the Publishing API, deployment options, site configuration, and template development. A important. That might be useful for generating some kinds of dynamic navigation. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
IsRobotFollowable, IsRobotIndexable (Both Inherited from ChannelItem)
Chapter 6: How do you customize workflow? The IsRobotFollowable and IsRobotIndexable properties hold the Boolean values that together indicate whether the referencing ChannelItem allows robots (search engine programs that How do you for Microsoft (CMS)to2002 crawl Chapter sites) to10: follow links and develop index the site or not. Content It will beManagement true if robotsServer are allowed follow using Visual Studio .NET? links or index, respectively, and false if they aren't. In either case, an appropriate ROBOT META tag is generated to advise the search engine of our preference. However, a META tag can't Chapter 17: How do you establish user rights? enforce the preference, just encourage or discourage it. The default value for these properties is true. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? As Booleans, these properties can only be set to true or false. Chapter 32: How do you publish dynamic data? These members can be useful for instructing search engines whether we want our Web
to ]be indexed or not, and if indexed, whether we want links to be followed or not. [Property Team LiB
Name (Inherited from HierarchyItem) The Name property holds the free-form text of the actual name for the referencing ChannelItem. This name is not intended for display (see the Avoid Hack by Using HtmlEncode sidebar) per se but is visible to the user in the URL and Path. This property is not allowed to be empty but can be nonunique (not recommended). Changing the value of the Name property actually changes the value of the read-only Path property. CMS will automatically trim leading and trailing spaces and truncate the length to 100 characters for any string assigned to this property. Typical alphanumeric characters are allowed, but we recommend against using spaces in ChannelItem names. In fact, it frequently makes sense to let the user set the value of the DisplayName and to systematically set the • Table of Contents name of a new ChannelItem for them. Microsoft Content Management Server 2002: A Complete Guide
By Bill member English, Olga , Shawnfor Shell , Todd Bleeker , Stephen This canLonder be useful setting and showing a Cawood system-oriented
description of the ChannelItem. This is especially useful for constructing the links used in dynamic navigation. Publisher: Addison Wesley Pub Date: October 31, 2003 SortOrdinal (Inherited from ChannelItem) ISBN: 0-321-19444-6 Pages: 1136
The SortOrdinal property holds the custom sort sequence number for the referencing ChannelItem—that is, the user-defined sequence that this ChannelItem would display relative to other ChannelItems at the same level in a collection. For example, thererare werebooks threethat ChannelItems named A, B, and C and we wanted them to "This is one ofifthose you will read to learn about the product and keep show in C,to A,find B order, maythat giveyou C amissed SortOrdinal of 30, A a SortOrdinal of 20, and B a rereading thosewe tidbits before." SortOrdinal of 10. In this way we achieve —Gary Bushey, SharePoint Server MVP a custom sort sequence, highest to lowest. As you can see, not every value is needed to order the ChannelItems relative to one another. Leaving Content Server (CMS) ais new fast value becoming a vital content-management tool allowed. that gaps canManagement potentially make inserting easier, although duplicate values are helps administrators and developers the ever-increasing amount of content their We use descending numbers becausehandle new ChannelItems are given a SortOrdinal of on zero (0). Web sites. However, an authoritative source of product information has been missing . . . until Only numeric values are allowed. now. This member can be useful for custom sorts but also for deciding of two identically sorted Microsoft Content Management Server 2002: A Complete Guide iswhich the first book that explains itemstotoeffectively show first.unlock Sincethe a series ofof sort methods applied toand a ChannelCollection or learn how how power CMS. Administrators developers alike will PostingCollection behave like ascalability, multikey sort, when duplicate values occur, weCMS can use to enhance their Web servers' flexibility, and extensibility by using features and SortOrdinal as acontent consistent tiebreaker. API to manage on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content(Inherited and use thefrom workflow. Topic coverage includes CMS administration and security, StartDate ChannelItem) the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are The StartDate property holds the date value for when a Channel Item will first be made visible implemented in real-world Web site development. Inside you'll find answers to such questions in Published and Staging publishing modes. It has the standard characteristics of a CMS date as: and time field described and summarized with the other dates at the beginning of this section.
This member be useful showing workflow? the date and time that the ChannelItem will become Chapter can 6: How do youfor customize live. It can be an excellent field on which to sort ChannelItems in a collection. It could also be usefulChapter to proactively provide warning for to users about content that is about to go (CMS) live. 2002 10: How do youa develop Microsoft Content Management Server using Visual Studio .NET? [ Team LiB ] 17: How do you establish user rights? Chapter Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Working with Channel Objects Thus far we have seen the properties and methods of a Channel that use intrinsic data types. This section will explore CMS-specific objects and collections of objects that are available from a Channel. These are the principal objects graphically modeled in Figure 23-2, PAPI object model —Channel.
•
NOTE: The PAPI object model is covered in detail in Chapter 23. The objects covered in this section be covered in the same order as they are illustrated in Figure 23-2. Table of will Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
These objects require some special processing and consideration. As before, there are some common facts and concepts that will help us in this section. Publisher: Addison Wesley
Pub October 31, 2003 After a Date: Channel object has been deleted but before it is committed, all properties become readISBN: 0-321-19444-6 only. However, even after a deleted Channel object is committed, it may still reside in an inmemory collection. All Channel child objects must be removed before a Channel object can be Pages: 1136 deleted. Even if they still reside in memory, Channel child objects cannot be read once the Channel object has been deleted and committed.
Historical revisions of a channel don't typically keep the value that was associated with the "This is one of those rare books that you will read to learn about the product and keep revision when it was the current version. Properties typically represent the value of the current rereading to find those tidbits that you missed before." revision regardless of the value when the historical revision was the current revision. —Gary Bushey, SharePoint Server MVP Attempting to assign a value to these properties for a historical revision will result in an exception. This concept is extended the child objects for historical revisions of a tool channel, Content Management Server (CMS) to is fast becoming a vital content-management that including the collections (Channels, Postings, AllChildren, and CustomProperties) whose helps administrators and developers handle the ever-increasing amount of content on their contents are based upon the revision date and of the channel. Channel Web sites. However, an authoritative source of time product information has beenobjects missingand . . . until Posting objects are only included in these collections if they have a corresponding revision date now. and are currently contained in the referencing Channel object. Otherwise, they are left out. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' flexibility, and extensibility by using CMS features and Parent (Inherited fromscalability, ChannelItem) API to manage content on the Microsoft platform.
The Parent property of a Channel object or Posting object returns the Channel object that This thorough reference explains the product architecture, then shows you how to create and contains it. The specific Channel object returned depends on the current PublishingMode, the edit content and use the workflow. Topic coverage includes CMS administration and security, user rights, and potentially the StartDate and ExpiryDate. If the referencing object is contained the Publishing API, deployment options, site configuration, and template development. A within the built-in RootChannel, then the RootChannel is returned. Since the RootChannel has running example is used throughout the book to illustrate how important CMS features are no containing Channel, its Parent returns a null, so it is wise to check the IsRoot property implemented in real-world Web site development. Inside you'll find answers to such questions (discussed earlier in this chapter) before accessing the Parent property. as: Replace the Button1_Click function of our Scratchpad template file with the following code: Chapter 6: How do you customize workflow?
private void10: Button1_Click(object e) Server (CMS) 2002 Chapter How do you develop forsender, MicrosoftSystem.EventArgs Content Management { using Visual Studio .NET? //1. Put current Channel into variable Channel cmsChannel CmsHttpContext.Current.Channel; Chapter 17: How do=you establish user rights? //2. Make 22: sure that the best current Channel isn't the root Chapter How do you deploy CMS according to your organization's needs, size, if and (!cmsChannel.IsRoot) resources? { Chapter 32: Howthe do you publish data? Channel and its parent //3. Populate label withdynamic the current Label1.Text =
" + cmsChannel.Name.ToString() + [ Team "
Current: LiB ] "
Parent: " + cmsChannel.Parent.Name.ToString(); } else { //4. Provide nonerror feedback to the developer Label1.Text = "Current Channel is the RootChannel"; } }
Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. The page should reload and look similar to Figure 25-9.
•
Figure 25-9. Show Channel Parent
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their servers' scalability, flexibility, and extensibility by using CMS features and This member canWeb be useful, even essential, in the construction of dynamic navigation, including API to manage content on the Microsoft platform. the infamous breadcrumbs. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, later site configuration, and template development. NOTE: Although briefly mentioned in this chapter, dynamic navigation and A running example is used throughout the book to illustrate how important CMS features are breadcrumbs are covered in depth in Chapter 14. implemented in real-world Web site development. Inside you'll find answers to such questions as:
Channels Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Server (CMS) 2002 The Channels collection property of Channel objects Content dependsManagement on the current PublishingMode, using Visual Studio .NET? the user rights, potentially the IsHiddenMode Published property, StartDate, and ExpiryDate of each Channel in the collection (all three properties are discussed earlier in the Read/Write Chapter 17: How do you establish user rights? Members section of this chapter), and potentially the AutoFilterHidden property of the Context. Chapter 22: How do you best deploy CMS according to your organization's needs, size, The Channel objects in the collection will be ordered, by default, first by their SortOrdinal value and resources? (discussed earlier near the end of the Read/Write Members section of this chapter) and within that, alphabetically by Name. However, this sort order can be overridden. The Chapter 32: How do you publish dynamic data? ChannelCollection contains a large number of built-in sorts, which can be applied to the list. The
sort members are as follows: [ChannelCollection Team LiB ] SortByChangeDate (inherited from ChannelItemCollection) SortByDisplayName (inherited from ChannelItemCollection) SortByDisplayPath (inherited from ChannelItemCollection) SortByExpiryDate (inherited from ChannelItemCollection) SortByImportance (inherited from ChannelItemCollection) SortByLastModifiedDate (inherited from HierarchyItemCollection) SortByName (inherited from HierarchyItemCollection) •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide SortByOrdinal (inherited from ChannelItemCollection) ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
SortByOwner (inherited from HierarchyItemCollection) SortByPath (inherited from HierarchyItemCollection)
Publisher: Addison Wesley
Pub Date: October 31, 2003
SortByRevisionDate (inherited from HierarchyItemCollection) ISBN: 0-321-19444-6
SortByStartDate (inherited from ChannelItemCollection) Pages: 1136 Each sort method can be applied successively to the Channels collection to create a multikey sort. This can be beneficial if duplicate values are expected in the collection and we want to iterate a consistent sequence of values (as is often the case in dynamically generating "This is one of those rare books that you will read to learn about the product and keep navigation for a site). For example, sorting the collection using SortByDisplay Name followed by rereading to find those tidbits that you missed before." SortByOwner would yield a list of Channels grouped by Channel Owner in Channel DisplayName —Gary Bushey, SharePoint Server MVP sequence. To start the sort sequence over again, we would need to get another instance of the ChannelsManagement property. Content Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Be cautious about overusing this functionality because sorting is always a CPU-intensive Web sites. However, an authoritative source of product information has been missing . . . until activity, and repeatedly sorting a large list or a large number of small lists could become a now. resource drain. If most pages in your site require a specific sequence, consider manually ordering items using their SortOrdinal thatAthey will be Guide sortediscorrectly Microsoft Content Management Server so 2002: Complete the firstwhen book the thatcollection explains is initially accessed. Remember, by default, new Channels added to the list will have a SortOrdinal how to effectively unlock the power of CMS. Administrators and developers alike will learn how of zero (0) and sort to the bottom of the list. to enhance theirtherefore Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This collection is not self-updating. If new Channel objects are added to the Web Property or existing Channel objects explains are deleted, the collection in memory not be It is good This thorough reference the product architecture, thenwill shows youupdated. how to create and programming practice to get the property and use it swiftly. In busy sites, if some time has edit content and use the workflow. Topic coverage includes CMS administration and security, passed since the property was first acquired, it would typically better to get the property the Publishing API, deployment options, site configuration, and be template development. A again rather thanisuse thethroughout one previously in memory. running example used the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions The Channels collection has a Count property that can be used to determine whether the list as: contains any items. The items in the collection can be iterated using the common foreach statement or directly using the string Name for the item or its zero-based ordinal index. Chapter 6: How do you customize workflow? There is also a Union method for the Channels collection. It can be combined with another collection to create a superset of all thefor objects in both collections. Chapter 10: How do you develop Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Some of these concepts are demonstrated in the following code example. It uses the Scratch channel hierarchy created in the Creating andrights? Deleting Objects in a Channel section earlier in Chapter 17: How do you establish user this chapter. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Replace Button1_Click function of our Scratchpad template file with the following code: andthe resources? Chapter 32: How do you publish dynamic data? private void Button1_Click(object sender, System.EventArgs e)
[{ Team LiB ] try { //1. Grab the current CMS Context CmsHttpContext cmsContext = CmsHttpContext.Current;
//2. Grab the Brady Channel Channel cmsBradyChannel = cmsContext.Searches.GetByPath("/Channels/Scratch/Brady") as Channel; //3. Populate the label with informational text Label1.Text = "Working with " + cmsBradyChannel.DisplayName.ToString() + " Channel's Channels collection"; •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide //4. Change sort from Name within SortOrdinal
to DisplayName
ByBill cmsBradyChannel.Channels.SortByDisplayName(); English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
//5. Apply secondary sort of Owner to the DisplayName sort // Duplicate values for Owner will retain the Publisher: Addison Wesley // DisplayName Pub Date: October 31, 2003 sequence cmsBradyChannel.Channels.SortByOwner(); ISBN: 0-321-19444-6 Pages: 1136
//6. Iterate the Channels in the Brady Channel foreach (Channel cmsChannel in cmsBradyChannel.Channels) { //7. Add the DisplayName of each Channel into the ListBox "This isListBox1.Items.Add("Using one of those rare books that you will readreference: to learn about implicit " +the product and keep rereading cmsChannel.DisplayName.ToString() to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP ); } Content Management Server fast becoming a vital tool that //8. Check to be sure(CMS) that isthere are items in content-management the collection helpsif administrators and developers handle the ever-increasing amount of content on their (cmsBradyChannel.Channels.Count > 0) Web {sites. However, an authoritative source of product information has been missing . . . until now. //9. Add the DisplayName of the first Channel into the // ListBox. This is a risky approach. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ListBox1.Items.Add("Using EXPLICIT reference: " + how to effectively unlock the power of CMS. Administrators and developers alike will learn how cmsBradyChannel.Channels[0].DisplayName.ToString() to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and ); API to manage content on the Microsoft platform. //10. Add the DisplayName of a the Mike Channel into the // ListBox. This isthe a very risky approach. This thorough reference explains product architecture, then shows you how to create and ListBox1.Items.Add("Using EXPLICIT reference: " administration + edit content and use the workflow. Topic coverage includes CMS and security, cmsBradyChannel.Channels["Mike"].DisplayName.ToString() the Publishing API, deployment options, site configuration, and template development. A ); running example is used throughout the book to illustrate how important CMS features are } implemented in real-world Web site development. Inside you'll find answers to such questions as:} catch(Exception eError) { //11. Provide the developer Chapter 6: How error do you feedback customize to workflow? Label1.Text = "Error: " + eError.Message.ToString(); } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? } Chapter 17: How do you establish user rights? Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it Chapter 22: HowThe do page you best deploy CMS according to your organization's and click the Button. should reload and look similar to Figure 25-10. needs, size, and resources?
25-10. Working Chapter Figure 32: How do you publish dynamicwith data?a
Channels collection
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison You'll have to scrollWesley down to see the second explicit reference. If the explicit references to the October 31, 2003 itemPub in Date: the code under comments 9 and 10 do not find a Channel, an exception ("Object ISBN: 0-321-19444-6 reference not set to an instance of an object") will occur. In general, we want to avoid using an explicitPages: reference 1136 to an item in a collection anyway. Believe it or not, using one of the Searches (discussed in Chapter 28) like GetByGuid (ideally), GetByPath, or GetByUrl will likely actually outperform an explicit reference to an item. This is because explicit references require the entire collection to be inflated to access the single entry, whereas the search just hydrates the singleisinstance. "This one of those rare books that you will read to learn about the product and keep
rereading to find those tidbits that you missed before." This member collection can be useful, even essential, in the construction of dynamic navigation, —Gary Bushey, SharePoint Server MVP including the infamous breadcrumbs. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Postings now.
The Postings collection property of a Posting object is similar to the Channels collection Microsoft Content Management Server 2002: A Complete Guide is the first book that explains property. Its contents also depend on the current PublishingMode, the user's rights, potentially how to effectively unlock the power of CMS. Administrators and developers alike will learn how the IsHiddenMode Published property (discussed earlier in the Read/Write Members section of to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and this chapter), StartDate, and ExpiryDate of the Postings in the collection, and potentially the API to manage content on the Microsoft platform. AutoFilterHidden property of the Context. This thorough reference explains the product architecture, then shows you how to create and The Posting objects in the collection will be ordered, by default, first by their SortOrdinal value edit content and use the workflow. Topic coverage includes CMS administration and security, (also discussed earlier near the end of the Read/Write Members section of this chapter) and the Publishing API, deployment options, site configuration, and template development. A within that, chronologically by LastModifiedDate. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such The same sorting capabilities and cautions that apply to the Channels property applyquestions to the as: Postings property. The tendency for the collection to get stale, the access methods, and the
ability to form a union with other collections are the same too. Chapter 6: How do you customize workflow? Since we have only one posting at this point, only a brief coding example will be shown. Postings are covered in depth in the next chapter. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Replace the Button1_Click function of our Scratchpad template file with the following code: Chapter 17: How do you establish user rights?
private void Button1_Click(object sender, System.EventArgs e) Chapter 22: How do you best deploy CMS according to your organization's needs, size, { and resources? try { Chapter 32: How do you publish dynamic data? //1. Put current Channel into variable
Channel [ Team LiB ] cmsChannel = CmsHttpContext.Current.Channel; //2. Populate the label with informational text Label1.Text = "Working with " + cmsChannel.DisplayName.ToString() + " Channel's Postings collection"; //3. Change the sort to DisplayName cmsChannel.Postings.SortByDisplayName(); //4. Iterate the Postings in the current Channel foreach (Posting cmsPosting in cmsChannel.Postings) { //5. Add the DisplayName of each Posting into the ListBox ListBox1.Items.Add(cmsPosting.DisplayName.ToString()); Table of Contents }
•
Microsoft Content Management Server 2002: A Complete Guide }
catch(Exception ByBill English, Olga LondereError) , Shawn Shell, Todd Bleeker, Stephen Cawood { //6. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); Publisher: Addison Wesley }Pub Date: October 31, 2003 }
ISBN: 0-321-19444-6 Pages: 1136
As with the Channels collection property, explicit references to an item in the collection members are allowed, just not illustrated and not recommended. "This is one of those books that you will read to learn about the product and Build the solution andrare then refresh the Scratchpad posting in Internet Explorer, orkeep browse to it rereading to find those tidbits youreload missedand before." and click the Button. The pagethat should look similar to Figure 25-11. —Gary Bushey, SharePoint Server MVP
Figure 25-11. Working with a Postings collection
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
This member canyou be establish useful, even Chapter collection 17: How do useressential, rights? in the construction of dynamic navigation. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? AllChildren Chapter 32: How do you publish dynamic data? The AllChildren collection property of Channel and Posting objects (ChannelItem objects) is
union [simply TeamaLiB ] of the Channels collection property and the Postings collection property, both discussed just before this property in this section of this chapter. Its contents depend on the contents of those two collections for the given user in the given context. The ChannelItem objects in the collection will be ordered, by default, first by their SortOrdinal value (discussed earlier near the end of the Read/Write Members section of this chapter) and within that, alphabetically by ChannelItem Name. The same sorting capabilities and cautions that apply to the other two properties apply to the AllChildren property. The tendency for the collection to get stale, the access methods, and the ability to form a union with other collections are the same too. Again, a brief coding example is shown to give a flavor of how this is similar to and how it is different from the other two collection properties. Replace the Button1_Click • Table of Contentsfunction of our Scratchpad template file with the following code: Microsoft Content Management Server 2002: A Complete Guide By Bill English , OlgaButton1_Click(object Londer, Shawn Shell, Todd Bleeker , Stephen Cawood private void sender, System.EventArgs
e)
{ try {Publisher: Addison Wesley Pub Date:Put October 31, 2003 Channel into variable //1. current ISBN: 0-321-19444-6 Channel cmsChannel = CmsHttpContext.Current.Channel; Pages: 1136
//2. Populate the label with informational text Label1.Text = "Working with " + cmsChannel.DisplayName.ToString() + Channel's AllChildren "This is"one of those rare books thatcollection"; you will read to learn about the product and keep rereading to find those tidbits that you missed before." //3. Change the sort to DisplayName —Gary Bushey, SharePoint Server MVP cmsChannel.AllChildren.SortByDisplayName(); Content Management Server (CMS) is fast becoming a vital content-management tool that Iterate the the the current Channel amount of content on their helps//4. administrators and Postings developersin handle ever-increasing (ChannelItem cmsChannelItem in cmsChannel.AllChildren) Web foreach sites. However, an authoritative source of product information has been missing . . . until now.{ //5. Add the CMS type followed by the DisplayName for each //Content ChannelItem intoServer the ListBox Microsoft Management 2002: A Complete Guide is the first book that explains ListBox1.Items.Add( how to effectively unlock the power of CMS. Administrators and developers alike will learn how cmsChannelItem.GetType().ToString() + "extensibility " + to enhance their Web servers' scalability, flexibility, and by using CMS features and cmsChannelItem.DisplayName.ToString() API to manage content on the Microsoft platform. ); This thorough reference explains the product architecture, then shows you how to create and } edit } content and use the workflow. Topic coverage includes CMS administration and security, thecatch(Exception Publishing API, deployment eError) options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are { implemented in real-world site development. Inside you'll find answers to such questions //6. Provide error Web feedback to the developer as: Label1.Text = "Error: " + eError.Message.ToString(); } } Chapter 6: How do you customize workflow? Chapter 10: How is dothe youcasting develop Content Management 2002 The biggest difference of for theMicrosoft children in the collection as theServer generic(CMS) ChannelItem using Visual Studio .NET? type in the code under comment 4. As with the other two collection properties, explicit references to an item in the collection members are allowed, just not illustrated and not Chapter 17: How do you establish user rights? recommended. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and resources? and click the Button. The page should reload and look similar to Figure 25-12. Chapter 32: How do you publish dynamic data?
Figure 25-12. Working with an AllChildren collection
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Date: October 31, 2003 ThisPub member collection can be useful, even essential, in the construction of dynamic navigation, including the0-321-19444-6 infamous breadcrumbs. ISBN: Pages: 1136
CustomProperties (Inherited from ChannelItem) "This is one of those rare books that you will read toobjects learn about the product and The CustomProperties collection of CustomProperty is predictably used as keep a catch-all for rereading to find those tidbits that you missed before." capturing Channel object characteristics that were not thought of by Microsoft but that we want —Gary SharePoint Server MVP user-defined name/value pairs can be used for nearly to haveBushey, for our Channel objects. These anything that we can dream up. They include an optional domain list of allowed values (default Content Management Server (CMS)objects). is fast becoming a vital an content-management tool that values are only allowed on Posting It's like having intelligent, built-in dictionary helps andobject. developers handle the ever-increasing amount of content on their objectadministrators for each Channel Web sites. However, an authoritative source of product information has been missing . . . until now. For instance, we could set up all channels to have a CustomProperty called IsBottomNavChannel with an allowed values list of true or false. As we iterate through the Microsoft Server A Completewe Guide the first that explains Channels Content collectionManagement to dynamically build2002: our navigation, couldischeck the book CustomProperty to how to effectively the power of in CMS. andand developers alikewe will learn leave how see which channelsunlock we should include the Administrators bottom navigation which ones should to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and out. API to manage content on the Microsoft platform. However, CustomProperties for a channel must be created using Site Manager; the Web Author This thorough reference explains product architecture, then how to create and and PAPI can only be used to addthe allowed values and update theshows value you of existing edit content and objects. use the workflow. Topic coverage includes CMSCMS administration and security, CustomProperty This can be a big disadvantage. Some pundits contend that the Publishing API,posting deployment template development. A creating a hidden in the options, channel site withconfiguration, a collection ofand placeholders yields the same running example is used throughout the book to illustrate how important CMS features name/value pair (placeholder/content pair) concept. This is potentially a better solution are since implemented in real-world Web site development. Inside find answers totemplate such questions new placeholders can be created in code, and we have allyou'll the capabilities of a and as: code-behind to exploit. Consistency across channels can also be maintained using a template, but this must be done manually by an administrator in Site Manager. For example, if we want to add a new CustomProperty to all of our channels, it must be manually added through Site Chapter 6: How do you customize workflow? Manager to each channel, one channel at a time. For a site with lots of channels, the task could be daunting human error Content and inconsistency. Chapterand 10:fraught How dowith youpotential develop for Microsoft Management Server (CMS) 2002 using Visual Studio .NET? That said, CustomProperties are part of CMS and may require our attention. Table 25-3 lists the primary andyou their description a CustomProperty object. Chapterproperties 17: How do establish user for rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter Table 32: How25-3. do you CustomProperty publish dynamic data? Member
Descriptions
[ Team LiBPublic ] CustomProperty Properties
•
Description
AllowedValues
Gets a collection of allowed values defined for a target CustomProperty object.
DefaultValue
Gets the default value of the target CustomProperty as a string, or as a null reference (Nothing, in Visual Basic) if the CustomProperty does not have a default value.
Name
Gets the name of this CustomProperty.
UsesDefaultValue
Indicates whether a CustomProperty is using the DefaultValue.
Value
Gets and sets a value for this CustomProperty object.
Table of Contents
Microsoft Content Management Server 2002: Complete Guide ResetToDefault Resets the Atarget instance
of the CustomProperty class to derive value, if a default value exists.
current value from its default ByBill English, Olga Londer, Shawnits Shell , Todd Bleeker , Stephen Cawood
Unlike the channel itself, each CustomProperty must have a unique Name within the Publisher: Addison collection Wesley CustomProperties for each channel. The Name is essentially the key and is used as Date: October 31, 2003 the Pub ascending, alphabetical sort order for the collection. Each CustomProperty must also have a value. ISBN: Unlike postings (discussed in the next chapter), Channel CustomProperty objects do not 0-321-19444-6 have an associated template and therefore are not allowed to have default values (these are Pages: 1136 set up for postings in the template using VS.NET, and there isn't an equivalent capability in Site Manager for channels). So, the CustomProperty UsesDefaultValue property is always set to false, the DefaultValue property always returns null, and the ResetToDefault method has no effect. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." To demonstrate this concept, assume that we want our channels to have the CustomProperty —Gary Bushey, SharePoint Server MVP previously described, IsBottomNavChannel, with an allowed values list of true or false. Using the Scratch channel hierarchy created in the Creating and Deleting Objects in a Channel section Content Management Server (CMS) is fast becoming a vital content-management tool that earlier in this chapter, we use Site Manager (our only option) to create the CustomProperty for helps administrators and developers handle the ever-increasing amount of content on their each channel in the hierarchy. Use the following steps to complete this setup task: Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Management Server 2002: A CMS Complete Guide is the first book that explains 1. OpenContent Site Manager and authenticate as a administrator. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to2. enhance their Web servers' scalability, and extensibility Expand each channel so that you canflexibility, see the entire hierarchy. by using CMS features and API to manage content on the Microsoft platform. 3. Start with the Scratch channel. This thorough reference explains the product architecture, then shows you how to create and edit and the usechannel the workflow. Topic Properties coverage includes administration and25-13). security, 4. content Right-click and choose from theCMS pop-up menu (Figure the Publishing API, deployment options, site configuration, and template development. A running example is used 25-13. throughout the bookProperties to illustrate how important CMS menu features are Figure Choose from pop-up implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
5.
Pages: On the1136 resulting
Scratch Properties dialog, choose the Custom tab, on the far right.
6. Click the New button, on the bottom left. 7. On theof resulting Addbooks Custom Property (Figure enter the following "This is one those rare that you willdialog read to learn 25-14), about the product and keepvalues. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Add Custom Property dialog Figure 25-14. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights?
8. Chapter Enter IsBottomNavChannel into the Property Name text box.organization's needs, size, 22: How do you best deploy CMS according to your and resources? 9. Choose Selection from the Property Type drop-down (the section inside of the frame below will change from single multirow box for entering the Current Text Value to a Chapter 32: How do youa publish dynamictext data? set of controls that allow the creation of the allowed values list). 10.
9.
[10. Team LiBthe ] New button to add the first value to the list. Click
11. On the resulting Add Value dialog, enter "true" into the Value text box and click the OK button. 12. Click the New button again to add a second value of "false". 13. While false is still highlighted, click the Set as Current button to assign the IsBottomNavChannel a value of "false" for the Scratch channel. 14. This will enable the OK button; click the OK button to dismiss the Add Custom Property dialog. 15. You will see the IsBottomNavChannel custom property we just added listed on the Custom tab of the Scratch Properties dialog (Figure 25-15). •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Figure 25-15. Scratch Properties dialog with custom property listed
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? 16. Click OK to dismiss the Scratch Properties dialog. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 From using Site Manager select.NET? the Brady channel and repeat steps 4 through 16 in exactly the same Visual Studio way. One at a time, select each of the channels—Alice, Carol, Cindy, Jan, Marsha, Mike, Bobby, Greg,Chapter and Peter—and 4 through 16 in exactly the same way except for Alice, 17: Howrepeat do yousteps establish user rights? Carol, and Mike. In step 13, when the Set as Current button is clicked, choose true rather than false.Chapter We want22: these to be listed in our fictitious bottom navigation. Yes, it needs, is tedious and Howthree do you best deploy CMS according to your organization's size, potentially fraught with error. and resources?
WhenChapter all of the channels been given our new CustomProperty, you can exit Site Manager 32: How dohave you publish dynamic data? and open VS.NET to the Scratchpad template file. We are going to be traversing the channel
for channels with the IsBottomNavChannel custom property set to true [hierarchy Team LiBsearching ] (basically looking for Alice, Carol, and Mike from the work we just completed). The easiest way to traverse the hierarchy is recursively. So, just above the Button1_Click function that we have been replacing throughout this chapter, enter the following code:
private void ShowChannelsWithCustomProperty(Channel cmsChannel, string nameCustomPropertyToShow, string valueCustomPropertyToShow) //***************************************************************** //Search all Channels from the cmsChannel passed to the function //for the nameCustomPropertyToShow CustomProperty Name //with the valueCustomPropertyToShow CustomProperty Value //If a child Channel has children, this function is called //recursively //***************************************************************** • Table of Contents { Microsoft try Content Management Server 2002: A Complete Guide { English,Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill //1. Iterate the Channels collection foreach (Channel cmsChildChannel in cmsChannel.Channels) { Publisher: Addison Wesley //2. Iterate the CustomProperties collection Pub Date: October 31, 2003 foreach (CustomProperty cmsChannelProperty ISBN: 0-321-19444-6 in cmsChildChannel.CustomProperties) Pages: 1136 { //3. Is it the CustomProperty we are looking for? if (cmsChannelProperty.Name == nameCustomPropertyToShow) { "This is one //4. of those rareitbooks will read to learn about the product and keep Does havethat theyou correct value? rereading toif find(cmsChannelProperty.Value those tidbits that you missed before." == —Gary Bushey, SharePoint Server MVP valueCustomPropertyToShow) { Content Management Server (CMS) is fast //5. Then show it in thebecoming ListBox a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their ListBox1.Items.Add(cmsChildChannel.Name.ToString()); Web sites. However, an authoritative source of product information has been missing . . . until } now. } } Microsoft Content Management 2002: A Complete Guide is the first book that explains //6. Check to see if Server a child Channel has children how to if(cmsChildChannel.AllChildren.Count effectively unlock the power of CMS. Administrators and developers alike will learn how > 0) to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and { API to manage content on the Microsoft platform. //7. Call this function recursively to visit every Channel ShowChannelsWithCustomProperty(cmsChildChannel, This thorough reference explains the product architecture, then shows you how to create and nameCustomPropertyToShow, valueCustomPropertyToShow); edit content and use the workflow. Topic coverage includes CMS administration and security, } the Publishing API, deployment options, site configuration, and template development. A } running example is used throughout the book to illustrate how important CMS features are } implemented in real-world Web site development. Inside you'll find answers to such questions catch(Exception eError) as: { //8. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); Chapter 6: How do you customize workflow? } } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? As theChapter comments thisestablish function user will recursively traverse all the channels and child 17: indicate, How do you rights? channels in a given root channel looking for a CustomProperty with a given Name set to a given How doto you best deploy CMSwith according to yourCustomProperty organization's needs, size, Value.Chapter Now we22: just need seed this function the channel, name to and resources? search for, and the CustomProperty value to select. Chapter 32: How do you publish dynamic data? template file with the following code: Replace the Button1_Click function of our Scratchpad
[private Team LiB ] void Button1_Click(object sender, System.EventArgs e) { try { //1. Grab the current CMS Context CmsHttpContext cmsContext = CmsHttpContext.Current;
//2. Populate the label with the root Channel name Label1.Text = cmsContext.Channel.Name.ToString() + " Channel " + "with IsBottomNavChannel CustomProperty set to true"; //3. Call function to show all Channels in the ListBox with // the IsBottomNavChannel CustomProperty set to true // CustomProperties can only hold strings so true is • Table of Contents // Content in quotes Microsoft Management Server 2002: A Complete Guide ShowChannelsWithCustomProperty(cmsContext.Channel, ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood "IsBottomNavChannel", "true"); } catch(Exception eError) Publisher: Addison Wesley { Pub Date: October 31, 2003 //4. Provide error feedback to the developer ISBN: 0-321-19444-6 Label1.Text = "Error: " + eError.Message.ToString(); Pages: 1136 } }
Build the solution andrare then refresh the Scratchpad posting in Internet Explorer, orkeep browse to it "This is one of those books that you will read to learn about the product and and click the Button. The pagethat should look similar to Figure 25-16. rereading to find those tidbits youreload missedand before." —Gary Bushey, SharePoint Server MVP
Figure 25-16. Channels with true IsBottomNavChannel
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights?
DefaultResourceGallery, DefaultTemplateGallery
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The DefaultResourceGallery and DefaultTemplateGallery properties refer to the resources and templates that32: authors areyou encouraged to use when Chapter How do publish dynamic data?creating new postings in the referencing Channel object. If these properties are not set (no reference to a gallery exists) or the user
have [doesn't Team LiB ] sufficient rights to the referenced gallery, CMS will return a null. Any use of gallery properties and methods will result in an exception if that object is null. In Site Manager, these two properties can be found in the Default Galleries for Web Authoring section on the Web Authoring tab of the Channel Properties dialog for each channel. Although Site Manager facilitates the setting of these properties, they are not directly used by CMS for any purpose. They are, however, exposed for use within PAPI. The following code example reuses the GetAuthenticatedCmsApplicationContext function from Listing 25-1. So we need to ensure the code from Listing 25-1 is entered above the Button1_Click function of our Scratchpad template file. Replace the Button1_Click function of our Scratchpad template file with the following code:
private void Button1_Click(object sender, System.EventArgs e) Table of Contents { Microsoft Content Management Server 2002: A Complete Guide try ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood { //1. Grab the current CMS Context CmsHttpContext cmsContextHttp = CmsHttpContext.Current; •
Publisher: Addison Wesley Pub Date:If October 31, 2003 //2. either gallery
is not set, go into update mode 0-321-19444-6 //ISBN:and set it Pages: 1136 if (cmsContextHttp.Channel.DefaultResourceGallery == null | cmsContextHttp.Channel.DefaultTemplateGallery == null) { //3. Grab an Authenticated Context in Update PublishingMode function "This is// one ofusing those the rare GetAuthenticatedCmsApplicationContext books that you will read to learn about the product and keep // to find fromthose Listing rereading tidbits25–1 that you missed before." = —Gary CmsApplicationContext Bushey, SharePoint ServercmsContextApp MVP GetAuthenticatedCmsApplicationContext( PublishingMode.Update); Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their //4. Position Application to information the current Web sites. However, an the authoritative sourceContext of product hasChannel been missing . . . until using its GUID (the most efficient Searches method) now. // // Cast the result of the Searches object as a Channel Microsoft ContentcmsChannelApp Management Server 2002: A Complete Guide is the first book that explains Channel = how to effectively unlock the power of CMS. Administrators and developers alike will learn how cmsChannelApp.Searches.GetByGuid( to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and cmsContextHttp.Channel.Guid) API to manage content on the Microsoft platform. as Channel; This thorough reference theDefaultResourceGallery product architecture, then is shows //5. If Currentexplains Channel notyou sethow to create and edit content and use the workflow. Topic coverage includes administration and security, if (cmsChannelApp.DefaultResourceGallery == CMS null) the Publishing API, deployment options, site configuration, and template development. A { running example is used throughout //6. Set it to the rootthe book to illustrate how important CMS features are implemented in real-world Web site development. Inside cmsCurrentApp.DefaultResourceGallery = you'll find answers to such questions as: cmsContextHttp.RootResourceGallery; } Chapter 6: Current How do you customize workflow? //7. If Channel DefaultTemplateGallery is not set if (cmsChannelApp.DefaultTemplateGallery == null) Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 { using Visual Studio .NET? //8. Set it to the root cmsChannelApp.DefaultTemplateGallery Chapter 17: How do you establish user rights? = cmsContextHttp.RootTemplateGallery; } Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? //9. Commit all changes cmsContextApp.CommitAll(); Chapter 32: How do you publish dynamic data?
[ Team //10. LiB ] Populate the label with the names of the default // galleries using the CmsApplicationContext Channel Label1.Text = "From CmsApplicationContext" + "
DefaultResourceGallery: " + cmsChannelApp.DefaultResourceGallery.Name.ToString() + "
DefaultTemplateGallery: " + cmsChannelApp.DefaultTemplateGallery.Name.ToString();
//11. Dispose of the stand-alone Application Context cmsContextApp.Dispose(); } else { //12. Use Current Channel from Http Context Channel cmsChannelHttp = cmsContextHttp.Channel as Channel; • of Contents //13.Table Populate the label with the names of the default Microsoft// Contentgalleries Managementusing Server 2002: A Complete Guide the CmsHttpContext Channel Label1.Text "From CmsHttpContext" + Cawood ByBill English , Olga Londer=, Shawn Shell , Todd Bleeker, Stephen "
DefaultResourceGallery: " + cmsChannelHttp.DefaultResourceGallery.Name.ToString() + "
DefaultTemplateGallery: " + Publisher: Addison Wesley cmsChannelHttp.DefaultTemplateGallery.Name.ToString(); Pub Date: October 31, 2003 } ISBN: 0-321-19444-6 } Pages: 1136 catch(Exception eError) { //14. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); "This } is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." } —Gary Bushey, SharePoint Server MVP Content (CMS)the is fast becoming a vitalincontent-management thatto it Build theManagement solution and Server then refresh Scratchpad posting Internet Explorer, or tool browse helps administrators of content on their and click the Button. and The developers page shouldhandle reloadthe andever-increasing look similar to amount Figure 25-17. Web sites. However, an authoritative source of product information has been missing . . . until now.
Figure 25-17. Show channel default galleries
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? Of course, these properties can be set to any valid ResourceGallery object or TemplateGallery
in CMS. Setting these to the root of the current channel is just a certainty [object, Team respectively, LiB ] for the sake of the example. Conversely, setting this property to null removes the reference to the default gallery. This member can be useful to specify the default gallery as described. It could be valuable to use this value if you were creating a custom set of admin screens for the creation of a posting.
GetByRelativePath (Inherited from ChannelItem) As previously described, the Channel object's Path property retrieves the fully qualified path using the Name property of the channels involved. The GetByRelativePath method provides a means to get a Channel object or Posting object relative to the current channel's Path. Of course, we can only retrieve objects that the user has appropriate rights to. •
Table of Contents
This concept and syntax is similar to the relative referencing used in HTML and DOS. The current object is represented with a period ("."), its parent is represented by two periods (".."), ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood and each channel name is separated by a forward slash ("/"). Unlike the channel Path, the relative path string must not begin with a forward slash. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Using the hierarchy given at the beginning of this chapter, consider the following examples. Pub Date: October 31, 2003
The Greg channel's path is /Channels/Scratch/Brady/Mike/Greg. With Greg as the current ISBN: 0-321-19444-6 channel, we1136 could use the GetByRelativePath method with the following relative path: "../../.." Pages: (Greg's parent's parent's parent). That would retrieve an object that we could cast as a Channel object, and we would have our Scratch channel. Again, with Greg as the current channel, we could use the GetByRelativePath method with the "This is one of those rare books that(Greg's you willparent's read to parent's learn about product and keep following relative path: "../../Carol" childthe channel Carol). That would rereading to find those tidbits that you missed before." retrieve an object that we could cast as a Channel object, and we would have the Carol —Gary channel.Bushey, SharePoint Server MVP Content Management Serveras (CMS) is fast becoming a vital content-management tool that Last, with the Carol channel the current channel, we could use the GetByRelativePath helps administrators and developers handle the ever-increasing amount of content their method with the following relative path: "./Marsha" (Carol's child channel Marsha). on That would Web sites. However, an authoritative source of product information has been missing . . . until retrieve an object that we could cast as a Channel, and we would have the Marsha channel. now.
Let's see these three examples in code. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of of our CMS. Administrators andfile developers will learn Replace the Button1_Click function Scratchpad template with the alike following code:how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. private void Button1_Click(object sender, System.EventArgs e) This thorough reference explains the product architecture, then shows you how to create and { edit content and use the workflow. Topic coverage includes CMS administration and security, try the{ Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are //1. Grab the current CMS Context implemented in real-world Web site development. Inside you'll find answers to such questions CmsHttpContext cmsContext = CmsHttpContext.Current; as: //2. Populate the label with static text Label1.Text = "Get Channel Path using GetByRelativePath"; Chapter 6: How do you customize workflow? //3. Remove any previous entries from the ListBox Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 ListBox1.Items.Clear(); using Visual Studio .NET? //4. Grab Channel from the Context Chapter 17:the HowGreg do you establish user rights? // Cast the result of the Searches object as a Channel Channel cmsGregChannel = deploy CMS according to your organization's needs, size, Chapter 22: How do you best cmsContext.Searches.GetByPath( and resources? "/Channels/Scratch/Brady/Mike/Greg") as Channel; Chapter 32: How do you publish dynamic data?
//5. [ Team LiBIf ] our search for the Greg Channel was successful if (cmsGregChannel != null) { //6. Add the Channel path to the ListBox ListBox1.Items.Add ("Greg Path: " + cmsGregChannel.Path.ToString()); //7. Grab the relative Scratch Channel using the Greg Channel Channel cmsScratchChannel = cmsGregChannel.GetByRelativePath("../../..") as Channel; //8. If our relative search for Scratch Channel // was successful if (cmsScratchChannel != null) • Table of Contents { Microsoft Content Management Server 2002: //9. Add the Channel pathA Complete to the Guide ListBox ListBox1.Items.Add ByBill English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood ("Scratch Path: " + cmsScratchChannel.Path.ToString()); } elseAddison Wesley Publisher: { Pub Date: October 31, 2003 //10. Provide nonerror feedback to the developer ISBN: 0-321-19444-6 ListBox1.Items.Add ("Scratch Channel not found"); Pages: 1136 } //11. Grab the relative Carol Channel using the Greg Channel Channel cmsCarolChannel = "This is one of those rare books that you will read to learn about the product and keep cmsGregChannel.GetByRelativePath("../../Carol") rereading as to find those tidbits that you missed before." Channel; —Gary Bushey, SharePoint Server MVP //12. If our relative search for Carol Channel Content// Management Server (CMS) is fast becoming a vital content-management tool that was successful helps administrators and developers handle the ever-increasing amount of content on their if (cmsCarolChannel != null) Web sites. However, an authoritative source of product information has been missing . . . until { now. //13. Add the Channel path to the ListBox ListBox1.Items.Add Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ("Carol Path: " + cmsCarolChannel.Path.ToString()); how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and //14. Grab the relative Marsha Channel using the API to manage content on the Microsoft platform. // Carol Channel Channel cmsMarshaChannel = This thorough reference explains the product architecture, then shows you how to create and cmsCarolChannel.GetByRelativePath("./Marsha") edit content and use the workflow. Topic coverage includes CMS administration and security, as API, Channel; the Publishing deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are //15. If our relative for Marsha Channel implemented in real-world Web site search development. Inside you'll find answers to such questions // was successful as: if (cmsMarshaChannel != null) { //16. Add to the ListBox Chapter 6: How dothe you Channel customizepath workflow? ListBox1.Items.Add Chapter 10: How doPath: you develop for Microsoft Content Management Server (CMS) 2002 ("Marsha " + cmsMarshaChannel.Path.ToString()); using} Visual Studio .NET? else Chapter 17: How do you establish user rights? { //17. Provide nonerror feedback to the developer Chapter 22: How do you best ("Marsha deploy CMS according your organization's needs, size, ListBox1.Items.Add Channel notto found"); and } resources? } Chapter else 32: How do you publish dynamic data?
[ Team {LiB ] //18. Provide nonerror feedback to the developer ListBox1.Items.Add ("Carol Channel not found"); } } else { //19. Provide nonerror feedback to the developer ListBox1.Items.Add ("Greg Channel not found"); } } catch(Exception eError) { //20. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); • } Table of Contents Microsoft Content Management Server 2002: A Complete Guide } ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it andPublisher: click theAddison Button. The page should reload and look similar to Figure 25-18. Wesley Pub Date: October 31, 2003
Figure 25-18. Show GetByRelativePath results
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example throughout the book illustrate howor important CMS features This member can is beused useful for searching for a to Channel object Posting object relative are to the implemented in real-world Web site development. Inside you'll find answers to such questions current channel or posting. However, searching for objects using their path is potentially as: fraught with error. If the reference is to an ambiguous item (duplicates are not prevented by
CMS), one that does not exist, one that is in a different publishing mode, or one that the user doesn't have rights to,do a you null customize value is returned. Also, since the Path consists of the names of Chapter 6: How workflow? channels and postings and users can change those names, the Path can change, potentially rendering the 10: codeHow invalid. There can be issues Management as well. Chapter do you develop forperformance Microsoft Content Server (CMS) 2002 using Visual Studio .NET? [ Team LiB ] Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Constructing Dynamic Navigation and Displaying Breadcrumbs Most CMS sites dynamically generate their navigation based around the channel and posting structure, the current user's rights, the PublishingMode that user is working in, and relevant properties of the Context, Postings, and Channels surrounding the content being viewed. Special properties like DisplayName and IsHiddenModePublished aid in the delivery of this navigation. Usually this code is placed into a user control so that it can be used on templates throughout the Web Property. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: Although briefly mentioned here, dynamic navigation and breadcrumbs are covered in depth in Chapter 14.
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 The beauty of this model is that as the site grows and users change the content and structure, your navigation, Pages: 1136 which is based on the channel hierarchy and postings within it, immediately reflects the changes to the site. Entire sections of the site can be moved or renamed, and the site navigation will adjust. No more broken links.
Navigation can be created so that it is role specific or based upon the presence or absence of a "This is one of those rare books that you will read to learn about the product and keep specific condition or value. It can be as static or dynamic as the site requires. rereading to find those tidbits that you missed before." —Gary Bushey, Server MVPon a mixed (ASP and ASP.NET) site or one that requires Things can get aSharePoint little bit more difficult some non-template-based pages. However, these obstacles can also be overcome. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators developers handle ever-increasing amount of content their Because dynamic siteand navigation requests sothe many objects for each posting served,on it can Web sites. However, an authoritative source of product information has been missing . potentially degrade performance. To improve the performance of templates that contain. . until now. dynamic navigation, the developer should enable output caching. Also, a common rule of thumb is when the number of channels and postings in a given channel exceeds a few hundred, Microsoft Content Management Server 2002: A Complete Guide is the first book that explains performance issues when rendering navigation may arise. It would be better to have your how to effectively unlock the power of CMS. Administrators and developers alike will learn how information architects restructure the site to better accommodate the actual use. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API managetechnique content on Microsoft One to common of the presenting theplatform. location of the current content within the hierarchy is the use of something called breadcrumbs. Basically, the idea is to show the successive parent This thorough reference explains the product architecture, then shows you how to create and of any content until a top-level channel is reached. Traversing the ancestry of a posting can be edit content and use the workflow. Topic coverage includes CMS administration and security, done both sequentially and recursively. These two methods are the final coding example the Publishing API, deployment options, site configuration, and template development. A explored in this chapter. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'llperform find answers to such questions Ensure that the following two functions, which fundamentally the same function, are as: entered above the Button1_Click function of our Scratchpad template file. First enter the function to build the breadcrumb sequentially: Chapter 6: How do you customize workflow?
private string SequentialBreadcrumb(Channel cmsLeafChannel, Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 string crumbSeperator) using Visual Studio .NET? { tryChapter 17: How do you establish user rights? { //1. String variable theCMS breadcrumb it is built Chapter 22: How do you to besthold deploy according as to your organization's needs, size, string growingBreadcrumb = null; and resources? //2. Declare a Channel variable to hold Chapter 32: How do you publish dynamic data? the current Channel // and initially populate it with the leaf channel
Channel [ Team LiB ] cmsChannel = cmsLeafChannel; //3. Loop until we get to the Top Channel while(!cmsChannel.IsRoot) { //4. Concatenate an anchor tag including the name of this // Channel to the beginning of the growing string growingBreadcrumb = "" + cmsChannel.DisplayName.ToString() + "" + growingBreadcrumb; //5. Check if the next channel is the Top Channel if(!cmsChannel.Parent.IsRoot) { //6. If not, include the separator • Table of Contents growingBreadcrumb = crumbSeperator + growingBreadcrumb; Microsoft}Content Management Server 2002: A Complete Guide //7.,Olga SetLonder the ,Shawn current to ,Stephen its ownCawood parent ByBill English ShellChannel , Todd Bleeker cmsChannel = cmsChannel.Parent; } //8. Return the completed breadcrumb string Publisher: Addison Wesley return growingBreadcrumb; Pub Date: October 31, 2003 } ISBN: 0-321-19444-6 catch(Exception eError) Pages: 1136 { //9. Provide error feedback to the developer Label1.Text = "Error: " + eError.Message.ToString(); "This//10. is one Return of those the rare empty books that you will read to learn about the product and keep breadcrumb string rereading to find those tidbits that you missed before." return string.Empty; —Gary Bushey, SharePoint Server MVP }
} Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web an to authoritative source of product information has been missing . . . until Then sites. enter However, the function build the breadcrumb recursively: now. Microsoft Management Server 2002: A Complete Guide is the first book that explains private Content string RecursiveBreadcrumb(Channel cmsChannel, how to effectively unlock the power of CMS. Administrators and developers alike will learn how string crumbSeperator) to { enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and APItry to manage content on the Microsoft platform.
{ This thorough reference explains product architecture, then shows you how to create and //1. We have reached thethe top ancestor edit content and use the workflow. Topic coverage includes CMS administration and security, if(cmsChannel.Parent.IsRoot) the Publishing API, deployment options, site configuration, and template development. A { running//2. example is used throughout the book to illustrate how important CMS features are Pop an anchor tag including the name of the Top Channel implemented in real-world Web site development. Inside you'll find answers to such questions return "" + as: cmsChannel.Name.ToString() + ""; } else Chapter 6: How do you customize workflow? { //3. Call this recursively, the way back Chapter 10: How dofunction you develop for Microsoft on Content Management Server (CMS) 2002 // Visual pop Studio an anchor using .NET?tag including the name of this Channel // concatenated to the end of the growing string return RecursiveBreadcrumb(cmsChannel.Parent, Chapter 17: How do you establish user rights? crumbSeperator) + Chapter 22: How do you best href='" deploy CMS according to your+organization's needs, size, crumbSeperator + " tags only allowing the user to view the content. This is all [rendered Team LiB ] managed at runtime by a Placeholder object that is instantiated and hydrated with the contained content typically from the CMS Repository. The @ Register directive used by a CMS placeholder server control looks something like the following: [View full width] 0) Label1.Text += "
GetEvents[0] DisplayName: " + • Table of Contents cmsDefinition.GetEvents()[0].DisplayName.ToString(); Microsoftelse Content Management Server 2002: A Complete Guide Label1.Text += "
GetEvents Count: " + ByBill English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood cmsDefinition.GetEvents().Count.ToString(); else Label1.Text += "
GetEvents: none"; Publisher: Addison Wesley Pub Date: October 31, 2003
//12. Add to label info about GetHashCode ISBN: 0-321-19444-6 Label1.Text += "
GetHashCode: " + Pages: 1136 cmsDefinition.GetHashCode().ToString(); //13. Add to label info about GetProperties if (cmsDefinition.GetProperties() != null) "This isif one(cmsDefinition.GetProperties().Count of those rare books that you will read to learn about the product and keep > 0) rereading Label1.Text to find those tidbits that you missed before." DisplayName: " + += "
GetProperties[0] —Gary Bushey, SharePoint Server MVP "" + cmsDefinition.GetProperties()[0].DisplayName .ToString(); Contentelse Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and+= developers handle the ever-increasing amount Label1.Text "
GetProperties Count: " + of content on their Web sites. However, an authoritative source of product information has been missing . . . until cmsDefinition.GetProperties().Count.ToString(); now.else Label1.Text += "
GetProperties: none"; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how //14. Add to label info about GetType to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Label1.Text += "
GetType: " + API to manage content on the Microsoft platform. cmsDefinition.GetType().ToString(); This thorough reference explains the product architecture, then shows you how to create and //15. Add info about edit content and to uselabel the workflow. Topic IsReadOnly coverage includes CMS administration and security, Label1.Text "
IsReadOnly: " + the Publishing API, += deployment options, site configuration, and template development. A cmsDefinition.IsReadOnly.ToString(); running example is used throughout the book to illustrate how important CMS features are } implemented in real-world Web site development. Inside you'll find answers to such questions } as:
Build Chapter the solution and do then refresh the Scratchpad 6: How you customize workflow? posting in Internet Explorer, or browse to it and click the Button. The page should reload and look similar to Figure 27-8. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 usingFigure Visual Studio .NET? 27-8. Read-only PlaceholderDefinition members Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep Read-Only Members for a PlaceholderDefinition rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP All of the following properties are inherited from the CustomReflectionObject: Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their GetAttributes Web sites. However, an authoritative source of product information has been missing . . . until now. GetClassName Microsoft Content Management Server 2002: A Complete Guide is the first book that explains GetComponentName how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and GetConverter API to manage content on the Microsoft platform. GetDefaultEvent This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, GetDefaultProperty the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are GetEvents implemented in real-world Web site development. Inside you'll find answers to such questions as: GetProperties Chapter 6: How do you customize workflow? GetHashCode, GetType Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 The same Placeholder. usingas Visual Studio .NET? Chapter 17: How do you establish user rights?
IsReadOnly
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The IsReadOnly property retrieves the Boolean value that indicates whether the PlaceholderDefinition modified not. If data? it returns true, the PlaceholderDefinition is Chapter 32: Howcan do be you publish or dynamic read-only, and any attempt to set a property will result in an exception.
[A Team LiB ] PlaceholderDefinition can become read-only if it is cloned with the optional parameter set to true.
Read/Write Members As before, the code to see all the read/write PlaceholderDefinition members is presented comprehensively. All these members can be assigned a value in code or through various other user interfaces. However, none of these changed values will become permanent until CommitAll is called on the Context. Uncommitted changes can be discarded by calling RollbackAll. If neither method is explicitly called when the Context in which the change is made is destroyed (goes out of scope or is disposed of), the disposition of the changes will be decided by the value of the RollbackOnSessionEnd property. By default, this property is false, so all changes are committed. In general, the properties of deleted or marked-for-delete PlaceholderDefinitions • of Contents and historicalTable revisions can't be altered. Microsoft Content Management Server 2002: A Complete Guide
Properties only be,Shawn alteredShell when the PlaceholderDefinition By Bill Englishcan , Olga Londer , Todd Bleeker , Stephen Cawood
is retrieved from the PlaceholderDefinitions collection property of a Template object rather than the Definition property of a Posting object's Placeholder property. Of course, the user must have sufficient rights (the Posting object's CanSetProperties property must return true), and the mode must Publisher: Addison Wesley be in Update PublishingMode. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Setting a property may change the state of a template and any ConnectedTemplates. Pages: 1136
Replace the Button1_Click function of our Scratchpad template file with the following code:
private void Button1_Click(object System.EventArgs e) "This is one of those rare books that you sender, will read to learn about the product and keep { rereading to find those tidbits that you missed before." //1. Bushey, Put current Template —Gary SharePoint Serverinto MVP variable Template cmsTemplate = CmsHttpContext.Current.Posting.Template; Content Management Server (CMS) is fast becoming a vital content-management tool that //2. Grab the first PlaceholderDefinition to view amount of content on their helps administrators and developers handle the ever-increasing PlaceholderDefinition cmsDefinition = product information has been missing . . . until Web sites. However, an authoritative source of now.cmsTemplate.PlaceholderDefinitions[0] as PlaceholderDefinition; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively the of the CMS.specified Administrators and developers alike will learn how //3. Check to unlock see if wepower found PlaceholderDefinition to if enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and (cmsDefinition != null) API{ to manage content on the Microsoft platform. //4. Populate the label with the read-only properties This thorough reference explains thePlaceholderDefinition product architecture, thenMembers"; shows you how to create and Label1.Text = "Read Write edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment options, site configuration, and template development. A //5. Add API, to the label with PlaceholderDefinition Description running example is used throughout the book to illustrate how important CMS features are Label1.Text += "
Description: " + implemented in real-world Web site development. Inside you'll find answers to such questions HttpUtility.HtmlEncode(cmsDefinition.Description.ToString()); as: //6. Add to the label with PlaceholderDefinition Name Label1.Text += "
Name: " + Chapter 6: How do you customize workflow? HttpUtility.HtmlEncode(cmsDefinition.Name.ToString()); } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 } using Visual Studio .NET? Chapter 17: How do you establish user rights? Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. should reload and look similar to Figure 27-9. Chapter 22: HowThe do page you best deploy CMS according to your organization's needs, size, and resources?
Figure 27-9. Read/write PlaceholderDefinition members
Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Read/Write Members for a PlaceholderDefinition
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." As with Bushey, Placeholders, BeginWrite, and BeginRead are all protected members that are —Gary SharePoint ServerEndWrite, MVP accessed by the PlaceholderDefinition-specific classes on our behalf. Suffice it to say that altering members for aServer PlaceholderDefinition object requires the implementation and Content Management (CMS) is fast becoming a vital content-management toolcalling that of the BeginWrite method to start the process and validate that the user has sufficient rights helps administrators and developers handle the ever-increasing amount of content on theirto update the However, PlaceholderDefinition. To save a modified PlaceholderDefinition object requires the Web sites. an authoritative source of product information has been missing . . . until implementation and calling of the EndWrite method. BeginRead should be implemented and now. called whenever a PlaceholderDefinition property is read. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains The OnCloned method can bepower implemented create a proprietary solution when a learn how how to effectively unlock the of CMS.to Administrators and developers alike will PlaceholderDefinition cloned.scalability, If this method is implemented, it overrides theCMS default behavior to enhance their Web isservers' flexibility, and extensibility by using features and discussed earlier in this on chapter. API to manage content the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Description (Inherited from HierarchyItem) the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are The Description property holds the free-form text description (see the Avoid Hack by Using implemented in real-world Web site development. Inside you'll find answers to such questions HtmlEncode sidebar in Chapter 25) for the referencing PlaceholderDefinition. as:
CMS automatically trims leading and trailing spaces and truncates the length to 500 characters for any string 6: assigned thiscustomize property. workflow? Typical alphanumeric characters are allowed. Chapter How dotoyou This member useful for develop setting and showing aContent verboseManagement description of the (CMS) 2002 Chapter can 10: be How do you for Microsoft Server PlaceholderDefinition that the user is using. using Visual Studio .NET? Chapter 17: How do you establish user rights?
Name (Inherited from HierarchyItem) Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? The Name property holds the free-form text of the actual name for the referencing PlaceholderDefinition. This name is not intended for display (see the Avoid Hack by Using Chapter 32: How do you publish dynamic data? HtmlEncode sidebar) per se but is visible to the user in the URL and Path. This property is not
to be [allowed Team LiB ] empty and must be case-insensitive unique within the collection. CMS automatically trims leading and trailing spaces and truncates the length to 100 characters for any string assigned to this property. Typical alphanumeric characters are allowed, but we recommend against using spaces in PlaceholderDefinition names. This member can be useful for setting and showing the Name of the PlaceholderDefinition. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Working with Placeholder Child Objects There are two child objects of the Placeholder object. We have already covered both of them exhaustively.
Definition The Definition is the PlaceholderDefinition that we covered throughout this chapter. This is an in-memory reference to the actual definitions found in the PlaceholderDefinitions collection of a • Table of Contents template. It is meant for reference only. Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Posting Publisher: Addison Wesley
ThisPub is the object Date:Posting October 31, 2003 to which the Placeholder object belongs. Once we have a reference to this, assuming sufficient rights, we can do anything that we discussed in Chapter 26. ISBN: 0-321-19444-6 Pages: 1136
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Custom Placeholders We have talked about the six built-in placeholders that CMS comes with. What if you need to host content that doesn't fit easily into one of the provided containers? Maybe a drop-down list or a Calendar control, perhaps a Flash object or a PDF. Fortunately, this entire infrastructure is extensible. We go through an entire example of creating a drop-down list based upon an XmlPlaceholder in Chapter 29. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary We started this chapter talking about the three forces at work within a CMS placeholder. We covered the Placeholder object and the PlaceholderDefinition quite extensively. Unfortunately, there are limits on what can be done on the physical side of things in CMS today. We still need a "hands-on" developer to create that initial template file for CMS to do its work. Programmatically manipulating the physical ASPX template file and its placeholder controls is very limited. Only in-memory changes can be made, and they cannot be saved or committed. We did discuss the various controls available to the .NET developer, and then we delved into the various structures that CMS has borrowed from .NET to make placeholders work. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
We created a new Placeholder and a new PlaceholderDefinition and then deleted them. PlaceholderDefinitions can be created and kept, but Placeholder objects are for in-memory use only. We then saw several examples of the various read-only and read/write members of both Placeholder and PlaceholderDefinition objects.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Date: October We Pub touched briefly31, on2003 the Definition and Posting child objects of the placeholder and introduced ISBN: 0-321-19444-6 the concept of creating your very own placeholder types. Pages: 1136
Next we explore all the capabilities of a method that we have already used in many of our previous examples: the Context Searches method. It is a very powerful, if potentially resourceintensive, tool. "This is LiB one]of those rare books that you will read to learn about the product and keep [ Team rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 28. Searching for CMS Assets There are times, especially when using the CmsApplicationContext in a stand-alone setting or in Update PublishingMode from a posting, when you want to locate a specific object or collection of objects, regardless of the current location. For those times, both the CmsHttpContext and the CmsApplicationContext provide a method called Searches. It provides direct access to an individual object or collections of objects with specific characteristics. For many of the code samples throughout this book to work, we need to use some of the Searches property's methods. We will use all of those methods in this chapter. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide [ Team LiB ] ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Exploring Searches The Searches method of a CMS context enables us to search for assets like channels, postings, template definitions, template galleries, resources, and resource galleries. Uses of the Searches method can be broadly grouped into two main categories: searching for a single asset or searching for a collection of assets. Searching for a collection of assets can be further categorized by the type of asset retrieved: Channel objects, Posting objects, Template objects, or Gallery objects. Searches automatically take into consideration the rights and privileges of the authenticated context user,Table the of context mode, and multiple versions of an asset (if they exist) when returning • Contents assets. However, user subscription settings are not considered when we are searching for Microsoft Content Management Server 2002: A Complete Guide channels and postings except for the NewChannels and NewPostings methods. Subscribed ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood channels or postings can be determined by checking the Channel.IsSubscribed property and the Posting.Parent. IsSubscribed property. Be aware, deleted items are never returned from a search. Publisher: Addison Wesley
Date: of October 31, 2003 ThePub results a search will typically need to be cast as a specific data type in order for the object ISBN: to be0-321-19444-6 assigned to a variable. The following two lines of code both are equally effective at 1136 castingPages: the search result as a posting:
cmsPosting1 = cmsContext.Searches.GetByGuid(sGuid) as Posting; cmsPosting2 = (Posting)cmsContext.Searches.GetByGuid(sGuid); "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP The code in this book typically casts objects using the "as" keyword followed by the data type because Management it is easier forServer the code to flow to multiple lines, which is good for displaying code Content (CMS) is fast becoming a vital content-management tool thatin a limited-width book. Preceding the cast object with the data type in parentheses works just helps administrators and developers handle the ever-increasing amount of content on their as well in VS.NET. Web sites. However, an authoritative source of product information has been missing . . . until now.
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Searching for a Single Asset Frequently, we will know precisely which asset we need. It could be a hard-coded reference, a reference input by the user, a reference retrieved from the database, or a reference to an asset related to something in the current context. However, searching for an asset that doesn't exist (or can't be found), is not visible in the current publishing mode, or the user doesn't have sufficient rights to view will return a null reference. Since CMS doesn't require the use of unique names when we are creating assets, it is possible to make a request for more than one asset with the same name. Ambiguous searches also result in a null reference. The GetByGuid method is the most efficient search, and an asset's GUID is always unique • Table of Contents (even historically). Since CMS doesn't theGuide use of Microsoft Content Management Server 2002: require A Complete
unique names when we are creating assets, the path and URL are not guaranteed to resolve to a unique asset. An asset's GUID ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood does not change if the object is moved to a different container in the hierarchy. If possible, GetByGuid should be used instead of the GetByPath or GetByUrl methods. Publisher: Addison Wesley Pub Date: October 31, 2003
Returning a Single Asset ISBN: 0-321-19444-6 Pages: 1136
The following sections cover how the GetByGuid, GetByPath, and GetByUrl methods can be used to return a single asset. "This is one of those rare books that you will read to learn about the product and keep GetByGuid rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Since our Scratchpad (see the Scratchpad sidebar in Chapter 24 for details) has only a limited Content Management Server is fast becoming content-management tool that set of assets at this point, the(CMS) first Searches exampleaisvital something of a self-fulfilling prophecy. helps administrators and developers handle theasset ever-increasing amount on their It does demonstrate that we can search for an given that we knowof itscontent GUID and that Web sites. However,to anallauthoritative sourceWe of product information been missing . . until GUIDs are assigned assets we create. will be searching for has a posting, but we .could now. just as easily search for a channel, a template, a template gallery, a resource, or a resource gallery. We only need to know the GUID of the asset we want, and GUID is an available readMicrosoft Content Management Server the 2002: A Complete Guide is the first book that explains only property on all assets. Be aware, GUID string must include braces, hyphens, 32 how to effectively unlock power of CMS. Administrators and and developers alike willthe learn how characters grouped in fivethe alphanumeric sections (8-4-4-4-12), generally uses to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and following format: { xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}. API to manage content on the Microsoft platform. Replace the Button1_Click function of our Scratchpad template file with the following code: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing deployment options, site configuration, and template private void API, Button1_Click(object sender, System.EventArgs e)development. A running example is used throughout the book to illustrate how important CMS features are { implemented in real-world Web site development. Inside you'll find answers to such questions //1. Grab the current CMS Context as:CmsHttpContext cmsContext = CmsHttpContext.Current;
//2. Find this Posting using the Context current Posting's GUID 6: How dothe you result customize // Chapter We must cast of workflow? a Searches object as a Posting Posting cmsPostingFound = Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 cmsContext.Searches.GetByGuid(cmsContext.Posting.Guid) using Visual Studio .NET? as Posting; Chapter 17: How do you establish user rights? //3. Check if Posting was found if(cmsPostingFound Chapter 22: How do!= younull) best deploy CMS according to your organization's needs, size, { and resources? //4. Check if the current Posting is equal to Posting found if(cmsContext.Posting.Equals(cmsPostingFound)) Chapter 32: How do you publish dynamic data? {
[ Team //5. LiB ] Assign the display name of the Posting Label1.Text = "Posting Found by GUID: " + cmsPostingFound.Path.ToString(); } } }
The second line of code actually does the search. It looks for a CMS asset that has the same GUID as the current Posting object, casts the object search result as a Posting object, and assigns it to a variable called cmsPostingFound, which is declared as a Posting object. We are referencing the current Posting object's GUID so we can be sure that the formatting of the GUID will be correct, but this value is just a string and can be provided in many other ways. Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click theTable Button. The page should reload and look similar to Figure 28-1. • of Contents Microsoft Content Management Server 2002: A Complete Guide
Figure 28-1. Find current posting Searches example
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
GetByPath This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Locating an asset the GetByPath method is very similar to template using the development. GetByGuid method. In the Publishing API,with deployment options, site configuration, and A fact, we example will only alter thethroughout second linethe in book the code from ourhow firstimportant example. CMS However, there running is used to illustrate features areare several factors consider Web whensite using this method. GetByPath is less efficient implemented into real-world development. Inside you'll find answers to than such GetByGuid questions and may degrade site performance. Unlike with GetByGuid, if an asset is moved to a different as: container in the hierarchy (the path changes), the search will no longer find the asset. It is also possible to make a request that has an ambiguous search result (two assets with exactly the 6: How do sameChapter path), resulting in ayou nullcustomize reference.workflow? Chapterrequires 10: Howus dotoyou develop for relative Microsoft Serverrelative (CMS) paths 2002 This method provide a root orContent absoluteManagement path to an asset; using Visual Studio .NET? will result in an exception. An asset's path always begins with a slash mark (the root), followed by the containers it is in (if any) separated by slash marks (/), and ending with its name. Chapter How do contain you establish rights? Containers can17: optionally a slashuser mark at the end of the path. So, as we saw in the result of the first example, the path to our Scratchpad posting should be Chapter 22: How do you best deploy according your organization's size, /Channels/Scratch/Scratchpad. If we were CMS just looking forto the channel, we couldneeds, use either and resources? /Channels/Scratch or /Channels/Scratch/. Chapter 32: How you read publish dynamic Note that the user onlydo needs rights to thedata? requested asset for Searches to find it. Assets
theLiB asset [that Team ] itself contains may not be available to the user. If an invalid path string is given, an exception will result. Replace the Button1_Click function of our Scratchpad template file with the following code:
private void Button1_Click(object sender, System.EventArgs e) { //1. Grab the current CMS Context CmsHttpContext cmsContext = CmsHttpContext.Current; //2. Find this Posting using the Context current Posting's Path // We must cast the result of a Searches object as a Posting Posting cmsPostingFound = cmsContext.Searches.GetByPath(cmsContext.Posting.Path) • Table of Contents as Posting; Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
//3. Check if Posting was found if(cmsPostingFound != null) { Publisher: Addison Wesley //4. Check if the current Posting is equal to the Posting found Pub Date: October 31, 2003 if(cmsContext.Posting.Equals(cmsPostingFound)) { ISBN: 0-321-19444-6 Pages: //5.1136 Assign the display name of the Posting Label1.Text = "Posting Found By Search Path: " + cmsPostingFound.Path.ToString(); } } is one of those rare books that you will read to learn about the product and keep "This } rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Yeah, that was like cheating. linebecoming 2 with either of the following code snippets should Content Management Server Replacing (CMS) is fast a vital content-management tool that also yield the same result: helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Posting cmsPostingFound = cmsContext.Searches.GetByPath("/Channels/Scratch/Pad") Microsoft Content Management Server 2002: A Complete Guide is the first book that explains astoPosting; how effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. or let the user type the path into the TextBox: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Posting cmsPostingFound = options, site configuration, and template development. A the Publishing API, deployment cmsContext.Searches.GetByPath(TextBox1.Text.ToString()) running example is used throughout the book to illustrate how important CMS features are as Posting; implemented in real-world Web site development. Inside you'll find answers to such questions as: Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. page should reload and look the same as Figure 28-1. We just arrived Chapter 6: How The do you customize workflow? at the same Posting object that was returned using a different Searches method. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
GetByUrl
Chapter 17: How do you establish user rights?
The GetByUrl method onlybest retrieve URL-based assets:to Posting objects and Channel objects. Chapter 22: Howcan do you deploy CMS according your organization's needs, size, CMS can these assets using two different types of URLs. and reference resources? Chapter 32: How do you publish dynamic data? Hierarchical URLs: The hierarchical URL to our Scratchpad posting looks like this:
/Scratch/Scratchpad.htm. The possibility of using short, simple URLs is a differentiator for [ Team LiB ] CMS in the marketplace. Most CMS systems require long URLs that are very difficult for users to type and remember. Note the use of the ".htm" suffix in the URL. Since our template is an ASPX page and the posting content is in a SQL Server database, when the request is made of IIS, the CMS ISAPI filter is working behind the scenes to transform this hierarchical URL into the GUID-based QueryString we see in the address bar of the browser when the posting it represents is rendered. GUID-based URLs: The GUID-based URL to our Scratchpad posting looks something like this: /NR/exeres/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Of course, the actual alphanumeric values of the GUID would be used instead of the x's shown here. The braces that were required in formatting the GUID for retrieval using the GetByGuid method are noticeably absent. It is evident why this method is not very efficient and only intended to be used by search engines and Table site-indexing software. URLs must be resolved by the CMS engine before the • of Contents assets can be retrieved. Hence, you Amight expect, Microsoft Content Management Serveras 2002: Complete Guidehierarchical URLs can only return a Channel object or a Posting object that is in a Published state, whereas GUID-based URLs can ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood return a Channel object or a Posting object regardless of its publishing state. It is also probably evident that GetByGuid and GetByPath can retrieve some assets that GetByUrl can't. To get a template, a Addison template gallery, a resource, or a resource gallery, we must use a Searches Publisher: Wesley method other than GetByUrl. Pub Date: October 31, 2003
ISBN: 0-321-19444-6 Replace the Button1_Click function of our Scratchpad template file with the following code: Pages: 1136
private void Button1_Click(object sender, System.EventArgs e) { //1. Grab current CMSthat Context "This is one of the those rare books you will read to learn about the product and keep CmsHttpContext cmsContext CmsHttpContext.Current; rereading to find those tidbits that=you missed before." —Gary Bushey, SharePoint Server MVP //2. Find this Posting using the Context current Posting's URL // We must castServer the result a becoming Searches aobject as a Posting Content Management (CMS) isof fast vital content-management tool that Posting cmsPostingFound = helps administrators and developers handle the ever-increasing amount of content on their Web cmsContext.Searches.GetByUrl(cmsContext.Posting.Url) sites. However, an authoritative source of product information has been missing . . . until now.as Posting; Microsoft Content //3. Check if Management Posting wasServer found2002: A Complete Guide is the first book that explains how to effectively unlock != the null) power of CMS. Administrators and developers alike will learn how if(cmsPostingFound to { enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on current the Microsoft platform. //4. Check if the Posting is equal to Posting found if(cmsContext.Posting.Equals(cmsPostingFound)) This thorough reference explains the product architecture, then shows you how to create and { edit content use the includes CMS administration and security, //5. and Assign theworkflow. display Topic name coverage of the Posting the Publishing API, deployment options, site configuration, Label1.Text = "Posting Found by URL:and " +template development. A running example is used throughout the book to illustrate how important CMS features are cmsPostingFound.Path.ToString(); implemented in real-world Web site development. Inside you'll find answers to such questions } as:} } Chapter 6: How do you customize workflow?
Replacing line 2 with either of the following code snippets should also yield the same result: Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? //Hierarchical URL Chapter 17: How do you establish user rights? Posting cmsPostingFound = cmsContext.Searches.GetByUrl("/Scratch/pad.htm") Chapter 22: How do you best deploy CMS according to your organization's needs, size, as Posting; and resources? or:
Chapter 32: How do you publish dynamic data?
[ Team LiB ] //GUID-based URL (use the actual URL for your Scratchpad posting) Posting cmsPostingFound = cmsContext.Searches.GetByUrl( "/NR/exeres/D8D8026A-8F0B-4804-BBC6-69387182BEA3") as Posting;
Build the solution and then refresh the Scratchpad posting in Internet Explorer, or browse to it and click the Button. The page should reload and look the same as Figure 28-1. Again, we just arrived at the same Posting object that was returned using a different Searches method. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Searching for a Collection of Assets As previously mentioned, searching for a collection of assets can be further categorized by the type of asset retrieved: Channel objects, Posting objects, Template objects, or Gallery objects. These Searches methods are different from our previous searches in several ways. These methods return a collection of assets rather than just a single asset. If no assets are found, the method returns an empty collection rather than a null reference. There isn't a Boolean operator, so multiple, separate searches must be performed, and the results can be combined using the Union method. In certain publishing modes, assets with IsHiddenModePublished equal to true will automatically be removed from the collection. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Returning a Collection of Channels
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The following sections cover how the GetChannelsByCustomProperty, NewChannels, and Publisher: Addison Wesley ImportantChannels methods can be used to return a collection of Channel objects. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
GetChannelsByCustomProperty Pages: 1136
This method can be called with just the name of the CustomProperty to find or the name and the value (up to 300 characters) of the CustomProperty to find. But we don't currently have a "This is one of those rare books channel that youto will read to learn aboutCustomProperties the product and keep CustomProperty on our Scratch search for. Creating and entering rereading tois find those tidbits that you before." their values done very differently for missed channels than it is for postings. What follows are brief —Gary Bushey, SharePoint Server MVP of custom properties to search for. If you have a instructions to help you create a couple channel that already has custom properties, feel free to use it in the code sample instead. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. NOTE: We illustrate creating and manipulating custom properties for a channel in Chapter 25. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manage content on the Microsoft platform. First,tocreate CustomProperties for the Scratch channel by following these steps: This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, 1.Publishing Log in to API, Site Manager as the CMS site Administrator. the deployment options, configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are 2. Right-click the ScratchWeb channel in the channels hierarchy from the implemented in real-world site development. Inside you'll and find choose answersProperties to such questions as: drop-down menu, resulting in the Scratch Properties dialog.
3. Click the Custom tab. Chapter 6: How do you customize workflow? 4. Click the New button. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 5. using Enter Visual customPropertyOne Studio .NET? into the Name text box. 6. Chapter Enter the17: word "One" intoestablish the Current Value text box. How do you userText rights? 7. Chapter Click the22: OK How button. do you best deploy CMS according to your organization's needs, size, and resources? 8. Click the New button again. Chapter 32: How do you publish dynamic data? 9. Enter customPropertyTwo into the Name text box. 10. 11.
8. 9. [10. Team LiB ]the Current Text Value text box empty. Leave
11. Click the OK button. 12. Click the OK button to dismiss the Scratch Properties dialog. 13. Close Site Manager. Next, enter values for each CustomProperty on the Scratch channel by following these steps:
1. Refresh the Scratchpad posting in Internet Explorer or browse to it. 2. Click the Switch to Edit Site link on the Scratchpad posting in the CMS default console. •
Table of Contents
3. Click the Channel Properties link in the CMS default console, resulting in the Page Properties dialog.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
4. Click the Custom tab. 5.Publisher: Leave Addison the customPropertyOne CustomProperty value defaulting to the value "One". It is Wesley defaulting to the literal string "One" because we set the value while we were in Site Pub Date: October 31, 2003 Manager. ISBN: 0-321-19444-6 Pages: 1136
6. Enter the literal "Two" into the text box under the Current Value column for the customPropertyTwo CustomProperty. 7. Click the Save Changes button. "This is one of those rare books that you will read to learn about the product and keep 8. Click to the Switch Live Site the CMS default console. rereading find thosetotidbits thatlink youinmissed before." —Gary Bushey, SharePoint Server MVP Now we can search for channels with a CustomProperty with a given Name. Content Management Server (CMS) is fast becoming a vital content-management tool that Replace the Button1_Click function ofhandle our Scratchpad template file with the following helps administrators and developers the ever-increasing amount of content oncode: their Web sites. However, an authoritative source of product information has been missing . . . until now. private void Button1_Click(object sender, System.EventArgs e) { Microsoft Content Management Server 2002: A Complete Guide is the first book that explains //1. Check to unlock be sure value how to effectively the apower of was CMS.entered. Administrators and developers alike will learn how Note that is scalability, no checking for value validity by using CMS features and to // enhance their Webthere servers' flexibility, and extensibility APIifto(TextBox1.Text.Length>0) manage content on the Microsoft platform. { //2. Grab the current CMS This thorough reference explains theContext product architecture, then shows you how to create and CmsHttpContext cmsContext = CmsHttpContext.Current; edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A //3. Find all thethroughout channels the that have a CustomProperty running example is used book to illustrate how important CMS features are // with a property name to theInside string provided implemented in real-world Web site equal development. you'll find answers to such questions as: ChannelCollection cmsChannelsFound = cmsContext.Searches.GetChannelsByCustomProperty( TextBox1.Text.ToString()) Chapter 6: How do you customize workflow? as ChannelCollection; Chapter 10: the How ListBox do you develop Microsoft entries Content Management Server (CMS) 2002 //4. Empty of allforprevious using Visual Studio .NET? ListBox1.Items.Clear(); Chapter 17:the Howname do you user rights? //5. List of establish every channel returned by the search foreach(Channel cmsChannel in cmsChannelsFound) Chapter 22: How do you best deploy CMS according to your organization's needs, size, { and resources? ListBox1.Items.Add(cmsChannel.Name.ToString()); }Chapter 32: How do you publish dynamic data?
//6. [ Team LiBIf ] the collection is empty, show No Channels Found if (cmsChannelsFound.Count==0) { ListBox1.Items.Add("No Channels Found"); } } else { //7. Provide nonerror feedback to the developer Label1.Text = "TextBox must contain a value"; } }
Build the solution and then refresh the Scratchpad posting in Internet Explorer; or browse to it, • Table Contents enter the name ofofone of the custom properties that we created (like customPropertyOne) into Microsoft Management Server 2002: Complete Guide the text Content box, and click the Button. The Apage should reload
and look similar to Figure 28-2.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Figure 28-2. Find collection of channels Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
If we type a custom property name that doesn't exist, the Scratchpad posting should reload, This thorough reference explains the product then shows you how to create and adding the literal "No Channels Found" to the architecture, ListBox. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, configuration, development. A If we change the third line of code to thesite following, we can and also template search for the value of a running example is used throughout the book to illustrate how important CMS features are CustomProperty: implemented in real-world Web site development. Inside you'll find answers to such questions as: //3. Find all the channels that have a CustomProperty // with a CustomProperty name equal to customPropertyOne and How do workflow? in the TextBox // Chapter a value6:equal toyou thecustomize string provided ChannelCollection cmsChannelsFound = Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 cmsContext.Searches.GetChannelsByCustomProperty( using Visual Studio .NET? "customPropertyOne", TextBox1.Text.ToString()) Chapter 17: How do you establish user rights? as ChannelCollection; Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Build the solution and then refresh the Scratchpad posting in Internet Explorer; or browse to it, enter Chapter the value of How the first custom property thatdata? we created (we gave it a value of "One") into 32: do you publish dynamic the text box, and click the Button. The page should reload and look similar to Figure 28-2.
[ Team LiB ]
NewChannels This Searches method retrieves a collection of CMS channels based upon when they were last modified. If the Channel object's ChangeDate property is within the last seven days (or a userspecified number of days), it will be retrieved. Since we just added two CustomProperties (in the GetChannelsByCustomProperty section) to the Scratch channel, the change date should be within the time period to be classified as a "New" channel. Replace the Button1_Click function of our Scratchpad template file with the following code:
private void Button1_Click(object sender, System.EventArgs e) { theofcurrent • //1. GrabTable Contents CMS Context CmsHttpContext cmsContext = CmsHttpContext.Current; Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
//2. Find all Channels with their ChangeDate 0) and resources? { //2. Grab the current CMS Context Chapter 32: How do you publish dynamic data? CmsHttpContext cmsContext = CmsHttpContext.Current;
[ Team LiBFind ] //3. all Postings that have a CustomProperty // with a property name equal to the string provided PostingCollection cmsPostingsFound = cmsContext.Searches.GetPostingsByCustomProperty( TextBox1.Text.ToString()) as PostingCollection;
//4. Empty the ListBox of all previous entries ListBox1.Items.Clear();
•
//5. List the name of every Posting returned by the search foreach(Posting cmsPosting in cmsPostingsFound) { ListBox1.Items.Add(cmsPosting.Name.ToString()); } Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
//6. If the collection is empty, show No Postings Found
ByBill if English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood (cmsPostingsFound.Count==0)
{ ListBox1.Items.Add("No Postings Found"); Publisher: Addison Wesley }
}Pub Date: October 31, 2003 elseISBN: 0-321-19444-6 { Pages: 1136 //7. Provide nonerror feedback to the developer Label1.Text = "TextBox must contain a value"; } } "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Build the solution and then refresh the Scratchpad posting in Internet Explorer; or browse to it, enter theManagement default nameServer of one(CMS) of theiscustom properties that content-management we created (like Content fast becoming a vital tool that NewTextProperty1) into the text box, and click the Button. The should reload and look helps administrators and developers handle the ever-increasing page amount of content on their similar to Figure 28-3. Web sites. However, an authoritative source of product information has been missing . . . until now.
Figure 28-3. Find collection of postings Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
If we change the third line of code to the following, we can also search for the value of a Chapter 32: How do you publish dynamic data? custom property:
[ Team LiB ] //3. Find all the postings that have a CustomProperty // with a property name equal to NewTextProperty1 and a // CustomProperty value equal to the string provided PostingCollection cmsPostingsFound = cmsContext.Searches.GetPostingsByCustomProperty( "NewTextProperty1", TextBox1.Text.ToString()) as PostingCollection;
Build the solution and then refresh the Scratchpad posting in Internet Explorer; or browse to it, enter the value of the first custom property that we created (we gave it a value of "First") into the text box, and click the Button. Again, the page should reload and look similar to Figure 283. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
NewPostings
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
This Searches method retrieves a collection of CMS postings based upon when they were last Publisher: Addison Wesley modified. If the Posting object's ChangeDate property is within the last seven days (or a userPub Date: October 31, 2003 specified number of days), it will be retrieved. Since we just added two CustomProperties (in ISBN: 0-321-19444-6 GetPostingsByCustomProperty section) to the Scratchpad posting, the change date should be 1136period to be classified as a "New" posting. within Pages: the time Replace the Button1_Click function of our Scratchpad template file with the following code: "This is one of those rare books that you will read to learn about the product and keep private void Button1_Click(object sender, System.EventArgs e) rereading to find those tidbits that you missed before." { —Gary Bushey, SharePoint Server MVP //1. Grab the current CMS Context CmsHttpContext cmsContext = CmsHttpContext.Current; Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their //2. Find all Postings with their as:
Chapter 6: How do you customize workflow? Once you've done everything we've discussed so far, you should have a fully functional placeholder label. In addition, you could usedo this label control basic labeling by adding some additional code. In Listing 2 Chapter 10: How you develop forbeyond Microsoft Content Management Server (CMS) 2002 1 you'll see Visual the code for the BOTS Consulting placeholder label user control. using Studio .NET? Chapter 17:Complete How do you establish user rights? Listing 29-1 code for the BOTS Consulting PlaceholderLabel user control Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
namespace botsconsulting.usercontrols Chapter 32: How do you publish dynamic data? {
[ Team using LiB ] using using using using using using
System; System.Data; System.Drawing; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.HtmlControls; Microsoft.ContentManagement.WebControls;
/// <summary> /// The placeholderlabel user control is used to place a /// descriptive label above a placeholder. /// public abstract class CMSPlaceholderLabel : System.Web.UI.UserControl { •
Table of Contents
Microsoft Contentprivate Management Server 2002: A Complete Guide = bool displayinauthormode
true;
private bool Shell displayineditmode = Cawood false; ByBill English, Olga Londer, Shawn , Todd Bleeker, Stephen protected System.Web.UI.WebControls.Literal OutputText; public bool Publisher: Addison Wesley
DisplayinAuthorMode
{ 31, 2003 Pub Date: October get ISBN: 0-321-19444-6 { Pages: 1136
return displayinauthormode; } set { "This is one of those rare books that you will read to = learn about the product and keep displayinauthormode value; rereading to find those } tidbits that you missed before." —Gary Bushey, } SharePoint Server MVP Content Management (CMS) is fast becoming a vital content-management tool that public Server bool DisplayinEditMode helps administrators and developers handle the ever-increasing amount of content on their { Web sites. However, an authoritative source of product information has been missing . . . until get now. {
return displayineditmode; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains } how to effectively unlock the power of CMS. Administrators and developers alike will learn how set to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and { API to manage content on the Microsoft platform. displayinauthormode = value; } This thorough reference explains the product architecture, then shows you how to create and } use the workflow. Topic coverage includes CMS administration and security, edit content and the Publishing API, deployment options, site configuration, and template development. A private textthe = book ""; to illustrate how important CMS features are running example is usedstring throughout implemented in real-world Web site development. Inside you'll find answers to such questions public string Text as: { get Chapter 6: How { do you customize workflow? return text; Chapter 10: How} do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? set Chapter 17: How{ do you establish user rights? text = value; Chapter 22: How} do you best deploy CMS according to your organization's needs, size, and resources? } Chapter 32: How do you Page_Load(object publish dynamic data? private void sender, System.EventArgs e)
[ Team LiB ]
{ // Set default values for the control if no values are given displayinauthormode = true; displayineditmode = false; // Set the literal control TEXT property based on the TEXT property OutputText.Text = this.text;
// Set a variable equal to the current Web Author Context WebAuthorContext myContext = WebAuthorContext.Current; // Check to see what mode we're in and set the visibility accordingly if((myContext.Mode == WebAuthorContextMode.AuthoringNew || myContext.Mode == WebAuthorContextMode.AuthoringReedit) && displayinauthormode) {this.OutputText.Visible=true;} • Table of Contents else if ((myContext.Mode == WebAuthorContextMode.PresentationUnpublishe Microsoft Content Management Server 2002: A Complete Guide && displayineditmode) ByBill English, Olga Londer{this.OutputText.Visible=true;} , Shawn Shell, Todd Bleeker, Stephen Cawood else {this.OutputText.Visible=false;} } Publisher: Addison Wesley Pub Date: October 31, 2003
#region Web Form Designer generated code override protected void OnInit(EventArgs e) Pages: 1136 { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // "This is one of those rare books that you will read to learn about the product and keep InitializeComponent(); rereading to find those tidbits that you missed before." base.OnInit(e); —Gary Bushey, } SharePoint Server MVP ISBN: 0-321-19444-6
Content Management Server (CMS) is fast becoming a vital content-management /// Required method for Designer support - do tool not that modify helps administrators and developers handle the ever-increasing amount of content on their /// the contents of this method with the code editor. Web sites. However, an authoritative source of product information has been missing . . . until /// now. private void InitializeComponent()
{ Microsoft Content Management Server 2002: A Complete Guide is the first book that explains this.Load += new System.EventHandler(this.Page_Load); how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and } API to manage content on the Microsoft platform. #endregion } This thorough reference explains the product architecture, then shows you how to create and } edit content and use the workflow. Topic coverage includes CMS administration and security,
the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are In Listing 29-1 you'll notice that BOTS added a few elements to the basic placeholder label control we've implemented in real-world Web site development. Inside you'll find answers to such questions talked about. Specifically, they added the ability to control in which mode the label is displayed. In other as: words, it may be useful for the control to display in Edit mode, even if the placeholders aren't visible. To handle this situation, BOTS added two new properties: DisplayinAuthorMode and DisplayinEdit Mode. The main Chapter difference the do addition of the extra condition to determine if the Web Author is in 6:isHow you customize workflow? PresentationUnpublished, which corresponds to the mode the Web Author is in when the edit console is visible, but the10: content contributor can't Further, they integrated the two (CMS) properties Chapter How do you develop forauthor. Microsoft Content Management Server 2002that allow the developer set the modes in which the label should show itself. To help clarify the various states of the We usingto Visual Studio .NET? Author context, BOTS chose to distinguish the various modes of the Web Author as follows: Chapter 17: How do you establish user rights?
Live: The site renders allbest approved as if a subscriber were viewing needs, the content. Chapter 22: How do you deploycontent CMS according to your organization's size, and resources? Edit: The site displays the edit console, but the pages look largely as they do when the site is in Live mode. No content contribution possible.data? Chapter 32: How do you publishis dynamic
Authoring: The placeholders are visible, and an author can contribute content. [ Team LiB ]
It's likely that you won't see these modes talked about in the Microsoft documentation, but we've found tha this is a good way to classify the various states so that it's clear not only to the developers, but to the content contributors as well. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Composite Controls
With CMS there are two opportunities to create custom composite controls. One opportunity is to create a custom server control. That is a control, very much akin to a user control, that uses existing server controls creates a CMS-aware composite control. The other opportunity is to create a custom placeholder control. B types of composite controls offer significant opportunities to extend the functionality of CMS. In the followin sections, we'll examine both types of composite controls.
Creating Custom Server Controls
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Very similarly to creating user controls, creating custom CMS-aware server controls is simply a matter of control example, we made the control "awar the Web Author context by examining the mode of the WebAuthor Context. Once we knew the mode, we conditionally set the visibility of the literal control. By creating this kind of CMS awareness, we removed the Publisher: Addison Wesley to add any code to the template, but provided a way to allow a label to appear over the placeholder only w Date: October 31, in 2003 the Pub Web Author was an authoring state.
By Bill English , Olga Londercontrol , Shawn Shell Bleeker Stephen creating a composite that ,Todd is aware of ,CMS. In Cawood our user
ISBN: 0-321-19444-6
Now, we could Pages: 1136do something very similar with a server control. The server control would operate in the sam way that our user control did, but we would be able to add a design-time interface to the control, and you w be able to add to the global assembly cache (GAC). The advantage would be that not only would the design interface allow either a developer or visual designer potentially to have more control over the server contro during design, but since the control is in the GAC, there's no need to add it to each project separately. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Ultimately the decision is up to you. There's a good article on Microsoft's MSDN site that discusses how to d —Gary Bushey, SharePoint Server MVP between a server or user control, listing the advantages and disadvantages of each; see http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcompositecontrolvsusercontrol.asp. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their For examples of custom server controls, install the WoodgroveNet Bank sample site that ships with CMS. Th Web sites. However, an authoritative source of product information has been missing . . . until are several custom server controls provided with the sample site. To download the sample site, you can foll now. the link to the download section for CMS at http://microsoft.com/downloads/results.aspx?productID=9A0D 0B68-4075-8D93-5540FB21E5DC&freetext=&DisplayLang=en. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Creating Custom CMS Placeholders
This reference explains thewith product architecture, shows you how to create and Up tothorough this point, we've been dealing a fixed set of CMSthen placeholders that your content contributors use edit content and use the workflow. Topic coverage includes CMS administration and security, add content. However, CMS provides a base placeholder class that can be inherited, which allows you to cre the API, deployment options, site configuration, and template development. yourPublishing own placeholders. This very powerful feature of CMS provides an almost unlimitedAset of possibilities w running example is used throughout the book to illustrate how important CMS features are it comes to extending CMS, especially as it relates to content contribution. implemented in real-world Web site development. Inside you'll find answers to such questions as:
NOTE: The term "placeholder" is used often in this book, particularly in this chapter. For clarity, we ar Chapter 6: How do you customize workflow? referring to the placeholder control in this section. The control is the element that you can drag from the Toolbox VS.NET to the design Also, please be aware that there is a standard .NET Web Chapter 10:inHow do you develop forsurface. Microsoft Content Management Server (CMS) 2002 control called a PlaceHolder (with a capital H). The two controls are not related in any way. using Visual Studio .NET? Chapter 17: How do you establish user rights?
Essentially, the base placeholder class provides the core services regard to content. In the broadest se Chapter 22: How do you best deploy CMS according to your with organization's needs, size, content is anything that you want to store in the repository. Content could be text or images, as we've dea and resources? previously in this book. Content could also be settings or other, noneditorial data that your application may to store. The base placeholder class allows you data? to inherit this basic storage and retrieval functionality while Chapter 32: How do you publish dynamic adding your own application-specific functionality. In addition, it relieves you (the developer) from having t
between Live, Edit, and authoring modes; you simply implement the appropriate override [handle Team the LiB switch ] and CMS takes care of the rest.
Now, you may be asking yourself why you might create a custom placeholder at all. One driving reason is t allow you to store data in the repository. Further, it provides content contributors with direct access to that content while they're authoring. You wouldn't need a custom placeholder, for example, to allow an administ to change a property of a channel, since administrators can use Site Manager. This distinction is key when planning your CMS site.
To begin, let's examine the BasePlaceholderControl class. In Figure 29-3, we've looked up the class in the O Browser.
Figure 29-3. The BasePlaceholderControl class in the Object Browser •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlockisthe of CMS. and developers alikeall will learn how standard to BasePlaceholderControl an power inheritable classAdministrators for building placeholders. In fact, placeholders to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and are based on this class. Within the class there are five primary methods that must be implemented when yo API to manage content on the Microsoft platform. creating your custom placeholder.
This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverageisincludes administration and will security, CreateAuthoringChildControls: This method used to CMS create the controls that represent the autho the Publishing API,custom deployment options,This sitemethod configuration, and template development. A replace view of your placeholder. and CreatePresentationChildControls running example is used throughout the book illustrateThe how important CMS features are(taken care of by CreateChildControls, typical of other .NETtocontrols. CreateChildControls method implemented in real-world Web site development. Inside you'll find answers to such questions BasePlaceholderControl class) calls this method and CreatePresentationChildControls at the appropria as: time, based on the mode of the Web Author.
CreatePresentationChildControls: This method, like the Create AuthoringChildControls method, is Chapter 6: How do you workflow? responsible for one half customize of the traditional CreateChildControls method you've probably worked with in past. CreatePresentationChildControls is called when the Web Author is in some sort of presentation Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 mode—those modes other than AuthoringNew and AuthoringReedit. using Visual Studio .NET?
LoadPlaceholderContentForAuthoring: LoadPlaceholderContent ForAuthoring is called when the placeh Chapter 17: How do you establish user rights? renders in authoring mode. This method makes the content stored in the repository available to your authoring22: controls. Chapter How do you best deploy CMS according to your organization's needs, size,
and resources? LoadPlaceholderContentForPresentation: Like the LoadPlaceholderContentForAuthoring method, LoadPlaceholderContent Chapter 32: How do you ForPresentation publish dynamicallows data? you to retrieve content from the repository. Unlike the authoring method, this method is used to retrieve the content for presentation—content displayed in m
other AuthoringNew and AuthoringReedit. [ Team LiB than ]
SavePlaceholderContent: This method is responsible for saving content to the repository. In SavePlaceholderContent you can connect the bound placeholder definition to the controls in your custo placeholder.
NOTE: Make sure that you call EnsureChildControls before you try to set the values of either the authoring or presentation controls. This will ensure that the authoring and presentation controls exist before you try to assign a value to them. If you don't, an exception will be raised. Also, the BasePlaceholderControl class does not call either LoadPlaceholderContentForPresentation or LoadPlaceholderContentForAuthoring on a postback.
•
Table of Contents
Now thatContent you have a good understanding of the five mandatory Microsoft Management Server 2002: A Complete Guide
methods to implement, let's look at how yo might implement each in an example within the BOTS Consulting site.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In the BOTS site, the developers wanted to provide a way for the content contributors to indicate the indus that a specific case study addressed. Although it's possible to accomplish this with a standard placeholder, t Publisher: Addison Wesley regular HTML placeholder allowed a little too much contribution flexibility (translation: It allowed the conten Pub Date: October 31, 2003 contributors to enter any value). So, in an effort to provide a little more guided contribution, the BOTS ISBN:developers 0-321-19444-6 Consulting created a drop-down list box placeholder. This placeholder allowed content contributo 1136 choosePages: the target industry for a case study from a set list of choices defined by the developers.
In order to create this control in your project, we'll first need to create a control library project within our c solution. This new project will hold all our new composite controls for the BOTS Consulting site. In our solut we'veischosen call the project botsconsultingwebcontrols. your own Web control library, us "This one ofto those rarenew books that you will read to learn about To thecreate product and keep following instructions: rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Content Management Server (CMS) is fast becoming a vital content-management tool that 1. Make sure you have an open solution. In our case, we have our BOTS Consulting solution open. helps administrators and developers handle the ever-increasing amount of content on their Web However, authoritative of product information 2. sites. Right-click your an solution and picksource Add from the context menu. has been missing . . . until now. 3. Now, choose Add New Project from the second context menu that appears. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how effectively unlock power pick of CMS. Administrators and developers alike (if willyou're learn using how VB.NET, yo 4. to From the dialog thatthe appears, Visual C# Projects from the left column to enhance Web servers' scalability, shouldtheir choose Visual Basic Projects).flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. 5. Then, pick Web Control Library from the right column. Do not choose the Windows Control Library; th This thorough reference explains theform product architecture, then shows you how to create and type of project is for Windows projects. edit content and use the workflow. Topic coverage includes CMS administration and security, the API,chosen deployment options, site configuration, andenter template development. 6.Publishing Once you've the correct project type, you should the name you wishAto give your new pr running example is used throughout the book to illustrate how important CMS features are 29-4 you'll see a In our case, we've called our new control library botsconsultingwebcontrols. In Figure implemented in real-world Web site development. Inside you'll find answers to such questions screen shot of what you should be seeing at this point. as:
Figure 29-4. Creating a new Web control library in VS.NET Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
7. Click to create the new project. ISBN:OK 0-321-19444-6 Pages: 1136
Now that we have our new project, you'll need to add references to the appropriate CMS assemblies. To ad references, right-click the References folder in your new project and choose Add Reference from the contex menu. When the Add Reference dialog appears, click the Browse button and browse to the CMS assembly directory : \Program Files\Microsoft Content Management Server\Server\bin. At minimum, y "This is one those rare that youassemblies: will read to learn about the product and keep need to add of references tobooks the following rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Microsoft.ContentManagement.Common.dll Content Management Server (CMS) is fast becoming a vital content-management tool that helps Microsoft.ContentManagement.Publishing.dll administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft.ContentManagement.Publishing.Extensions. Placeholders.dll
Microsoft.ContentManagement.Web.dll Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Microsoft.ContentManagement.WebControls.dll to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. After you've added the appropriate assembly references, we need to add the new control. Right-click the ne project and pick Add from the context menu. architecture, Choose Add New thehow left column of and the Add New Item This thorough reference explains the product thenItem. showsInyou to create dialog, choose Local Project Items, and in the right column, choose Web Custom Control. Once edit content and use the workflow. Topic coverage includes CMS administration and security, you've done enter the nameAPI, of the new control in thesite name property. Our will development. be aptly named the Publishing deployment options, configuration, andcontrol template A DropDownPlaceholderControl. Now, simply click What should appear next is the basic running example is used throughout the book toOpen. illustrate how important CMS features are code that VS.N supplies. implemented in real-world Web site development. Inside you'll find answers to such questions as: We now have to set up this new control to be a custom placeholder control. The first thing is to add the foll namespaces to our control: Chapter 6: How do you customize workflow?
Microsoft.ContentManagement.WebControls Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Microsoft.ContentManagement.Publishingnamespace Chapter 17: How do you establish user rights? Next, change the "class" statement to inherit from the BasePlaceholderControl class instead of the more ge WebControl In Listing 29-2, can CMS see the C# code added to our control to this point. Chapterclass. 22: How do you bestyou deploy according towe've your organization's needs, up size, and resources?
Listing 29-2 The initial code for our DropDownPlaceholderControl Chapter 32: How do you publish dynamic data?
[View full width]
[ Team LiB ]
using using using using using using
System; System.Web.UI; System.Web.UI.WebControls; System.ComponentModel; Microsoft.ContentManagement.Publishing.Extensions.Placeholders; Microsoft.ContentManagement.WebControls;
namespace botsconsultingwebcontrols { /// <summary> /// Summary description for DropDownPlaceholderControl. /// [DefaultProperty("Text"), ToolboxData("")] Microsoft Content Management Server 2002: A Complete Guide public class DropDownPlaceholderControl : Microsoft.ContentManagement.WebControls ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood .BasePlaceholderControl Publisher: Addison Wesley
Once we have this basic structure in place, we'll need to add code to and remove code from our control to Pub Date: October 31, 2003 finalize our custom placeholder control. The first step is to remove the standard Text property VS.NET place ISBN: 0-321-19444-6 new controls. This property may be appropriate in some cases. However, in our control, we don't need the Pages: property, so1136 we're going to remove it. Next, we need to add our mandatory functions. These were the func we listed earlier in the chapter. In Listing 29-3, you can see the functions we've placed in our control.
Listing 29-3 The mandatory functions that need to be included in custom
"This is one of those rare books that you will read to learn about the product and keep placeholders rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [View full width]
Content Management Server (CMS) is fast becoming a vital content-management tool that protected override void CreateAuthoringChildControls(BaseModeContainer authoringContainer helps administrators and developers handle the ever-increasing amount of content on their { Web sites. However, an authoritative source of product information has been missing . . . until } now.
protected override void CreatePresentationChildControls(BaseModeContainer Microsoft Content Management Server 2002: A Complete Guide is the first book that explains presentationContainer) how to effectively unlock the power of CMS. Administrators and developers alike will learn how { enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and to } to manage content on the Microsoft platform. API
protected override void LoadPlaceholderContentForAuthoring(PlaceholderControlEventArgs e) This thorough reference explains the product architecture, then shows you how to create and { edit content and use the workflow. Topic coverage includes CMS administration and security, } Publishing API, deployment options, site configuration, and template development. A the running example is used throughout the book to illustrate how important CMS features are protected override voidWeb LoadPlaceholderContentForPresentation(PlaceholderControlEventArgs implemented in real-world site development. Inside you'll find answers to such questions { as: } Chapter 6: How do you SavePlaceholderContent(PlaceholderControlSaveEventArgs customize workflow? protected override void e) { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 } using Visual Studio .NET?
17: Howthe do Text you establish rights?the functions in Listing 29-3, you should be able to After Chapter you've removed property user and added successfully build your solution without errors. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and the resources? To begin actual coding of our custom placeholder control, let's start by creating the authoring environm As we mentioned, we want our authors to be able to pick the appropriate industry focus for a given case st 32: How do you dynamic data? items in it by default: Pharmaceutical, Construction, from Chapter a drop-down list. This listpublish will have the following
and Technology. First, we define a new private member variable in our class to hold a refere [Manufacturing, Team LiB ] to our drop-down list (we'll need this later). In our example, we're going to call that new variable IndustryL Once we've created our member variable, we'll need to add code to our Create AuthoringChildControls func to physically create the drop-down list control and add the list items. To see what this looks like, refer to Lis 29-4.
Listing 29-4 The new member variable and an implemented CreateAuthoringChildControls function protected System.Web.UI.WebControls.DropDownList IndustryList;
protected override void CreateAuthoringChildControls(BaseModeContainer authoringContainer { this.IndustryList = new DropDownList(); • Table of Contents this.IndustryList.Items.Add(new Microsoft Content Management Server 2002: ListItem("Construction","Construction")); A Complete Guide this.IndustryList.Items.Add(new ListItem("Manufacturing","Manufacturing")) ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood this.IndustryList.Items.Add(new ListItem("Pharmaceutical","Pharmaceutical" this.IndustryList.Items.Add(new ListItem("Technology","Technology")); this.IndustryList.EnableViewState = false; Publisher: Addison Wesley authoringContainer.Controls.Add(IndustryList); } Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
In Listing 29-4 we're creating the authoring view of the placeholder. The first few lines of the function simply create the drop-down list. In this example, BOTS only had four industry options, so there are only four "ma add statements. We're turning off the view state for the drop-down list control, because when switching be Edit and authoring modes, controls become "confused" and throw and an exception. In the last "This is one of those rare books thatsometimes you will read to learn about the product keep statement,towe're addingtidbits our drop-down list control to the authoring environment container. Without this rereading find those that you missed before." statement, your SharePoint control(s) won't render —Gary Bushey, Server MVP (as we found out the first time we created a custom placeholder). Now thatManagement we have thisServer much of the control, we shouldabe able to test the basic control by adding it to a Content (CMS) is fast becoming vital content-management tool that template. To add this new placeholder control to your template, you first should add it to your Toolbox in helps administrators and developers handle the ever-increasing amount of content on their VS.NET. Adding this new placeholder to your of Toolbox is information pretty easy;has justbeen use the following instructions: Web sites. However, an authoritative source product missing . . . until now.
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains 1. Open a template and make sure you're in Design view. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 2. Once the template appears, click the Content Management Server tab in the VS.NET Toolbox. You sho API to manage content on the Microsoft platform. see the existing placeholder objects that are standard to CMS. This thorough reference explains the product architecture, then shows you how to create and 3. Right-click the Toolbox and pick Customize Toolbox from the context menu. edit content and use the workflow. Topic coverage includes CMS administration and security, the deployment options, configuration, template development. A tab. 4.Publishing When theAPI, Customize Toolbox dialogsite appears, click theand .NET Framework Components running example is used throughout the book to illustrate how important CMS features are implemented real-world Web Inside find answers such will questions 5. Click theinBrowse button in site the development. lower right corner of you'll the dialog box; the to button be above the as: OK/Cancel/Reset/Help buttons.
6. You'll have to navigate through your file system to find your Web control library project. Once you've Chapter 6: How do you customize located the project, select the "bin"workflow? directory and then the assembly that corresponds to your new con library. Depending on how you've set up your VS.NET environment, you may have "debug" and "relea Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 folders within your "bin" folder. using Visual Studio .NET? 7. Click the assembly and click OK. Chapter 17: How do you establish user rights?
8. Now, just select the specific controls you want to appear in the Toolbox. At this point, it's likely you on Chapter 22: How do you best deploy CMS according to your organization's needs, size, have one control, but you may have been very productive and gotten a few more done while you've b and resources? reading this. In Figure 29-5 you can see what our dialog looks like after we have selected our assemb checked our DropDownListPlaceholder class. Chapter 32: How do you publish dynamic data?
Figure [ Team LiB ]
•
29-5. The Customize Toolbox dialog with our new placeholder cla selected
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
9. Once you've selected your new placeholder, click OK. "This is one of those rare thatinyou read toInlearn about the product and keep Your new placeholder will books be shown thewill Toolbox. Figure 29-6, you can see our new placeholder in the rereading Toolbox. to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Figure 29-6.Server The new in our Content Management (CMS)DropDownPlaceholderControl is fast becoming a vital content-management toolVS.NET that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
Toolbox
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Now that you have the new placeholder in your Toolbox, just drag it onto your template. In the BOTS Cons example, we've positioned the new just above then the body copy. thistoway, weand can allow the con This thorough reference explains theplaceholder product architecture, shows youIn how create contributor to choose the industry focus before they begin to write the copy. Further, when edit content and use the workflow. Topic coverage includes CMS administration and security,the page is fully rendered, the industry focus willoptions, be the first displayed the page (after the title), so the reader the Publishing API, deployment site element configuration, and on template development. A instantlyexample knows toiswhat this the case study running usedindustry throughout book to applies. illustrate how important CMS features are
implemented in real-world Web site development. Inside you'll find answers to such questions Before we can truly "test drive" our new control, we need to add a placeholder definition to our TGI. Since t as: a new placeholder type, there won't be a corresponding placeholder definition. However, we can use one of existing placeholder definitions for our placeholder. In this example, we're going to use an XML placeholder definition, since placeholder type makes it fairly easy to store data versus editorial text (which is Chapter 6: the HowXML do you customize workflow? probably better with an HTML placeholder). Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 As weusing learned in our earlier chapters, you'll want to open the Template Explorer window and find the TGI Visual Studio .NET? associated with your template. In our case, we're using the Case Study Detail TGI. You'll need to check out template and click the ellipsis call up the Definition Collection Editor. Go ahead and create a n Chapter 17: How do you to establish userPlaceholder rights? XML placeholder definition for the new placeholder you just added to your template. In our case, we've calle Chapter 22: How do you best deploy CMS according to your needs, this new placeholder definition CaseStudyIndustry. In Figure 29-7 organization's you can see the new size, definition we've add and resources?
Figure 29-7. The Placeholder Definition Collection Editor with the new XML Chapter 32: How do you publish dynamic data? placeholder definition
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to added find those that you missed before." After you've yourtidbits definition, you'll need to bind the new definition to your placeholder. Go back to yo —Gary Bushey, SharePoint Server MVP template and click the placeholder control you added earlier. In the properties list, select the new placehold definition in the PlaceholderToBind property. Notice that this placeholder doesn't discriminate among the va Content Management (CMS) iscollection fast becoming vital All content-management tool in that definitions that exist inServer the definition for thisa TGI. the definitions that are the TGI are listed i helps administrators developers handle amount of content onjust their drop-down list. We'll and address this issue later,the butever-increasing be careful to pick the definition you created; the Web sites. However, authoritative information haswhether been missing . . untilXML definitio placeholder will allow an you to bind it tosource any of of theproduct definitions in the TGI, or not. they're now. With the new placeholder control added to the template and bound to our new placeholder definition, we're Microsoft Content Management Complete is the first book that control explainslooks like in a ready to test the new control. InServer Figure2002: 29-8, Ayou can seeGuide what our new placeholder how to Keep effectively unlock power of CMS. and developers will learn how study. in mind that the the control will onlyAdministrators render in authoring mode, andalike it doesn't "understand" how to to enhance their servers' scalability, and extensibility using CMS and so far. content as of yet.Web However, this is a good flexibility, way to making sure you'veby achieved the features right results API to manage content on the Microsoft platform.
Figure reference 29-8. Aexplains case study with the newthen drop-down listtoplaceholder This thorough the product architecture, shows you how create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
contro
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 has gone well,
If all your test drive should have been successful. We still need to wire up the rest of the fun so that our new placeholder is fully functional. Let's continue our construction by adding the code to SavePlaceholderContent. Again, this function is where we take the values that have been assigned to our ch controls, in this case a drop-down list, and assign them to the bound placeholder in our TGI. You must mak sure you callofEnsureChildControls so that an exception isn'tabout thrown runtime. In keep Listing 29-5, you can see "This is one those rare books that you will read to learn theatproduct and code we'vetoadded to our SavePlaceholderContent function (the line breaks are not intentional). rereading find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Listing 29-5 SavePlaceholderContent code in our drop-down list placeholder
Content Management Server (CMS) is fast becoming a vital content-management tool that control helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until [View full width] now.
protected override void SavePlaceholderContent(PlaceholderControlSaveEventArgs e) Microsoft Content Management Server 2002: A Complete Guide is the first book that explains { how to effectively unlock the power of CMS. Administrators and developers alike will learn how EnsureChildControls(); to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and try API to manage content on the Microsoft platform. { = to this.IndustryList This thorough ((XmlPlaceholder)this.BoundPlaceholder).XmlAsString reference explains the product architecture, then shows you how create and .SelectedItem.Text; edit content and use the workflow. Topic coverage includes CMS administration and security, } the Publishing API, deployment options, site configuration, and template development. A catch (Exception ex) running example is used throughout the book to illustrate how important CMS features are { implemented in real-world Web site development. Inside you'll find answers to such questions string saveExceptionMessage = "Error saving placeholder contents: " + this as: .GetType().Name + " :: " + this.ID + " :: " + ex.Message; Exception saveException = new Exception(saveExceptionMessage, ex); throw Chapter 6: How saveException; do you customize workflow? } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? }
Chapter 17: How do you establish user rights? As you can see in Listing 29-5, the code isn't terribly complex. We first ensure that our child controls are Chapter 22: read How the do you best deploy CMS according to yourand organization's needs, size, created; we then value from our drop-down list control set the XmlasString property of the bo and resources? placeholder (again, in this case we're using an XML placeholder definition). CMS takes care of the rest. You' notice that we're performing some light exception handling. Although we're using the standard exception Chapter How do you publish dynamic data? message, you 32: could create your own custom exception.
we need [Next, Team LiB ] to fill the LoadContentForAuthoring function. In this function, we're going to retrieve the con we saved previously. This function is the opposite of the prior function we talked about. Instead of assignin value to the bound placeholder, based on the drop-down list, we're retrieving the value from the bound placeholder and finding the corresponding value in our drop-down list. In Listing 29-6 you can see how this function is constructed.
Listing 29-6 The LoadContentForAuthoring function in our custom placeholder control [View full width]
protected override void LoadPlaceholderContentForAuthoring(PlaceholderControlEventArgs e) { EnsureChildControls(); try • Table of Contents { Microsoft Content Management Server 2002: A Complete Guide ListItem savedSelectedIndustry = this.IndustryList.Items By Bill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood .FindByValue(((XmlPlaceholder)this.BoundPlaceholder). XmlAsString); this.IndustryList.SelectedIndex = this.IndustryList.Items.IndexOf (savedSelectedIndustry); Publisher: Addison Wesley } Pub Date: October 31, 2003 ISBN: 0-321-19444-6 catch Pages: 1136
(Exception ex)
{
string saveExceptionMessage = "Error loading placeholder contents this.GetType().Name + " :: " + this.ID + " :: " + ex.Messag Exception saveException = new Exception(saveExceptionMessage, ex) throw "This is one of those rare books thatsaveException; you will read to learn about the product and keep } tidbits that you missed before." rereading to find those } SharePoint Server MVP —Gary Bushey,
Content Management Server (CMS) is fast becoming a vital content-management tool that Again,administrators as with SavePlaceholderContent, we start by ensuring that our child controlson aretheir created with the helps and developers handle the ever-increasing amount of content EnsureChildControls After we've done that, we can information retrieve the has value from the placeholder. Web sites. However, call. an authoritative source of product been missing . . . until Because w dealing with an XML placeholder and we're presenting the values in a drop-down list, setting up the control now. the author takes a couple of extra steps. Namely, once we get the value back from the repository, we need search theContent drop-down list control to find the value that matches what gotten back from the repositor Microsoft Management Server 2002: A Complete Guide is the we've first book that explains Once we find the right index, we set the SelectedIndex property of the drop-down list to match. how to effectively unlock the power of CMS. Administrators and developers alike will learn how In this way content contributor is servers' presented with the same valueand they entered earlier. to enhance their Web scalability, flexibility, extensibility by using CMS features and API to manage content on the Microsoft platform. So now what? We've created an authoring environment, and we've saved the content to the repository and retrieved it again. What'sexplains next? Well, now we architecture, have to create theshows presentation controls. Asand you're probably a This thorough reference the product then you how to create by now, CMS always "lives" in two worlds: the authoring world and the presentation world. Although we've edit content and use the workflow. Topic coverage includes CMS administration and security, created the authoring world, weoptions, haven't site addressed the presentation world. To create the the Publishing API, deployment configuration, and template development. A presentation view our placeholder, havethroughout to implement functions, which correspond to the authoring functions w running examplewe is used thetwo book to illustrate how importantclosely CMS features are already covered. The two functions CreatePresentationChildControls and to such questions implemented in real-world Web site are development. Inside you'll find answers LoadPlaceholderContentForPresentation. as:
We'll begin with CreatePresentationChildControls. This function is where you'll place the code to create the Chapter 6: How do you when customize workflow? controls you want to appear the Web Author is in modes other than AuthoringNew and AuthoringReed our custom placeholder control, we're going to use the literal control to display the value chosen. In Listing Chapter 10:we've How do you develop Microsoft Content Management Server (CMS) 2002 you can see how constructed ourfor function. using Visual Studio .NET?
Listing 29-7 The CreatePresentationChildControls function in our Chapter 17: How do you establish user rights? DropDownListPlaceholder Chapter 22: How do you best deploy CMS according to your organization's needs, size, [View full andwidth] resources?
private System.Web.UI.WebControls.Literal SelectedIndustry; Chapter 32: How do you publish dynamic data?
[protected Team LiB ]override void CreatePresentationChildControls(BaseModeContainer presentationContainer) { SelectedIndustry = new Literal(); presentationContainer.Controls.Add(SelectedIndustry); }
Kind of unexciting, huh? Since we're simply creating the presentation control environment, there isn't much do. Again, we created a private member variable for our literal control, and in the function we physically cre it. Once it existed, we added it to our presentation container. That's it.
Now that we have our presentation environment, we can fill it with content through the LoadPlaceholderContentForPresentation function (see Listing 29-8). In this function, we need to retrieve the content from the repository and assign the value to our literal control's Text property. •
Table of Contents
Listing 29-8 The code in the LoadPlaceholderContentForPresentation function
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
protected override void LoadPlaceholderContentForPresentation(PlaceholderControlEventArgs { Publisher: Addison Wesley Pub Date: October 31, 2003
EnsureChildControls(); ISBN: 0-321-19444-6 try 1136 Pages: {
this.SelectedIndustry.Text = ((XmlPlaceholder)this.BoundPlaceholder).XmlAsStr } "This is one of those rare books that you will read to learn about the product and keep catch (Exception ex) rereading to find those tidbits that you missed before." { —Gary Bushey, SharePoint Server MVP string saveExceptionMessage = "Error loading placeholder contents: " + + " :: a"vital + this.ID + " :: " + ex.Message; Content Management this.GetType().Name Server (CMS) is fast becoming content-management tool that Exception saveException = new Exception(saveExceptionMessage, ex); helps administrators and developers handle the ever-increasing amount of content on their throw saveException; Web sites. However, an authoritative source of product information has been missing . . . until now. }
} Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Notice in this function youMicrosoft simply have to retrieve the value from the repository and assign the value t API to manage contentthat on the platform. literal control. That's it. This thorough reference explains the product architecture, then shows you how to create and If you've followed along far, you Topic should have a functional drop-down list custom edit content and use theso workflow. coverage includes CMS administration and placeholder. security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Authoring-Only CustomWeb Placeholders implemented in real-world site development. Inside you'll find answers to such questions as: Up to this point, we've focused on a fairly basic placeholder control. However, there are almost limitless variations. One specific variation is creating an authoring-only placeholder. There may be some business Chapter 6: How do you customize workflow? requirements that require content contributors to contribute content when authoring but not have the conte show up in the live site. A good example of this is a placeholder that allows a content contributor to manipu Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 posting settings. In the BOTS site, there's an authoring-only placeholder that allows a contributor to change using Visual Studio .NET? start date of the posting while they're authoring.
Chapter 17: How do you establish user rights? A common challenge that some template designers have is providing a contribution environment that make "sense" to a broad audience. example, CMS according provides some basic page properties that content contribut Chapter 22: How do youFor best deploy CMS to your organization's needs, size, and developers can use. Unfortunately, depending on the skill level of the content contributor, the Page and resources? Properties dialog may be forgotten ("Oh, I didn't know that was there") or prove difficult to use ("I don't understand what this As adynamic result, some Chapter 32: all How domeans"). you publish data?of the productivity that could be gained by CMS is lost. There is a way, however, to get that back through using custom placeholders.
[One Team LiB elements ] of the of the BOTS Consulting Web site in the press release section is the date of the release date is taken from the Start Date property of a posting. By using the start date, contributors have the abilit create the release well in advance of the actual public release and have CMS publish the content when it's appropriate. Further, the release will always reflect the date it was released to the public. Unfortunately, th Start Date property is in the Page Properties dialog. As a result, it requires content contributors to go back reset that property once they've saved the page. Often, contributors will forget to set this property, and it m even be missed during the workflow process. To combat this problem, the BOTS Consulting site has a custo placeholder control that's used only during authoring to allow the content contributor to set the date of the posting while they're authoring. In Figure 29-9 you can see what this placeholder looks like.
Figure 29-9. The press release template with the calendar custom placehold
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Microsoft Managementbut Server 2002: Complete Guide making is the first book that easier explains Now, this Content is not revolutionary, it does go aA long way toward contribution for a broader how to effectively power of CMS. Administrators will learn how audience. Not onlyunlock is the the control available during authoring,and but developers it should bealike relatively intuitive—you use a to enhance Web servers' scalability, flexibility, and extensibility by using CMS features and calendar to their set the release date of the posting. API to manage content on the Microsoft platform. In the press release template, we are already using the StartDate property of the posting to display the rele This reference explains the product architecture, then shows you howAuthoringNew to create and or AuthoringR date,thorough so we don't need the placeholder to display during any mode other than edit content we andneed use an theauthoring-only workflow. Topic coverage includes administration and security, In essence, placeholder. In orderCMS to create an authoring-only placeholder, we si the Publishing API, deployment options, site configuration, and development. A don't fully implement the two presentation-focused functions in template the control, LoadContentForPresentation an running example is used throughout how important CMS features arecode to them. CreatePresentationChildControls. We the stillbook haveto toillustrate have them listed, but we won't add any implemented in real-world Web site development. Inside you'll find answers to such questions The next element of our control is the need to change the posting start date. For this we're just going to us as: standard call to the PAPI to affect the posting's StartDate property. We want the StartDate property to be affected when the content contributor chooses a date on the calendar and saves the posting. Keep in mind, Chapter workflow? however, that 6: theHow roledo of you the customize person who changes the date may affect the workflow. Since page properties the domain of the moderator, an author who changes the release date will force the need for moderator Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 approval, and that posting will disappear from the site if it's already been published. using Visual Studio .NET? The complete code for the CalendarPlaceholder is shown in Listing 29-9. Chapter 17: How do you establish user rights?
Listing 29-9 CalendarPlaceholder control code Chapter 22:The How do you best deploy CMS according to your organization's needs, size, and resources? [View full width]
Chapter 32: How do you publish dynamic data? using System;
[using Team System.Web.UI; LiB ] using System.Web.UI.WebControls; using System.ComponentModel; using Microsoft.ContentManagement.Publishing; using Microsoft.ContentManagement.Publishing.Extensions.Placeholders; using Microsoft.ContentManagement.WebControls.Design; using Microsoft.ContentManagement.WebControls;
namespace botsconsultingwebcontrols { /// <summary> /// Summary description for CalendarPlaceholder control. /// [ SupportedPlaceholderDefinitionType( typeof(HtmlPlaceholderDefinition)) • Table of Contents ,DefaultProperty("CurrentDate"), MicrosoftToolboxData(""), Description("Allows authors to change start date of a posting while adding ByBill English , Olga Londer, Shawn Shell , Todd Bleeker , Stephen the Cawood content")] public class CalendarPlaceholder : Microsoft.ContentManagement.WebControls .BasePlaceholderControl Publisher: Addison Wesley { Pub Date: October 31, 2003 private System.DateTime currentDate = System.DateTime.Now; ISBN: 0-321-19444-6 private bool canSetPostingStartDate = false; Pages: 1136 private Literal alternateAuthoringControl; [Bindable(false), Category("Settings")] "This is one of public those rare books that you will read to learn about the product and keep System.DateTime CurrentDate rereading to find { those tidbits that you missed before." —Gary Bushey, SharePoint get Server MVP { Content Management Serverreturn (CMS) iscurrentDate; fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their } Web sites. However, an authoritative source of product information has been missing . . . until now. } Microsoft Content Management Server 2002: A Complete Guide is the first book that explains protected System.Web.UI.WebControls.Calendar newCalendar; how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and protected override void CreateAuthoringChildControls(BaseModeContainer API to manage content on the Microsoft platform. authoringContainer) This thorough { reference explains the product architecture, then shows you how to create and if workflow. (CmsHttpContext.Current.Posting.State.ToString() == "New") edit content and use the Topic coverage includes CMS administration and security, { the Publishing API, deployment options, site configuration, and template development. A
running example is used throughout the book to illustrate how important CMS features are // site If this is a new posting hasn't beenquestions saved at least onc implemented in real-world Web development. Inside you'll and find it answers to such // just display a message to the author indicating that they as: // can't set the startpublishdate until the posting has been // saved at least once. = new Literal(); Chapter 6: How do you this.alternateAuthoringControl customize workflow? this.alternateAuthoringControl.EnableViewState = true; Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? // Set this boolean to false to ensure none of the other operatio // will try and affect the startpublishdate or placeholder value Chapter 17: How do youcanSetPostingStartDate establish user rights? = false; authoringContainer.Controls.Add (this.alternateAuthoringControl); Chapter 22: How} do you best deploy CMS according to your organization's needs, size, and resources? else { Chapter 32: How do you//publish dynamic data? properties of the child control Assign the basic
this.newCalendar = new Calendar(); this.newCalendar.ID = "StartPublishCalendar";
[ Team LiB ]
// Explicitly set the EnableViewState property to true // If this isn't done, you'll occasionally receive an // exception about improper casting this.newCalendar.EnableViewState = true; // Set the canSetPostingDate property to true so the rest // of the operations can occur canSetPostingStartDate = true; // Add the calendar control to the authoring container authoringContainer.Controls.Add(this.newCalendar); } •
Table } of Contents
Microsoft Content Management Server 2002: A Complete Guide
protected override CreatePresentationChildControls(BaseModeContainer ByBill English, Olga Londer, Shawn Shell, Toddvoid Bleeker , Stephen Cawood presentationContainer) { // This function isn't implemented since this is an authoring Publisher: Addison Wesley // only placeholder Pub Date: October 31, 2003 } ISBN: 0-321-19444-6 Pages: 1136
protected override void LoadPlaceholderContentForAuthoring (PlaceholderControlEventArgs e) { "This is one of those rare books that you will read to learn about the product and keep EnsureChildControls(); rereading to find those tidbits that you missed before." try —Gary Bushey, SharePoint Server MVP { Content Management Server// (CMS) fast becoming vital content-management tool that Onlyis load content aif this isn't a new posting, since we can't helps administrators and developers handle the ever-increasing amount of content on their set the start Web sites. However, an authoritative product information has been missing . . .once. until // date source unlessof the posting has already been saved now. if (canSetPostingStartDate)
{ Microsoft Content Management Server 2002: A Complete Guide is the first book that explains // If this isn't a postback and the current placeholder doe how to effectively unlock the power of CMS. Administrators and developers alike will learn how // have any value to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and if((!Page.IsPostBack) && ((HtmlPlaceholder)this API to manage content on the Microsoft platform. .BoundPlaceholder).Text == "") This thorough reference explains the{product architecture, then shows you how to create and this.newCalendar.SelectedDate currentDate; edit content and use the workflow. Topic coverage includes CMS administration =and security, = currentDate; the Publishing API, deployment options, sitethis.newCalendar.TodaysDate configuration, and template development. A this.newCalendar.VisibleDate currentDate; running example is used throughout the book to illustrate how important CMS =features are implemented in real-world Web site } development. Inside you'll find answers to such questions as:
// Assign the appropriate values to the calendar control // based on the placeholder value else Chapter 6: How do you customize workflow? { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 System.DateTime placeholderDate = System.DateTime using Visual Studio .NET? .Parse(((HtmlPlaceholder)this.BoundPlaceholder).Text); this.newCalendar.SelectedDate = placeholderDate; Chapter 17: How do you establish user rights? this.newCalendar.TodaysDate = currentDate; this.newCalendar.VisibleDate = placeholderDate; Chapter 22: How do you best deploy CMS according to your organization's needs, size, } and resources? } } Chapter 32: Howcatch do you(Exception publish dynamic exp) data?
{
[ Team LiB ]
// Show error conditions in string myExceptionMessage = this.GetType().Name + Exception myException = new throw myException;
the console "Error loading placeholder contents: " :: " + this.ID + " :: " + exp.Messa Exception(myExceptionMessage, exp);
} }
protected override void LoadPlaceholderContentForPresentation (PlaceholderControlEventArgs e) { // This function isn't implemented since this is an authoring // only placeholder • Table } of Contents Microsoft Content Management Server 2002: A Complete Guide
protected override SavePlaceholderContent ByBill English, Olga Londer, Shawn Shell, Toddvoid Bleeker , Stephen Cawood
(PlaceholderControlSaveEventAr
{ EnsureChildControls(); Publisher: Addison Wesley try Pub Date: October 31, 2003 {
ISBN: 0-321-19444-6 Pages: 1136
// Make sure we can set the startpublishdate of the posting if (canSetPostingStartDate) {
// Make sure that the date selected on the calendar is afte "This is one of those rare books that// youthe willstartpublish read to learn about and keep Child object star date the of product the channel. rereading dates to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP // can't parent startpublish dates.
if (this.newCalendar.SelectedDate.ToUniversalTime() < Content Management Server (CMS) is fast becoming a vital content-management tool that CmsHttpContext.Current. Channel.StartDate) helps administrators and developers{handle the ever-increasing amount of content on their Web sites. However, an authoritative source//of Throw productaninformation missing . . . until contributo exceptionhas tobeen alert the content now. // that they've broken the rules
Exception myException = new Exception("Posting start Microsoft Content Management Server 2002: A Complete Guide is the first book that explains date prior to channel start date"); how to effectively unlock the power of CMS. Administrators and developers alike will learn how throw myException; to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and } API to manage content on the Microsoft platform. else This thorough reference explains the{product architecture, then shows you how to create and // Set includes the bound equal to the edit content and use the workflow. Topic coverage CMSplaceholder administrationvalue and security, calendar selected date the Publishing API, deployment options, site configuration, and template development. A ((HtmlPlaceholder)this.BoundPlaceholder).Html = this running example is used throughout the book to illustrate how important CMS features are .newCalendar.SelectedDate.ToString(); implemented in real-world Web site development. Inside you'll find answers to such questions CmsHttpContext.Current.Posting.StartDate = this as: .newCalendar.SelectedDate.ToUniversalTime(); } Chapter 6: How do you }customize workflow? else Chapter 10: How do you{ develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? // Store an empty string in the placeholder if we can't aff // the startpublishdate property of the posting Chapter 17: How do you establish user rights? ((HtmlPlaceholder)this.BoundPlaceholder).Html = ""; } Chapter 22: How} do you best deploy CMS according to your organization's needs, size, and resources? catch (Exception exp) { Chapter 32: How do you//publish data? Show dynamic error conditions in the console
string myExceptionMessage = "Error loading placeholder contents: this.GetType().Name + " :: " + this.ID + " :: " + exp.Messa Exception myException = new Exception(myExceptionMessage, exp); throw myException;
[ Team LiB ]
} }
protected override void OnPopulatingDefaultContent (PlaceholderControlCancelEventArgs e) {
// This function allows us to fill the placeholder with a default // value when the posting is new; since this control will not allow // authors to change the value until after the posting has been saved • Table of Contents // once, we simply fill in a default value for the literal control. Microsoft Content Management Server try 2002: A Complete Guide ByBill English, Olga Londer, Shawn { Shell, Todd Bleeker, Stephen Cawood this.alternateAuthoringControl.Text = "You cannot set the release date until the release has been saved once."; } Publisher: Addison Wesley catch (Exception exp) Pub Date: October 31, 2003 { ISBN: 0-321-19444-6 string myExceptionMessage = "Error loading placeholder Pages: 1136 contents: " + this.GetType().Name + " :: " + this.ID + " :: " + exp .Message; Exception myException = new Exception(myExceptionMessage, e "This is one of those rare books thatthrow you will read to learn about the product and keep myException; rereading to find those tidbits} that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that } helps administrators and developers handle the ever-increasing amount of content on their } Web sites. However, an authoritative source of product information has been missing . . . until } now.
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains As you walk through the code, you'll probably notice a few differences between this placeholder control and how to effectively unlock the power of CMS. Administrators and developers alike will learn how earlier example we used. There are some unique characteristics of this particular control that need to be no to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. It's not possible to change the start date of a new posting. A posting doesn't truly exist until after it's This thorough explains product architecture, you how to create and once. As reference a result, we had tothe create a special conditionthen that shows handled new postings (Authoring New) edit content andfrom use the workflow. Topic coverage includes CMS administration differently postings that are being reedited (AuthoringReedit). In the and casesecurity, of a new posting that the Publishing API, deployment options, configuration, and template A never been saved, we simply show site a literal control with a basic textdevelopment. message. Further, we don't chang running example is used throughout the book to illustrate how important CMS features placeholder value of the posting. In all other cases, the control displays a calendarare that allows the con implemented in real-world site development. Inside you'll find answers to such questions contributor to changeWeb the date. as: In connection with our earlier point, the BasePlaceholderClass has an event that's automatically regist and called OnPopulated DefaultContent. This event allows you to control the initial content that a Chapter 6: How do you customize workflow? placeholder might be assigned in the case of a new posting. Because we're explicitly preventing any authoring when the posting is brand new, we use this event to change the Text property of the literal Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 control. It's in this event where we specify the message to the author about not being able to change using Visual Studio .NET? release date.
Chapter 17: How do you establish user rights? The calendar control depends on a postback behavior as the user changes the selected date. This is normally22: fine. However, we're authoring, the console normally warn a content Chapter How do you since best deploy CMS according to yourwill organization's needs, size, contributor if try to navigate away from a posting while in authoring mode. Again, this is normally a good thing. and resources? However, when we select a different date in the calendar control, it looks to the console as if we're try navigate32: away. So, made a small change to the default console. In the DefaultConsole user contro Chapter How dowe you publish dynamic data? check for the existence of the calendar placeholder. If this kind of placeholder exists on a page, we se
EnableLeave AuthoringWarning to "false". In this way, the message about navigating away from the [ Team LiB ] authoring environment will not appear as we change the selected value. The code we added to the con is provided in Listing 29-10.
Listing 29-10 The code in the DefaultConsole to turn off the leave-authoring warning System.Web.UI.Control myControl = this.Page.FindControl("CalendarPlaceholder1"); if (myControl != null) { this.Console1.EnableLeaveAuthoringWarning = false; } else { • Table of Contents = true; Microsoftthis.Console1.EnableLeaveAuthoringWarning Content Management Server 2002: A Complete Guide } ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter we discussed building CMS-aware controls and custom placeholder controls. Building a CMS-aware control is very similar to building other .NET controls, except a CMSaware control "knows" how to react in the CMS environment (between authoring and live). This could be as simple as recognizing the various modes of the author or implementing features specific to a CMS object, like a posting. For our example, we demonstrated how to create a PlaceholderLabel user control and talked about how you could create a similar control as a composite server control. We also builtTable two of custom CMS placeholders. In our examples, we demonstrated creating a • Contents custom placeholder that appeared to the author as a drop-down Microsoft Content Management Server 2002: A Complete Guide
list. This control allowed the author to select the industry with which a specific case study was associated. In addition, we ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood demonstrated how to create an authoring-only placeholder. The calendar placeholder we showed provided a mechanism for the content contributors to change the start-publish date of a posting while they were authoring. Publisher: Addison Wesley
Pub Date: October 31, 2003were presented within the context of the BOTS Consulting solution. Obviously our examples ISBN: 0-321-19444-6 However, the concepts and techniques shown here can be used across a wide variety of Pages: 1136you should have seen here are the possibilities for custom controls to enhance projects. What and extend CMS. For additional examples of CMS-aware controls and custom placeholders, visit http://www.gotdotnet.com.
[ Team "This is LiB one]of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 30. Customizing the Web Author Console The Web Author application is a fundamental component within the CMS architecture. It is this interface that empowers business users by allowing them to modify their Web pages. CMS was originally designed to remove the "Webmaster bottleneck," and it is ultimately the Web Author that accomplishes this goal. Of course, without the rest of CMS, the Web Author would not be very useful, but it is the Web Author that is at the "top of the stack." This is what most CMS users see when they interact with the server. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
The Web Author is actually two entirely separate applications: the original ASP-based Web Author and the new Web Author .NET. This chapter will primarily discuss the .NET application, but the term "Web Author" will be used to describe both versions.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: [ Team LiB ]October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview Why would you want to customize the Web Author? Well, by customizing the Web Author, you can effectively change the workflow within CMS, change the rights of CMS user roles, or even change the functionality of CMS. For example, if you remove the Submit option when a CMS author logs in, you have changed the way that the CMS workflow works. Now, instead of authors submitting changes, editors would have to do so. Along the same lines, if you remove the Move option when an author logs in, then you have effectively changed the rights of the CMS author role. If you add a link that allows an author e-mail an editor, then you have changed the functionality of CMS. In many • Table to of Contents cases, altering Web Author is 2002: the only way toGuide make such customizations. Having a strong Microsoft Contentthe Management Server A Complete understanding of the Web Author architecture is vital if you want to take advantage of its ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood potential. There are innumerable reasons why you might choose to alter the Web Author console. Publisher: Addison Wesley Because of this, it is not possible for Microsoft to build all your desired features into the Pub Date: October they 31, 2003 product. Instead, must provide a flexible platform that allows you to make the required ISBN: 0-321-19444-6 changes. The Web Author offers this flexibility. As you will see in this chapter, it is possible to make Pages: many1136 types of customizations to both the appearance and the functionality of the Web Author. [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Anatomy of the Web Author .NET Console The Web Author .NET application is constructed from many ingredients. The architecture is based on ASP.NET principles, so if you are familiar with ASP.NET, then you will be comfortable with the Web Author. The console itself is contained within a .NET user control, the controls within the console are .NET server controls, and the underlying code is contained within .NET classes (e.g., the WebAuthorContext). •
Table of Contents
Web Author Controls
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
There are a few different types of .NET server controls within the Web Author architecture (Figure 30-1): console controls, site mode container controls, action controls, and status Publisher: Addison Wesley controls. The fact that these controls are all .NET server controls offers great advantages in Pubof Date: October 31, 2003 and development experience. terms class inheritance ISBN: 0-321-19444-6 Pages: 1136
Figure 30-1. Web Author .NET architecture
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Console Controls
Chapter 17: How do you establish user rights?
CMS ships with two console controls. TheseCMS two according server controls are the authoringneeds, console and Chapter 22: How do you best deploy to your organization's size, the error The controls are used to encapsulate the .NET server controls used by the and console. resources? Web Author. When you open the WoodgroveNet DefaultConsole.ascx file in design mode, you can see these 32: two How controls. Chapter do you publish dynamic data?
authoring [The Team LiB ] console appears when a CMS user clicks the Switch to Edit Mode link. The error console is displayed when the WebAuthorContext class encounters an error. To make things easy, the two controls are displayed within the same .NET user control. For example, when you add the WoodgroveNet default console or the BOTS Consulting console to a template, you are also adding the error control.
Site Mode Container Controls Site mode containers enable Web Author controls to act differently under different Web Author modes. There are three types of container controls: presentation mode containers, authoring mode containers, and error mode containers. For example, looking at the source for the DefaultConsole.ascx file, you can see container controls such as PresentationModeContainer and AuthoringModeContainer. These containers give the CMS developer an easy way to organize theTable Web of Author action and status controls. If you created a new custom control, you • Contents could add your control to one of these and you would not have to worry about the Microsoft Content Management Server 2002: containers A Complete Guide control appearing in the wrong CMS mode. In other words, you do not have to write any code ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood to determine whether your control appears in the WebAuthorContext Published mode or authoring mode. Addison Wesley ThePublisher: mode containers support a number of different submodes, shown in Table 30-1. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Table 30-1. Mode Container Submodes "ThisMode is one of those rare books that you will read to learn about the product and keep Submode Description rereading to find those tidbits that you missed before." Container —Gary Bushey, SharePoint Server MVP Presentation Published This is the Live site mode. If a CMS user is logged in, Content Management Server (CMS) is fast vital content-management tool that thebecoming Switch toaEdit Site link appears. helps administrators and developers handle the ever-increasing amount of content on their Unpublished Various action and status controls appear in this Web sites. However, an authoritative source of product information has been missing . . . until mode. The specific controls that appear are now. determined by the rights of the CMS user. For Microsoft Content Management Server 2002: A Complete Guidelink is the that explains example, the Approve will first only book appear if the how to effectively unlock the power of CMS. Administrators will learn how current posting is inand the developers "waiting foralike approval" state to enhance their Web servers' scalability, flexibility, and user extensibility by to using CMS the features and and the current has rights perform API to manage content on the Microsoft approval. platform.
Both Controls added to this both and This thorough reference explains the product architecture, thensection shows will youappear how toin create Published mode and Unpublished mode. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Authoring is used how whenimportant a page isCMS first features created. are running exampleAuthoringNew is used throughout theThis bookmode to illustrate implemented in real-world Web site development. you'll when find answers to such AuthoringReedit This modeInside is available an existing pagequestions is edited. as: Both
Controls added to this section will appear in both AuthoringNew mode and AuthoringReedit mode. Chapter 6: How do you customize workflow? Error FailedSaveNewPage The Save action failed. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? OverlappedSave More than one Save action was detected. Chapter 17: How do you establish user rights? FailedSavePlaceholder A Save action failed when placeholder changes were being saved. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? FailedSubmit The Submit action failed. Chapter 32: How do you publish dynamic data? action failed. FailedApprove The Approve
[ Team LiB ]
FailedDecline
The Decline action failed.
FailedDelete
The Delete action failed.
Example: Displaying the Web Author Mode You may be curious about these modes and when they come into play. Add this code to your DefaultConsole.ascx file to output the current Web Author mode.
using Microsoft.ContentManagement.WebControls; ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Action Controls and Status Controls Publisher: Addison Wesley Pub Date: October 31, 2003
These .NET server controls are the most obvious components within the Web Author console. ISBN: 0-321-19444-6 Status controls are used to display information about CMS objects (such as the publication Pages: 1136 status of the current posting), and action controls allow CMS users to do things like create or edit the content on the Web site. Action controls and status controls render HTML inside server control tags. Rather than "This is onethe of rendering those rareof books that you they will read to learn aboutmodel the product and keep restricting the controls, provide an object to retrieve rendering rereading find those tidbits you missed details. Fortoexample, the Text that property is used before." to show the text within the anchor tags, and the —Gary Bushey, SharePoint Server MVPthe JavaScript that runs when the link is clicked. Action Javascript property determines Content Management Server is fast action becoming a vital content-management tool that The following are examples of(CMS) Web Author controls: helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Create New Page: Allows the user to create a new page.
Move: MovesManagement the page to another CMS channel. Microsoft Content Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Save: their SavesWeb edits to the scalability, current page. to enhance servers' flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Submit: Submits the page into the CMS workflow. This thorough reference explains the product architecture, then shows you how to create and Approve: Approves the saved Topic changes and changes the liveadministration version to the and saved version. edit content and use the workflow. coverage includes CMS security, the Publishing API, deployment options, site configuration, and template development. A The following are examples of Web Author status controls: running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Posting State: Indicates the current stage in the CMS workflow.
Lock Status: Shows which CMS author has locked the page. Chapter 6: How do you customize workflow? Version: Indicates whether another version of the page exists. For example, if the page Chapter Howbut do the youchanges develop have for Microsoft Management Server 2002 has been10: edited not beenContent approved, this control shows(CMS) that the live using Visual Studio .NET? version of the page is different from the version displayed in Unpublished mode. 17:Author How do you establish usercontained rights? within the container control for authoring. Most Chapter of the Web action controls are The only one that is visible in presentation mode is the link that allows a CMS author to switch Chapter 22: How do you best deploy CMS according to your organization's needs, size, to Unpublished mode. This is the Switch to Edit Site link that you see as a CMS user with and resources? authoring rights. The control has added logic that hides the link if the current user is the CMS guestChapter account.32: How do you publish dynamic data?
[ Team LiB ]
WebAuthorContext Class The WebAuthorContext class is the heart of the Web Author application. CMS offers different rendering of pages based on different modes. It is the WebAuthorContext class that allows the Web Author to manage these different modes. For example, in Published mode, CMS placeholders render content, but in Unpublished mode it is usual that they allow authors to edit the content. It is the WebAuthorContext.Current method that allows the Web Author to detect the current mode. Take a look at the CMS help files for a complete breakdown of the WebAuthor Context class. This is the same class that handles the new PAPI event model. CMS developers can use the event model to perform custom actions based on changes to the CMS site—for example, when new pages are created. But this is a topic for another chapter.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide [ Team LiB ] ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Working with the Default Console Control
The ASP.NET version of the CMS 2002 Web Author is conveniently packaged within a user control. Many We Author changes can be made by simply modifying this one control. The following sections explore a few examples of changes that you might want to make to your CMS implementation.
Changing Display Properties of the Default Console
In a CMS site, the Web Author console is exposed within a .NET user control. By implementing the console Table of Contents this manner, the CMS development team has given users a great deal of flexibility over the presentation of Microsoft Content Management Server 2002: A Complete Guide console. Simply by altering the user control, you can present the Web Author console in a different manner By Billfollowing English, Olga Londer, Shawn Shell, Toddhow Bleeker , Stephen Cawood The example demonstrates to make such an alteration. •
Publisher: Addison Wesley
Example: Altering the Border Color of the Web Author Console Pub Date: October 31, 2003 ISBN: 0-321-19444-6
If you have looked at the WoodgroveNet sample site, you have seen that the default Web Author console Pages: 1136 (Figure 30-2) is surrounded by a green border. Since it is likely that you are using a different color scheme, this is one of the most obvious changes that you might want to make. You can use this example as a basis making a number of aesthetic changes to the Web Author console. "This is one of those rare books that you will read to learn about the product and keep Figure 30-2. Web Author default console rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? NOTE: You can try any of these examples using the BOTS Consulting site.
[ Team LiB ]
To alter this border color, open a browser window and navigate to your CMS site (e.g., http://localhost/WoodgroveNet/). If you are using Forms authentication, log in as a CMS user who has righ to edit the page. Next you need to click the Switch to Edit Mode link. This will show the Web Author console Notice the border color of the Web Author console. For example, the WoodgroveNet console has a green border.
If the CMS project is not already open, open it in Visual Studio .NET. For more information on this topic, ref to the CMS documentation ("Opening the WoodgroveNet Project in Visual Studio .NET"). In the Solution Explorer, expand the folder containing the DefaultConsole. ascx file. In the WoodgroveNet sample, this fold is called Console and contains the files used by the WoodgroveNet authoring console. Double-click the DefaultConsole.ascx file (e.g., C:\Program Files\Microsoft Content Management Server\Sample Data\WoodgroveNet\console\ DefaultConsole.ascx). This will open the file for editing. Click the HTML tab at the bottom of theofwindow to switch to the HTML view. Before you alter this file, make sure you create a • Table Contents backup copy. Once you have created copy, Microsoft Content Management Server 2002:aAbackup Complete Guideyou can change the code that renders the Web Author console. For example, to change the border color of the control, you would alter the following code. Note th ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood in the WoodgroveNet sample, this code starts at line 5. Before:
Publisher: Addison Wesley Pub Date: October 31, 2003
0-321-19444-6 border='2' bordercolor='green' cellpadding='5'> function Pages:changeConsoleSelection(selection) 1136 { var option = selection.options[selection.selectedIndex]; if (option.actionJavascript != null ) "This is{one of those rare books that you will read to learn about the product and keep vartoactionJavascript = option.actionJavascript; rereading find those tidbits that you missed before." —Gary eval(actionJavascript); Bushey, SharePoint Server MVP } } Content Management Server (CMS) is fast becoming a vital content-management tool that and developers handle the ever-increasing amount of content on their helps administrators ... sites. However, an authoritative source of product information has been missing . . . until Web <select onchange="changeConsoleSelection(this)" ID="dropDownConsole" NAME="dropDownConsol now. Web Author Console ... Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Pagetheir Status: to enhance Web servers' scalability, flexibility, and extensibility by using CMS features and Container.Text %>Microsoft platform.
API to site configuration, and template development. A Container.ActionJavascript running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions ... as:
Chapter 6: How do you customize workflow?
Example: Floating Web Author Console
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? This example shows another useful console modification. Instead of having the console tied to a particular location on the page, you may want to allow your CMS users to move the console around as they see fit. Th Chapter 17:the HowWeb do you establish user rights? example renders Author console as a floating DHTML window (Figure 30-5). Authors can easily dra the control anywhere they wish. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Figure 30-5. A floating Web Author console
Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
This is a popular console because it does not require any real estate on your page. If you already have a gr template, you add thebooks console without having to learn makeabout any changes. "This is one of can those rare that you will read to the product and keep
rereading to find those tidbits that you missed before." The following code shows a small portion of the floating console implementation. This is the code that displa —Gary Bushey, SharePoint Server MVP or hides particular elements within the console. This code is used to expand and collapse the control. The completeManagement code for thisServer example is available for download at www.awprofessional.com/titles/0321194446. Content (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their [View full width] Web sites. However, an authoritative source of product information has been missing . . . until <script language="JavaScript"> now. function OpenCloseDiv(divName){ ifContent (divName.style.display "none") { Microsoft Management Server == 2002: A Complete Guide is the first book that explains divName.style.display="block"; how to effectively unlock the power of CMS. Administrators and developers alike will learn how } to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and else { content on the Microsoft platform. API to manage divName.style.display="none"; } This thorough reference explains the product architecture, then shows you how to create and } edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is usedid="Console1" throughout the book to illustrate how important CMS features are [ ?&PostingGUID=", "WorkflowProperties", "height=610,width=650"); running example is used throughout the book to illustrate how important CMS features are } implemented in real-world Web site development. Inside you'll find answers to such questions --> as: ASP Example /// Summary description for DropDownPlaceholderControl. Publisher: Wesley /// Addison Pub Date: October 31, 2003 [ToolboxData("")] ISBN: 0-321-19444-6 public Pages: 1136class DataDrivenDropDownListPlaceholder : Microsoft.ContentManagement .WebControls.BasePlaceholderControl {
protected System.Web.UI.WebControls.DropDownList IndustryList; "This is one of those rare books that you will read to learn about the product and keep protected System.Web.UI.WebControls.DataGrid SelectedEmployees; rereading to find those tidbits that you missed before." protected override void CreateAuthoringChildControls (BaseModeContainer —Gary Bushey, SharePoint Server MVP authoringContainer) { Content Management Server (CMS) is fast becoming a vital content-management tool that this.IndustryList new DropDownList(); helps administrators and developers handle=the ever-increasing amount of content on their this.IndustryList.Items.Add(new ListItem("Sales Representative","Sales Web sites. However, an authoritative source of product information has been missing . . . until Representative")); now. this.IndustryList.Items.Add(new ListItem("Sales Manager","Sales Manager this.IndustryList.Items.Add(new ListItem("Inside Coordinator" Microsoft Content Management Server 2002: A Complete Guide is the first book Sales that explains ,"Inside Sales Coordinator")); how to effectively unlock the power of CMS. Administrators and developers alike will learn how ListItem("Vice President, to enhance their Web this.IndustryList.Items.Add(new servers' scalability, flexibility, and extensibility by using CMS features Sales","Vice and President, API to manageSales")); content on the Microsoft platform. this.IndustryList.EnableViewState = false; authoringContainer.Controls.Add(this.IndustryList); This thorough reference explains the product architecture, then shows you how to create and } use the workflow. Topic coverage includes CMS administration and security, edit content and override void (PlaceholderControlSaveEventAr the Publishing protected API, deployment options, siteSavePlaceholderContent configuration, and template development. A { is used throughout the book to illustrate how important CMS features are running example EnsureChildControls(); implemented in real-world Web site development. Inside you'll find answers to such questions try as: { ((HtmlPlaceholder)this.BoundPlaceholder).Html = this.IndustryList Chapter 6: How do you customize workflow? .SelectedItem.Value.ToString(); } Chapter 10: Howcatch do you(Exception develop for ex) Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? { string saveExceptionMessage = "Error saving placeholder contents: Chapter 17: How do you establish user rights? this.GetType().Name + " :: " + this.ID + " :: " + ex.Messag Exception saveException = new Exception (saveExceptionMessage, ex Chapter 22: How do you best deploy CMS according to your organization's needs, size, throw saveException; and resources? } } How do you publish dynamic data? Chapter 32: protected override void LoadPlaceholderContentForAuthoring
e) [(PlaceholderControlEventArgs Team LiB ] {
EnsureChildControls(); try { ListItem savedSelectedIndustry = this.IndustryList.Items .FindByValue(((HtmlPlaceholder)this.BoundPlaceholder).Text); this.IndustryList.SelectedIndex = this.IndustryList.Items.IndexOf (savedSelectedIndustry); } catch (Exception ex) { string saveExceptionMessage = "Error loading placeholder contents this.GetType().Name + " :: " + this.ID + " :: " + ex.Messag • Table of Contents Exception saveException = new Exception (saveExceptionMessage, ex Microsoft Content Management Server 2002: A Complete Guide throw saveException; ByBill English, Olga Londer}, Shawn Shell, Todd Bleeker, Stephen Cawood } protected override void CreatePresentationChildControls (BaseModeContainer Publisher: Addison Wesley presentationContainer) Pub Date: October 31, 2003 { ISBN: 0-321-19444-6 Pages: 1136
SelectedEmployees = new DataGrid(); presentationContainer.Controls.Add(SelectedEmployees);
} "This is one of protected those rare books that you read to learn about the product and keep override voidwill LoadPlaceholderContentForPresentation rereading to find those tidbits that e) you missed before." (PlaceholderControlEventArgs —Gary Bushey, { SharePoint Server MVP Content Management EnsureChildControls(); Server (CMS) is fast becoming a vital content-management tool that helps administrators and try developers handle the ever-increasing amount of content on their Web sites. However, an { authoritative source of product information has been missing . . . until now. // Grab the value from the placeholder
string mySelectedEmployees = ((HtmlPlaceholder) this Microsoft Content Management Server 2002: A Complete Guide is the first book that explains .BoundPlaceholder).Text; how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and // Open a new connect and perform a search for values that match API to manage content on the Microsoft platform. // the save placeholder value OleDbConnection myConnection; This thorough reference explains the product architecture, then shows you how to create and string myConnString = "Provider=SQLOLEDB.1;Integrated edit content and use the workflow. Topic coverage includes CMS administration and security, Security=SSPI;Persist Security Info=False;Initial Catalog=Northwind;Data the Publishing API, deployment options, site configuration, and template development. A Source=localhos myConnection = new OleDbConnection(myConnString); running example is used throughout the book to illustrate how important CMS features are string myQuery = "Select LastName,FirstName from Employees where implemented in real-world Web site development. Inside you'll find answers to such questions Title = '" + mySelectedEmployees + "';"; as: OleDbCommand myCommand = new OleDbCommand(myQuery); myCommand.Connection = myConnection; Chapter 6: How do you myConnection.Open(); customize workflow? // Fill the datagrid with the returned records Chapter 10: How do youthis.SelectedEmployees.DataSource develop for Microsoft Content Management Server (CMS) 2002 = myCommand.ExecuteReader(); using Visual Studio } .NET? catch (Exception ex) Chapter 17: How{ do you establish user rights? string saveExceptionMessage = "Error loading placeholder contents Chapter 22: How do you best deploy CMS according to +your organization's needs, this.GetType().Name " :: " + this.ID + " size, :: " + ex.Messag and resources? Exception saveException = new Exception(saveExceptionMessage, ex) throw saveException; Chapter 32: How} do you publish dynamic data?
[ Team LiB ] } }
}
In Listing 32-2 you can see how we fill the drop-down list box with the four titles that exist in the Employee table. Then, during presentation, we perform a SQL query against the table to find all records that have the selected value in the title field. In this way, the content contributor can select what employees they want to display based on the employee title. We could have taken this a step further by filling the drop-down list co with the actual values from the database as well. The implementation you choose is up to you. In Figures 32-2 and 32-3 you can see what each mode of the new custom placeholder looks like.
Figure 32-2. The new custom placeholder in authoring mode •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content32-3. on the The Microsoft platform. Figure new custom placeholder in presentation mode This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
[
Pages: Team LiB ]1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter we discussed how developers can integrate dynamic data or existing applications into a CMS-based solution. We discussed how you can go about determining whether it makes sense to integrate data or applications, posing a series of questions that you can ask as you consider the integration project. Next, we demonstrated two examples where we integrated dynamic data in a CMS template. The first example placed a data grid on a template and bound it to a data source. The next example extended the prior solution by allowing content contributors to select what data is displayed through the use of a custom placeholder. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 33. Web Services For some time now, Web Services have been the buzzword technology that everyone is scrambling to support. For good reason—Web Services expose the inner workings of any application so they can work with external forces. Think of Web Services as a self-contained set of methods that can reside anywhere on the Internet and can be invoked remotely. Web Services also bridge the technology gap. They offer a way for distributed applications to communicate from any platform or geographical location with any other platform or geographical location. Web Services are built on open protocols and standards. This makes it • Tablevendor of Contents possible for any to provide their version of a Web Service, and because they must follow Microsoft Contentfor Management Server A Complete the standards their product to2002: be classified asGuide a Web Service, everyone can interact with it. For communication is done HTTP, a well-known, open protocol for By Billinstance, English, Olga Londer, Shawn Shell , Toddover Bleeker , Stephen Cawood communication. The method call and its parameters are done using SOAP, a well-known, open protocol for remote procedure calls based on XML, a well-known, open language for exchanging Publisher:data. Addison Wesley structured Since XML is just plain ASCII text, it can be generated and consumed by any platform regardless programming language, Web server choice, or operating system. Web Pub Date: October 31,of2003 Services do 0-321-19444-6 require an HTTP (port 80) or HTTPS (port 443) exposure to the World Wide Web, ISBN: also commonly, albeit inaccurately, referred to as the Internet (the Internet includes a much Pages: 1136 broader set of technologies, like FTP and SMTP). That global network is what makes Web Services compelling and is quite commonplace today in nearly every workplace and even most homes. "This is oneWide of those youProperty's will read to learn about the product andofkeep The World Web rare also books allowsthat a Web content to frequently be part a much rereading to find those tidbitsregional, that youand missed larger ecosystem with local, evenbefore." global reach. Each partner uses different —Gary Bushey, SharePoint Server hardware and software enabled by MVP disparate technologies and programming languages using
diverse data stores. Trying to get tab A to squarely fit into slot B is a time-tested challenge. But Content Management Server (CMS) fast becoming a vital content-management that the Internet introduced the world to is connectivity unlike anything that preceded it. tool However, helps administrators and developers handle the ever-increasing amount of content on their rampant use of that connectivity was hampered because of the unprecedented threat that Web However, an authoritative source product has been missing . . . until samesites. connectedness provides. Through it all,of HTTP (portinformation 80) remains the most ubiquitous now. stronghold for information exchange between parties anywhere, anytime. Out of that, Web Services emerged as a compelling means to allow the quasi-secure exchange of data Microsoft Content Management Server 2002: A Complete Guide is the first book that explains throughout the global ecosystem. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance Web how servers' flexibility, byexchange using CMSinformation. features and This chaptertheir explores Webscalability, Services can be usedand by extensibility MCMS sites to API to manage content on the Microsoft platform. An entire alphabet soup of acronyms associated with Web Services is listed in Table 33-1, but we are not going to discuss them in depth. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage CMS administration security, Fortunately, we don't have to become experts in allincludes these technologies to createand a Web Service, the Publishing API, deployment options, site configuration, and template development. A will be because VS.NET and IIS handle much of the dirty work for us. For instance, although we running example is used throughout the book to illustrate how important CMS are using WSDL, SOAP, and XML in our code sample, we will hardly even know thatfeatures they were implemented in real-world Web site development. Inside you'll find answers to such questions needed. Anyway, much has been written about these standards and can be easily found on the as: Internet, should additional information about them be required. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Table 33-1. using Visual Studio .NET?Web Services Acronym Soup Defined Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Acronym Team LiB ]
Explanation
Use
HTTP
HyperText Transport Protocol
This protocol allows us to send a SOAP message to a Web Service requesting information or processing, and allows the Web Service to send us a response.
SOAP
Simple Object Access Protocol
This includes the name of the method we want the Web Service to execute and any parameters we are passing to that method.
UDDI
Universal Data Description Interface
This centralized repository catalogs Web Services, allowing others to discover a Web Service we have written or for us to discover a Web Service that others have written. This works somewhat like the Yellow Pages.
Web Service This describes the methods available from a Web Service, Definition what protocols can be used to call them, what the methods Microsoft Content Management Server 2002: A Complete Guide Language do, what parameters are allowed or required, and what data ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood type those parameters need to be so that our SOAP message can correctly call a specific Web Service method. •
WSDL
Table of Contents
Publisher: Addison Wesley WSIL Web Service Pub Date: October 31, 2003 Inspection Language ISBN: 0-321-19444-6 Pages: 1136
This relative newcomer is similar to UDDI in that it allows for the discovery of Web Services, but it uses a decentralized model. This works more like a business card. In many ways, WSIL is like an RSS Weblog for Web Services.
XML
eXtensible This language follows a standard that can be validated, and Markup although typically used to describe data, it is also used to Language format our SOAP message. "This is one of those rare books that you will read to learn about the product and keep rereading to eXtensible find those tidbits that you missed is before." XSL This language used for creating a style sheet that describes —Gary Bushey, SharePoint Server MVP Stylesheet how data sent over the Web using XML is to be presented to Language the user. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their [ Team LiB ] Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Common Uses Web Services associated with a CMS Web Property are typically used for one of two purposes: syndication (conduction) to any platform or aggregation (consumption) from any platform. However, the sky is the limit. Anything that can be done via the CMS Publishing API (PAPI) in a stand-alone application could theoretically be made available via a Web Service. So, for instance, if we wanted to create a Web Service that would provide the name and GUID of all postings that expire in the next week, we could do that from any application that could call our Web Service. Further, if we wanted to create a Web Service that allowed our customer to change the ExpiryDate of one of those postings, we could do that. So, common use may lie in • Table of Contents the eye of the beholder. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
That said, we are going to focus on the two purposes mentioned at the beginning of this segment. From a technical perspective, these two scenarios are distinguished by whether the CMS system will be the publisher or the consumer of Web Services. If it is syndicating its data, Publisher: Addison Wesley it will be the publisher, and if it is aggregating, it will be the consumer. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Content Syndication Syndication can be defined as a distribution of information to various destinations for repurposing or republishing in another context. Noncomputer examples of syndication include "This is one of those rare books that you will read to learn about the product and keep the sale of a comic strip, column, television series, or movie for simultaneous republication in rereading to find those tidbits that you missed before." news papers, periodicals, independent television stations, or theaters. The content typically —Gary Bushey, SharePoint Server MVP remains the same, but the advertising surrounding the content, the placement or presentation of the content, or even the purpose of the content may be altered. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Syndication is accomplished by replicating data across systems, commonly done as a batch Web sites. However, an authoritative source of product information has been missing . . . until process running at a fixed time interval. This causes duplication of data across systems and now. creates a potential disconnect between the data being used by the destination applications and the up-to-date data held by the source system. This solution can be complex to manage but is Microsoft Content Management Server 2002: A Complete Guide is the first book that explains often required to meet the business need. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Syndication can also be accomplished by creating a real-time interaction between applications. API to manage content on the Microsoft platform. This can lead to fresh reuse of content without resorting to "screen scraping" or manual cutting and pasting. Usage of the syndicated content may create potential subscription fee revenue. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Far more scenarios exist (see the Decisions That Must Be Made section), but whatever method the Publishing API, deployment options, site configuration, and template development. A is employed, CMS syndicated content is typically only available when it has been approved for running example is used throughout the book to illustrate how important CMS features are publishing. implemented in real-world Web site development. Inside you'll find answers to such questions as:
Content Aggregation Chapter 6: How do you customize workflow?
Aggregation is the flip side of syndication. It can be defined as a collection of related Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 information from various sources for repurposing or republishing in another context. Today using Visual Studio .NET? aggregators typically gather syndicated content into an indexed, searchable, and potentially categorized collection that content. That content can be displayed in a homogeneous Chapter 17: Howof dolinks youto establish user rights? user interface with all relevant data presented simultaneously. This allows a user to visit a singleChapter site and22: interact with content from many sites. Since of data can be How do you best deploy CMS according tolarge your volumes organization's needs, size, automatically collected, the user can filter and search for just the content that they want to and resources? view. The information can be summarized or repurposed, as previously described. Also, since the aggregator collects new content the site can stay as fresh as its freshest Chapter 32: How do you publishcontinuously, dynamic data? syndicate. For large, effective aggregators, that can mean a Web site that changes very
[rapidly. Team LiB ]
Decisions That Must Be Made When content is to be syndicated, there are several decisions that must be made in order to determine the best means of sharing that content. These decisions can have a significant impact on the success of the syndication. These are not necessarily presented in any order, since the importance of each decision is dependent on the situation. What is a good choice in one situation may be a poor choice in another situation.
Redundant versus Centralized •
Table of Contents It will be important to decide whether the content that is syndicated will be copied to the aggregator or kept in a central store. Making a redundant copy of the data requires a By Bill Englishand , Olgaspace Londerat , Shawn Shell, Todd Bleeker repository the aggregator. If the,Stephen contentCawood changes or is removed, the change may need to be reflected in the copy. This can become quite complex if there are multiple aggregators. That could certainly lead to synchronization issues and potentially lead to stale or Publisher: Addison Wesley If the content doesn't change (such as a comic strip), this is less of an even inaccurate content. Pub Date: October 31, 2003 issue. Microsoft Content Management Server 2002: A Complete Guide
ISBN: 0-321-19444-6
There Pages: is also1136 the potential for alternative utility of the aggregated data. Once data is gathered together from various sources, it can become quite compelling. For instance, there is a certain utility for our credit card holder to know when we've never made a late payment. But when all our creditors aggregate their individual payment experiences into a credit bureau, that collective information has a utility that wasn't available to the credit card company before it "This is one of those rare books that you will read to learn about the product and keep was centralized. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP for having a single source of truth that all However, there is a compelling argument aggregators simply point to. Practically every Web site has links to other content. If every Web Content Server (CMS) fast becoming that a vital content-management site wereManagement required to keep a copy of is the information they currently only point tool to, that helps administrators and developers handle the ever-increasing amount of content their practically every Web site would become unmanageable within one day. Also, if the on content Web sites. However, an authoritative source of product information has been missing . . . until needs a high level of security, spreading copies of it around will certainly increase the risk that now. it may be exposed. Using a single source will typically provide a more consistent set of information, especially if there are complex or proprietary algorithms that must be performed. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Scheduled versus Real Time API to manage content on the Microsoft platform. This thorough explains the times product architecture, then shows you to how create Almost all Webreference Properties have peak when their hardware is pushed its to limit and and other edit content use the workflow. Topicwe coverage includes CMS administration and security,it times when itand is nearly idle. God willing, spend more time at peak than at idle. However, the API,to deployment options,scheduled site configuration, andlocally template development. mayPublishing be necessary have information to be copied at times when theAservers running example is used throughout the book to illustrate how important CMS are are not busy so that the content is available locally when the servers are busy.features Sometimes, implemented in real-world Web site development. Inside you'll find answers to such questions performance is key, especially if the data needed is voluminous. Imagine if we wrote a Web as: Service to retrieve all products sold at the local grocery in the last quarter so that we could show the top ten–selling products to our customer. If someone is waiting at the other end of that query, they may want to go get a cup of coffee or have lunch. Getting that content the 6: How do youwith customize workflow? even summarized data would significantly night Chapter before and interacting local, potentially improve the experience. Trend analysis or other complex calculations that require the context Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 of other content are good candidates for scheduled syndication. using Visual Studio .NET?
However, sometimes, regardless of the performance hit, real-time, up-to-date information is Chapter 17: How do you establish user rights? key. Imagine if our stockbroker used last night's price for the stock we wanted to buy today, or if our Chapter bookie used yesterday's odds deploy for theCMS race according we want to onorganization's today. Not good. These 22: How do you best to bet your needs, size, situations require the freshest information possible. However, they need good designs to and resources? prevent latency or, worse, unavailability. How many bets do you think the bookie will take if ten minutes before race time access to thedata? odds? We also might want to use real-time Chapter 32: How do he youloses publish dynamic access if we only care about a small unanticipatable portion of a large data set. If our customer
looks [only Team LiBat ] their balance once every six months, it would probably be overkill to schedule the move of every customer balance every 20 minutes so that it would be current when they asked. A real-time lookup on a central repository would likely be the best solution in that case.
Push versus Pull Whether the content will be sent to the syndicate or retrieved by the aggregator can potentially be one of the most difficult decisions that must be made. Politics, turf, security, clout, relationship, profit, trust, the number of potential consumers, who holds the biggest stick, who had the idea, technical savvy, how often the content could change, and a whole host of other factors (including all the other factors discussed in this section) can influence this decision. If the content owner wants to control precisely what content is going to be syndicated, to whom, and when that content should be available, they will probably opt to push their content. The more complex those rules get, the more likely it will be pushed. The push will typically be • Table of Contents synchronous with an event Server at the2002: syndicate, and Guide the aggregator will have little control over the Microsoft Content Management A Complete timing of the receipt of that content. However, the aggregator will probably store that ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood information redundantly for instant availability when it is requested by their customer, and the information will probably be as fresh as it can be. Publisher: Addison Wesley On the other hand, if the interaction needs to be at the behest of the consumer, a pull model Date: 31, 2003 will Pub need to October be created. It wouldn't make any sense for a company to push their stock price out ISBN: 0-321-19444-6 to every partner every time it changed. That content would most likely be pulled by the partner when it was1136 needed. It also wouldn't make sense for a bank to push every transactional change Pages: out to all their branches in anticipation that one of their customers may walk into that branch. The branch would selectively pull that content when they needed it.
"This is one of those rare books that you will read to learn about the product and keep Private versus Opentidbits Access rereading to find those that you missed before." —Gary Bushey, SharePoint Server MVP The decision about who will be allowed access to this content will typically be far more cut and Content Serverwho (CMS) is fast becoming a vital content-management tool that dried. If Management we need to control gains access to the content, it will need to be private. It may helps administrators andisdevelopers handle the ever-increasing amount of content on their even be fee based (that the compelling promise of Web Services for some industries). If Web sites. However, an authoritative product information missing . . current . until Gartner (example of private content) source started of giving away its analysishas to been the public, their now. revenue model would have to change. Likewise, if Google (example of open access content) started charging for each search, their current revenue model would have to change. In fact, Microsoft Content Management Server 2002: A Complete Guide is the first book that explains neither would likely survive the change. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
RSS versus Web Service
This thorough reference explains the product architecture, then shows you how to create and edit and useSyndication, the workflow. Topic by coverage includes CMS administration and security, RSS content (Really Simple created Netscape and championed by UserLand, or RDF the deployment options, site for configuration, and template development. A SitePublishing Summary,API, based upon a Web standard metadata called RDF) is an XML-based standard running example is used throughout the book to illustrate how important CMS features format that allows the syndication of lists of hyperlinks along with other information, or are implemented in helps real-world Web site development. you'll find answers to list-oriented such questions metadata, that viewers decide whether they Inside want to follow the link. Any as: content—such as news headlines, press releases, job listings, conference calendars, and rankings (like top ten lists), to list a few—is a good candidate for an RSS feed. Powerful tools exist for consuming aggregated RSS feeds, but most require an existing aggregator. Although 6: HowofdoRSS youfeeds customize workflow? thereChapter are thousands on a wide variety of topics, there must be a groundswell of public interest in syndicating the same type of content before aggregating it makes sense. So, Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 there is wide adoption in some sectors, while there is no adoption in others. We'd be more using Visual Studio .NET? likely to find a deep and fresh channel about a rock star than we would about airline ticket prices. Chapter 17: How do you establish user rights?
With Web Service syndication, anything is possible. That can actually make it more difficult to Chapter 22: How do you best deploy CMS according to your organization's needs, size, get a groundswell of people sharing content about the same thing. Although Web Services are and resources? based upon standards, their implementation is typically very proprietary. There are growing means by which consolidate content Chapter 32:aggregators How do youcan publish dynamic data? from Web Services, but public adoption is more difficult because there isn't the same kind of strict standards with regard to content
[organization Team LiB ] as there is with RSS. However, partner (B2B) adoption is high for proprietary solutions.
Partial versus Complete This decision will likely be determined based upon the size of the content universe and the need for the aggregator to have the complete set of content available. As with push versus pull, a large number of external influencers could make this decision difficult. However, typically it will make sense to provide access either to a single item or segment of the content or to all of it. Certainly, our bank isn't going to allow us to access all the accounts when we pull transactional content into our accounting software. It may be all of our content, but it isn't all of the bank's content. If the data is relatively volatile, syndicating only the altered content would be impractical. It would probably make more sense to send the entire universe of data to a redundant store evening. However, direct, real-time access to specific content could be • Tableeach of Contents the best Content way to Management handle content that tends to be highly Microsoft Server 2002: A Complete Guide volatile. If we take a cue from RSS, it may be good to syndicate pointers, URLs, or IDs to the actual content. The aggregator would ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood then funnel the user through to the source if their interest was piqued with the teaser. Publisher: Addison Wesley
AddPubversus Add/Change/Delete Date: October 31, 2003 ISBN: 0-321-19444-6
Like the examples given at the beginning of this discussion, some content never changes. Pages: 1136 Consider a comic strip—once it is syndicated, changes do not occur. The same is true of a newspaper column, press release, transcript, school report card, lab test results, and lots of other content. Content that doesn't change is obviously easier to syndicate. Once it is out, it needs no maintenance. It can live in as many repositories as it finds its way into because the "This one of those books thatit.you will tothe learn about the product and keep sourceissystem never rare needs to alter This is read by far most prevalent kind of syndication in rereading to find those tidbits that you missed before." place today. —Gary Bushey, SharePoint Server MVP However, for other content, change or removal is likely or other maintenance may be Content Management Server (CMS) fastto becoming a vital content-management tool that necessary. If the syndicate must be is privy the whereabouts of its syndicated content at all helps and developers handle the likely ever-increasing amount of contentstrategy. on their In times administrators so that they can keep it current, they will need an add/change/delete Web sites. However, ansyndication authoritative of product information missing . . . until essence, transactional willsource probably require an approachhas thatbeen allows the syndicate now. to maintain any redundant copies with methods that allow alteration and deletion of previously syndicated content. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Horizontal Vertical Cares?) API to manage or content on the (Who Microsoft platform. This referencemade explains thewhether productaarchitecture, shows you how to create and Muchthorough ado is frequently about Web Servicethen is horizontal or vertical to CMS. The edit contentisand use thesubjective workflow. and Topic coverage CMS administration and security, evaluation somewhat there isn't aincludes significant benefit to knowing whether a the deployment options, site configuration, and template WebPublishing Service isAPI, horizontal or vertical. Nevertheless, two questions need todevelopment. be answered.A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Is the Web Service interface generic enough to be used for any CMS application or not?
Does the consumer need intimate knowledge of the underlying CMS application or not? Chapter 6: How do you customize workflow? Basically, if the interface is so specific that the consumer doesn't need to know much about Chapter 10:itHow do you develop for Microsoft Content Management Server (CMS) 2002 your application, is considered a vertical Web Service (exaggerated example of a vertical using Visual Studio .NET? WebMethod: GetYahoo PressReleasesForYear(string yearToRetrieve)). But if the interface is very generic, requiring the consumer to have an intimate knowledge of your CMS application Chapter 17: How doityou establish user rights? Web Service because it is similar to PAPI information architecture, is considered a horizontal in its style (exaggerated example of a horizontal WebMethod: GetPostings(string Chapter 22: Howstring do you best deploy string CMS according to your organization's postingChannel Path, postingClient, postingType, string postingYear,needs, string size, and resources? optionalPostingID)).Figure 33-1 attempts to illustrate these classifications pictorially. Chapter 32: How do you publish dynamic data?
Figure 33-1. Horizontal or vertical Web Service
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep Web Service Security rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Can I secure my Web Service? This is controversial at best, and many people do not think enough attention has been given to this topic. Web Services give anyone with access the Content Management Server (CMS) is fast becoming a vital content-management tooltothat Internet the potentially (UDDI, WSIL) and certainly discoverable detailed helps administrators andpublished developers handle the ever-increasing amount of (WSDL) content on their information necessaryantoauthoritative invoke code source on our of publicly accessable servers. It stands to reason Web sites. However, product information has been missing . . . until that we may want to restrict that access to specific people. We may even want to charge for it. now. We certainly want to minimize the likelihood that malicious attacker(s) could wreak havoc or Microsoft Management Server 2002: A Complete Guide is the first book that explains worse on Content those servers. how to effectively unlock the power of CMS. Administrators and developers alike will learn how Almost everything about this topic is well beyond theand scope of this chapter. Suffice it to say that to enhance their Web servers' scalability, flexibility, extensibility by using CMS features and in the environment CMS runs in, all the customary means available to secure a API to Microsoft manage content on thethat Microsoft platform. traditional Web site are available to secure a Web Service. These include, but are not limited to, This thorough reference explains the product architecture, then shows you how to create and the following: edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A IISexample virtual directory–based security usingtoWindows: Digest, orCMS Integrated running is used throughout the book illustrateBasic, how important featuresWindows are authentication (NTLM Web or Kerberos) or restricting by you'll IP address. implemented in real-world site development. Inside find answers to such questions as: .NET Framework–based security using Windows: Basic, Digest, or Integrated Windows authentication (NTLM or Kerberos) in conjunction with IIS, Microsoft Passport authentication, Client Certificates. Chapter 6: HowForms, do youor customize workflow?
Third-party certificate–based Chapter 10:digital How do you develop forsecurity. Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Windows file system–based security using role- or user-based Access Control Lists (ACLs), which implies the do useyou of Windows Chapter 17: How establish authentication. user rights? SQL Server user-based security. (Note thattoCMS a specific database user Chapter 22:roleHow and do you best deploy CMS according youruses organization's needs, size, to access the CMS database, and the CMS database structure is internal to Microsoft and and resources? not documented for public consumption or alteration. Direct access to the CMS data Chapter 32: do you publish dynamic data? structures is How not supported by Microsoft.) However, it is possible to keep highly restricted data in a separate database and control access using built-in SQL Server security on that
data [ Team LiBstore. ] Of course, we could (and many do) build our own proprietary security methods, storing the credentials of valid users in LDAP, a database, or the file system and managing access to Web Services using code written specifically for this purpose. Other means of protecting access to your assets could include the following: Encryption: .NET provides strong encryption algorithms, or you can simply encrypt the entire communication via SSL. Obfuscation: Don't publish, describe, or name your Web Service anything that would help a user know what to expect from it. Remove the WSDL, and require a private object structure that only your partners know. Use an IP address with no domain attached to it. •
Table of Contents
Restrict physical access: Configure hardware appliances such as a firewall, router, or NIC card to only allow access under certain conditions. Keep the servers under lock and key ByBill English , Olga Londer, Shawn and out of public areas.Shell,Todd Bleeker,Stephen Cawood Microsoft Content Management Server 2002: A Complete Guide
Monitor: Implement an Intrusion Detection System (IDS) that can write rules to keep out requests (remember NIMDA) and to watch for patterns of abuse and automatically block Denial Of Service (DOS)-like attacks on any element of a Web Pub Date: October 31, 2003 Property, including a Web Service. ISBN: 0-321-19444-6
Publisher: Addison Wesleypacket known-to-be-bad
Pages: 1136
These are but a few of the techniques in the arsenal of security mechanisms that could be deployed to protect our Web Service. For the code sample in this chapter, we will use IIS Integrated Windows authentication, "This is onethe of those rare books that you will read to learn about the value product and in keep populating SoapHttpClientProtocol.Credentials property with the stored rereading to find those tidbits that you before." CredentialCache.DefaultCredentials for missed the currently logged-in user. This way we can be sure —Gary Bushey, SharePoint Server MVP that security is not a hindrance to learning about the topic at hand. Since we are running these examples on a single box, the credentials for one system can easily be shared by the other Content Management Server (CMS) fastpractice becoming a vital content-management tool thatWeb system. We will, however, follow theisbest of creating a Web Service in a separate helps administrators developers handle thesettings ever-increasing amount of content on their application from CMSand so that different security can be applied. Web sites. However, an authoritative source of product information has been missing . . . until now. Of course, some Web Services will need to be offered to the anonymous public, and that is possible too. CMS will need guest access enabled, the guest user will need the authority to do Microsoft Server 2002: A Complete Guide is access the first book that explains whatever Content the WebManagement Service requires, and IIS will need anonymous enabled. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. [ Team LiB ] This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Setup for Coding CMS Web Services The code sample in this chapter assumes that managing CMS assets (Channels, Postings, Templates, and so on) in a Web Property is understood and a good portion of the CMS PAPI is instinctive. Therefore, screen shots will only be shown for results and directives specific to this chapter. Please refer to other chapters in this book for CMS non–Web Service details. Also, the simple error handling in the code throughout the code sample isn't meant to be the model for how to handle CMS exceptions; there is an application code block from Microsoft on how to do exception handling in .NET. But before we canofbegin coding our Web Services, we need to do a little setup work. The BOTS • Table Contents Consulting Web Management site alreadyServer has a2002: channel structure and Microsoft Content A Complete Guide
navigation that will accommodate what we will call Job Offerings. However, there are currently no general, summary, or detail ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood templates or postings in that section of the BOTS Web site. So we will need to create them. Not to worry—we'll keep it very simple. Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 NOTE: You don't need to have BOTS to create the code in this chapter. Just create or Pages: 1136 use channels, templates, and postings in your own site and change the names accordingly.
"This is one of those rare books that you will read to learn about the product and keep The steps to wefind will those go through setyou up the BOTS Web site follow, first in brief and then in detail. rereading tidbitsto that missed before." It should take no more than about ten minutes to set up this environment. —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and hierarchy developers handle thechannels). ever-increasing amount of content on their 1. Set up the channel (three easy Web sites. However, an authoritative source of product information has been missing . . . until now. 2. Set up the templates (two easy templates). Microsoft Content Management Server 2002:them A Complete Guide is(two the first that explains 3. Set up the template files and associate with templates easybook template files). how to effectively unlock the power of CMS. Administrators and developers alike will learn how to4. enhance their Web servers' scalability, flexibility, extensibility by using CMS features and Code the template files (relatively simple code and is provided). API to manage content on the Microsoft platform. 5. Build the solution in VS.NET (three-finger salute but not Ctrl-Alt-Del). This thorough reference explains the product architecture, then shows you how to create and edit use the workflow. coverage includes CMS administration and security, 6. content Create and the postings (two easyTopic postings). the Publishing API, deployment options, site configuration, and template development. A 7. Install the Woodgrove sample data site (standard setup). running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Set Up Channel Hierarchy Chapter 6: How do you customize workflow? Using the Site Manager, ensure that we have, at a minimum, the channel hierarchy characterized in Table Chapter 10: How 33-2. do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? The jobs channel was called "growth" for Growth Opportunities in other parts of the book. But "jobs"Chapter for Job 17: Offerings seemed a betteruser descriptor How do you establish rights?for this code sample.
WhenChapter you are22: done, it should like Figure 33-2. How do you look best something deploy CMS according to your organization's needs, size, and resources?
Figure 33-2. Channel hierarchy for BOTS Job Offerings
Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Table 33-2. Channel Hierarchy for BOTS Job Offerings "This is one of those rare books that youDisplay will readName to learn about the product keep URL Channel Parent Channel Default Page and Script rereading to find those tidbits that you missed before." botsconsulting Channels Server MVP BOTS Consulting default empty —Gary Bushey, SharePoint
careers Management botsconsulting default empty Content Server (CMS) is Careers fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their jobs careers Job Offerings default empty Web sites. However, an authoritative source of product information has been missing . . . until now.
Set Up Templates
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Using the VS.NET MCMS Template Explorer, create the templates characterized in Table to enhance their Web servers' scalability, flexibility, andlogical extensibility by using CMS features and 33-3to(take the default all unspecified properties). API manage contentvalues on thefor Microsoft platform.
We added the reference two circledexplains templates Figure architecture, 33-3. Note that they are you not yet with a This thorough theinproduct then shows howassociated to create and template file, so the icon looks broken and there is a red check mark because they are still edit content and use the workflow. Topic coverage includes CMS administration and security, checked out. API, deployment options, site configuration, and template development. A the Publishing running example is used throughout the book to illustrate how important CMS features are implemented in Figure real-world33-3. Web site development.for Inside you'llJob find Offerings answers to such questions Templates BOTS as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Set Up Template Files and Associate with Templates Using the VS.NET Solution Explorer, create two physical template files in the Templates "This is one those the rareexisting books that you will read to learn the product and keep directory by of copying generic.aspx template file.about Name them jobsummary.aspx and rereading to find those you missed before." jobdetail.aspx, and savetidbits themthat to disk. —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Table 33-3. Templates for BOTS Job Offerings now.
Parent Placeholder Definition Placeholder Definition Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Template Template Type Name how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and JobSummary BOTS Consulting none none API to manage content on the Microsoft platform. JobDetail BOTS Consulting HtmlPlaceholder JobDescription Definition This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are NOTE: Ifinyou aren't using code, theInside generic.aspx template file just questions a stub implemented real-world Web the site BOTS development. you'll find answers toissuch as: that includes the header, footer, and left navigation used on the Web site. It also has the default console and a Web Form literal called BodyTitle in the content portion of the file. You could easily use a standard MCMS template file and add your own Chapterinterface. 6: How do you customize workflow? custom Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Using the VS.NET MCMS Template Explorer, associate the Template File property of the Chapter template 17: How do you user rights? JobSummary with theestablish jobsummary.aspx file, and the TemplateFile property of the JobDetail template with the jobdetail.aspx file. The icon for each template should become Chapter Howcheck do you bestthe deploy CMS according to your organization's needs, size, unbroken, and22: if you them, red check mark should go away. and resources? Back in the VS.NET Solution Explorer, edit the jobsummary.aspx file. Add a Web Form Chapter 32: How do you publish dynamic data? placeholder control named SummaryOfPostings just below the existing literal control in the
portion of the file. It should look something like Figure 33-4. [content Team LiB ]
Figure 33-4. jobsummary.aspx
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
EditPublisher: the jobdetail.aspx file. Add an HtmlPlaceholderControl named JobDescription just below the Addison Wesley existing literal in the content portion of the file. Also, choose JobDescription from the dropPub Date: October 31, 2003 down list for the PlaceholderToBind property. The result should look something like Figure 33-5. ISBN: 0-321-19444-6 Pages: 1136
Figure 33-5. jobdetail.aspx
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout Code the Template Files the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Replace the Page_Load function in the jobsummary.aspx template file with the following code: Chapter 6: How do you customize workflow? private void Page_Load(object sender, System.EventArgs e) { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 HtmlAnchor cmsPostingLink; using Visual Studio .NET? Literal cmsPostingDate; Chapter 17: How do you establish user rights? CmsHttpContext cmsContext = CmsHttpContext.Current; Chapter 22: How do you best deploy CMS according to your organization's needs, size, //Show the Posting DisplayName at the top of the content and resources? BodyTitle.Text = "" + Chapter 32: How do you publish dynamic data? HttpUtility.HtmlEncode( CmsHttpContext.Current.Posting.DisplayName) +
""; [ Team LiB ] //Go through all the Postings in this Channel and Add details to //the SummaryOfPostings Web Form Placeholder for each Posting //sorted by StartDate //Do not include the Posting named default PostingCollection cmsChannelPostings = cmsContext.Channel.Postings; if (cmsChannelPostings != null) { cmsChannelPostings.SortByStartDate(false); foreach (Posting cmsPosting in cmsChannelPostings) { if (cmsPosting.Name != "default") { //Format Hyperlink • Table of Contents = new HtmlAnchor(); cmsPostingLink Microsoft Content Management Server 2002: A Complete Guide cmsPostingLink.HRef = cmsPosting.Url; cmsPostingLink.InnerText = cmsPosting.DisplayName; ByBill English , Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood cmsPostingLink.Attributes.Add("style","COLOR: gray"); SummaryOfPostings.Controls.Add(new Publisher: Addison Wesley
LiteralControl("
")); SummaryOfPostings.Controls.Add(cmsPostingLink); Pub Date: October 31, 2003 SummaryOfPostings.Controls.Add(new LiteralControl( ISBN: 0-321-19444-6 "
Posted: " + Pages: 1136 cmsPosting.StartDate.ToLongDateString())); SummaryOfPostings.Controls.Add(new LiteralControl("
")); } } "This } is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." } —Gary Bushey, SharePoint Server MVP Content Server (CMS) fast becoming a vital content-management toolthe that The codeManagement basically shows a URL and is StartDate for each posting in the channel except helps administrators and developers handle the ever-increasing amount of content on their default posting. Web sites. However, an authoritative source of product information has been missing . . . until now. Ensure that the namespace and public class (initially called "generic" if copied from generic.aspx) near the top of the file are unique in your project. You may want to provide a Microsoft Content Management Server 2002: A Complete Guide is the first book that explains more detailed comment. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. namespace botsconsulting.Templates { This thorough reference explains the product architecture, then shows you how to create and /// <summary> edit content and description use the workflow. coverage includes CMS administration and security, /// Summary for Topic jobsummary. the/// Publishing API, deployment options, site configuration, and template development. A running example used throughout the book to illustrate how important CMS features are public class isjobsummary : System.Web.UI.Page implemented in real-world Web site development. Inside you'll find answers to such questions as: This is the only custom code in this template file. Chapter 6: How dofunction you customize workflow? Replace the Page_Load in the jobdetail.aspx template file with the following code: Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 usingvoid Visual Studio .NET? private Page_Load(object sender, System.EventArgs e)
{
}
Chapter How doDisplayName you establish at user rights? //Show the17: Posting the top of the content BodyTitle.Text = "" + Chapter 22: How do you best deploy CMS according to your organization's needs, size, HttpUtility.HtmlEncode( and resources? CmsHttpContext.Current.Posting.DisplayName) + ""; Chapter 32: How do you publish dynamic data?
[ Team LiB ] Ensure that the namespace and public class (initially called "generic" if copied from generic.aspx) near the top of the file are unique in your project. You may want to provide a more detailed comment.
namespace botsconsulting.Templates { /// <summary> /// Summary description for jobdetail. /// public class jobdetail : System.Web.UI.Page
This is the only custom code in this template file.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Build the Solution in VS.NET
ThisPublisher: is an important step—don't miss it. You can use Ctrl-Shift-B or choose Build Solution from Addison Wesley the Pub Build menu. Clearly, but hopefully unnecessary, you must deal with any errors before Date: October 31, 2003 continuing. ISBN: 0-321-19444-6
Pages: 1136
Create Postings Once is the build is successful, browse http://localhost/botsconsulting/careers/jobs in Internet "This one of those rare books that to you will read to learn about the product and keep Explorer. to find those tidbits that you missed before." rereading —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that For the top work properly, you may want to create a posting helpsNOTE: administrators andnavigation developerstohandle the ever-increasing amount of content on their "default" an in the careers channel. This posting can be based template Web named sites. However, authoritative source of product information has upon been any missing . . . until now. that allows navigation to the channel's children. However, it isn't required for this code sample to function. You could even create the default posting in the careers channel usingManagement the JobSummary template you like. Give a name of book "default" a Microsoft Content Server 2002: AifComplete Guideit is the first thatand explains display name unlock something like "Check outAdministrators our Job Offerings." how to effectively the power of CMS. and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Follow these steps to create the default posting based uponthen the shows Job Summary the This thorough reference explains the product architecture, you howtemplate to createinand jobs content channel:and use the workflow. Topic coverage includes CMS administration and security, edit the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions 1. Click the Switch to Edit Site link on the right side of the channel Welcome page. as: 2. Click the Create New Page link. Chapter 6: How do you customize workflow? 3. Locate and click the BOTS Consulting link in the template gallery. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 4. Locate the JobSummary template and click its Select icon. using Visual Studio .NET?
5. There are no placeholders on this template, so simply click the Save New Page link. Chapter 17: How do you establish user rights? 6. Type "default" into the Name text box. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? 7. Type "Job Offerings" into the Display Name text box. Chapter 32: How do you publish dynamic data? 8. Click OK to dismiss the dialog.
9. 10.
7. 8. 9. Click [ Team LiBthe ] Approve link. 10. Click the Switch to Live Site link. Figure 33-6 shows what this default summary page will look like after the next steps are complete.
Figure 33-6. Summary posting in Internet Explorer
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Follow these steps to an create the default posting based upon the Job has Summary template the Web sites. However, authoritative source of product information been missing . .in . until jobs channel: now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how 1. Click the Switch to Edit Site link in the Web Author console of the default page in the jobs to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and channel. API to manage content on the Microsoft platform.
2. Click the Create New Page link. This thorough reference explains the product architecture, then shows you how to create and edit and click use the Topic coverage includes CMSgallery. administration and security, 3. content Locate and theworkflow. BOTS Consulting link in the template the Publishing API, deployment options, site configuration, and template development. A running example is used throughout theclick bookits toSelect illustrate how important CMS features are 4. Locate the JobDetail template and icon. implemented in real-world Web site development. Inside you'll find answers to such questions as: 5. Enter a job description like "SQL Server 2000 DBA must know DTS" into the placeholder. 6. Type "BOTS.12345" into the Name text box. Chapter 6: How do you customize workflow? 7. Type a job title like "SQL Server DBA" into the Display Name text box. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Visual Studio .NET? 8. using Click OK to dismiss the dialog. How do you establish user rights? 9. Chapter Click the17: Approve link. HowtodoLive youSite bestlink. deploy CMS according to your organization's needs, size, 10. Chapter Click the22: Switch and resources? Clicking the Job Offerings link on the left navigation should take you to the posting in the jobs Chapter 32: How do you should publish look dynamic data? like Figure 33-6. channel named default, which something
the]SQL Server DBA link should take you back to the detail page for that posting, and [Clicking Team LiB it should look something like Figure 33-7.
Figure 33-7. Detail posting in Internet Explorer
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Server (CMS) isData fast becoming Install Management Woodgrove Sample Site a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, authoritative source product information has beenpostings missing to . . the . until The Woodgrove Bankan sample that comes withofCMS will be used to syndicate now. BOTS Consulting Web site. So if you don't already have Woodgrove installed, you need to do
that now. There are detailed instructions for installing the sample both in the CMS help file and Microsoft Management 2002: A Complete Guide thejust firstchanging book that explains on MSDN.Content As always, you have Server the option of using your own siteisand the names how to effectively unlock the power of CMS. Administrators and developers alike will learn how as needed. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API content thetoMicrosoft platform. Thattoismanage all the setup we on need do, so let's code up a Web Service! This thorough [ Team LiB ] reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Building a Web Service For our first example, let's suppose that BOTS Consulting has a pretty good relationship with some of its clients including, coincidentally, Woodgrove Bank (the Woodgrove sample that comes with CMS will be modified to complete this code sample). Whenever Woodgrove, or other BOTS partners, posts a job posting on their Web site, BOTS would like to have it show on their Web site as well. If Woodgrove changes their job posting, BOTS would like their site to reflect the modified posting on their Web site. If Woodgrove deletes their posting, BOTS would like their Web site to reflect this deletion. So, in cooperation Woodgrove and its other partners, BOTS Consulting wants to create a • Table ofwith Contents Web Service that their partners to accomplish Microsoft Content Management Serverwould 2002: call A Complete Guide
these tasks. This horizontal, real-time, push Web Service hosted by BOTS will syndicate a redundant copy of each job opportunity sent ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood from BOTS' partners. That makes BOTS the aggregator of job postings for their partners. First a Woodgrove author will submit a new or changed posting for approval. Then a Publisher: Addison Wesley Woodgrove approver will approve the posting, which will be the catalyst for calling the BOTS Date: October 31, 2003 the content. Figure 33-8 shows this scenario pictorially. WebPub Service to syndicate ISBN: 0-321-19444-6 Pages: 1136
Figure 33-8. Add or change push syndication
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Later a Woodgrove approver willServer delete2002: the posting, whichGuide will beisthe forthat calling the Microsoft Content Management A Complete thecatalyst first book explains BOTS Web Service to remove the content previously syndicated. Typically, we expect that the how to effectively unlock the power of CMS. Administrators and developers alike will learn how posting will their simply expire rather than get deleted. is syndicated withfeatures the to enhance Web servers' scalability, flexibility,The andExpiryDate extensibility by using CMS and content, and the BOTS Web Service will set the syndicated posting to expire at the same time API to manage content on the Microsoft platform. as the Woodgrove posting. If we presume the clocks on the separate servers are somewhat in This reference explains the product architecture, shows you howpictorially. to create and sync,thorough both postings will expire simultaneously. Figure 33-9 then shows this scenario edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment site configuration, and template development. A Figure options, 33-9. Delete push syndication running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Create the BOTS Web Service VS.NET Project to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. We begin by building the BOTS Web Service that Woodgrove will call. It is wise and easier to isolate the Webreference Service code fromthe theproduct existingarchitecture, BOTS VS.NET project. This thorough explains then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running Step 1 example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: So, crack open VS.NET and open a new C# MCMS Web Service VS.NET project (Figure 33-10).
Figure 33-10. C# MCMS Web Chapter 6: How do youNew customize workflow?
Service VS.NET project
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 0-321-19444-6 Be sureISBN: to choose MCMS Web Service from the Visual C# Projects folder under the Content Management Server Projects folder. If, instead, you choose ASP.NET Web Service from the Pages: 1136 root-level Visual C# Projects folder, a lot of configuration in the Web.config file will be missing, and although CMS will work for most things, when we try to do something other than retrieve data, we will end up with exceptions. The error message will indicate that we need to add the PostingEvents to the section Web.config with the name CmsPosting. "This is one of Module those rare books that you will read to of learn about the product and keep Let's avoid all that by selecting the MCMS Web Service project template from the correct folder. rereading to find those tidbits that you missed before." That way, all the appropriate references, assemblies, and httpmodules will have already been —Gary Bushey, SharePoint Server MVP added to the project for us.
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web However, an authoritative source of product information has been missing . . . until Stepsites. 2 now.
Using the VS.NET Solution Explorer, right-click the project name, CmsJobsWebService, and Microsoft Management Server Guide is the In first book that explains select AddContent a Web Service from the Add2002: menu AofComplete the resulting pop-up. the resulting dialog, how to effectively unlock the power of CMS. Administrators and developers alike willname learn the how choose Web Service from the list of templates in the Web Project Items folder, and to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and new Service PostJobToBOTS.asmx (Figure 33-11; this time we do not want to use the Content API to manage content on the Microsoft platform. Management Server folder). This thorough reference explains the product architecture, then shows you how to create and Figure 33-11. New Web Service PostJobToBOTS.asmx edit content and use the workflow. Topic coveragenamed includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
This will be our actual Web Service assembly. However, we want an easy way to communicate multiple parameters via XML to the Web Service. To do this, we are going to create a serializable public class in the next few steps. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Step 3 —Gary Bushey, SharePoint Server MVP
Again, right-click the project and select Add a Component from the Content Management Server name, (CMS) CmsJobsWebService, is fast becoming a vital content-management tool that Add menu of the resulting pop-up. This time, in the resulting dialog, choose Class from the list helps administrators and developers handle the ever-increasing amount of content on their of templates in the Web Project Itemssource folder,of and nameinformation the new class 33Web sites. However, an authoritative product hasJobPosting.cs been missing(Figure . . . until 12; again, we do not want to use the Content Management Server folder). now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Figure 33-12. New class named JobPosting.cs how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Step 4 Near the topofofthose the code for JobPosting.cs, the namespace from "This is one rarewindow books that you will read tochange learn about the product and keep CmsJobsWebService to tidbits BOTS.CmsJobsWebService. The namespace used here must be the rereading to find those that you missed before." same asBushey, the namespace used in theMVP Web Service for the two classes to interact locally. Add a —Gary SharePoint Server nice comment to the summary area and add the [Serializable] attribute to the class. More on the value of the [Serializable] later. The code should look something like the Content Management Server (CMS) isattribute fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their following: Web sites. However, an authoritative source of product information has been missing . . . until now. using System; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains namespace BOTS.CmsJobsWebService how to effectively unlock the power of CMS. Administrators and developers alike will learn how { enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and to <summary> API/// to manage content on the Microsoft platform. /// This class provides an efficient way to share information This thorough reference explains thean product architecture, then shows how to create and /// with our partners about Approved Job Posting. The you class edit content and use workflow. Topic includesdehydrate CMS administration and security, /// is marked asthe Serializable so coverage we can easily its the/// Publishing API, deployment site partner configuration, and template development. A state into XML, pass options, it to our so they can hydrate running example is used the book to illustrate how important CMS features are /// it back and usethroughout it. implemented in real-world Web site development. Inside you'll find answers to such questions /// as:[Serializable] public class JobPosting { Chapter 6: How do you customize workflow? //1. Public Properties public String JobEmployer; Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 public String JobPostingID; using Visual Studio .NET? public String JobPostingName; public DateTime JobPostingStartDate; Chapter 17: How do you establish user rights? public DateTime JobPostingExpiryDate; public ChapterString 22: HowJobTitle; do you best deploy CMS according to your organization's needs, size, public String and resources? JobDescription; //2. Constructor, required .NET Framework Chapter 32: How do you publishby dynamic data? public JobPosting()
{ LiB ] [ Team } } }
Step 5 The first code in the class defines the public properties for this class. We can hold information in these properties in much the same way that we used structures in the past. If we wanted to, we could have used regular set and get blocks to access private variables, but since no additional processing is needed and to keep the example short, we just make the variable itself public. For jobs that are syndicated to BOTS, these properties represent the data that BOTS anticipates. The syndicate will need to adopt their data to these fields. The first property, JobEmployer, should identify the company that is calling the Web Service. The next four are • Table of Contents characteristics the posting, and the last twoGuide are about the job itself. The JobTitle Microsoft Contentabout Management Server 2002: A Complete property will be used to populate the DisplayName of each posting that is created/updated. The ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood code after the second comment is the .NET required class constructor. Save your changes. Publisher: Addison Wesley
Step Pub6Date: October 31, 2003 ISBN: 0-321-19444-6
ReturnPages: to the top of the code window for the PostJobToBOTS assembly 1136 (PostJobToBOTS.asmx.cs). We need to add two using statements. The first statement is included for interacting with Publishing objects and the second for working with Placeholders. We also need to change the namespace from CmsJobsWebService to BOTS.CmsJobsWebService (to match the namespace given in the JobPosting class), add a nice "This is one those rare books you the will [WebService] read to learn about the product and keep comment to of the summary area, that and add attribute to the class. The code rereading to find those tidbits that you missed before." near the top of the file should look something like the following (preceded by several using —Gary Bushey, SharePoint Server MVP statements inserted by default): Content Management Server (CMS) is fast becoming a vital content-management tool that helps and developers handle the ever-increasing amount of content on their usingadministrators Microsoft.ContentManagement.Publishing; Web sites. However, an authoritative source of product information has been missing . . . until using now. Microsoft.ContentManagement.Publishing.Extensions.Placeholders; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains namespace BOTS.CmsJobsWebService how to effectively unlock the power of CMS. Administrators and developers alike will learn how { to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and /// <summary> API to manage content on the Microsoft platform. /// Summary description for CmsJobsWebService.PostJobToBOTS. /// This thorough reference explains the product architecture, then shows you how to create and [WebService edit content and (Namespace="http://botsconsulting.com")] use the workflow. Topic coverage includes CMS administration and security, class : System.Web.Services.WebService thepublic Publishing API,PostJobToBOTS deployment options, site configuration, and template development. A { running example is used throughout the book to illustrate how important CMS features are public PostJobToBOTS() implemented in real-world Web site development. Inside you'll find answers to such questions { as:
The[WebService] attribute the key toworkflow? exposing this class as a Web Service. By adding Chapter 6: How do youiscustomize Namespace="http://botsconsulting.com" to this attribute, we avoid the warning we would get later about10: using namespace. Chapter Howthe dohttp://tempuri.org you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 17: How do you establish user rights? StepChapter 7 Chapter 22: How do you best deploy CMS according to your organization's needs, size, Uncomment the HelloWorld example provided near the bottom of the code window, build the and resources? solution (Ctrl-Shift-B), and then point the browser to our Web Service (should be http://localhost/CmsJobsWebService/PostJobToBOTS.asmx) to make sure that everything is Chapter 32: How do you publish dynamic data? working properly. Since debug is set to true by default in a new MCMS Web Service, right-
the ]PostJob.asmx file in the Solution Explorer, clicking Set As Start Page, and then [clicking Team LiB pressing F5 launches a browser window (Figure 33-13) where we can not only debug but test as well.
Figure 33-13. Testing the Web Service
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
If you see a message that reads "This Web service is using http://tempuri.org/ as its default "This is one of those rare that you will read to learn about the product namespace" followed by abooks verbose recommendation, the Namespace propertyand we keep discussed in rereading to find those tidbits that you missed before." step 6 is missing from the [WebService] attribute. Clicking the Service Description will display —Gary Bushey, SharePoint XML that describes the classServer and itsMVP methods. This XML is called the WSDL, Web Service Description Language, discussed near the beginning of this chapter in Table 33-1. Clicking the Content Management Server (CMS) fast becoming a vital tool that HelloWorld link and subsequently on is the Invoke button that content-management follows will result in a new window helps administrators and developers handle the ever-increasing amount of content onService. their that shows the XML string that would be returned to the caller of the HelloWorld Web Web sites. an authoritative source of product information has been If missing . . . until Getting thisHowever, simple example to function properly is a must before continuing. it is working for now. you, let's continue. If not, there are dozens of examples on MSDN, on GotDotNet.com, and even in the .NET Framework SDK that should help get you going. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Stepto8manage content on the Microsoft platform. API This reference explains theexample productand architecture, then shows how to create and Next,thorough replace the entire HelloWorld its comment with the you following four private edit content and workflow. Topic includes CMSmethod administration and Service. security, functions. We willuse be the using them when wecoverage are coding the public of our Web the Publishing API, deployment options, site configuration, and template development. A running is used throughout book illustrate how important CMS features are The first example private function simply logs the errors to to a file. implemented in real-world Web site development. Inside you'll find answers to such questions as: private void LogErrorToFile(string errorMessage) //***************************************************************** Chapter 6: to HowFile do you customize workflow? //Write Error //***************************************************************** Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 { tryusing Visual Studio .NET? { Chapter 17: Error How doto youFile establish user rights? //1. Write System.IO.StreamWriter logFile = Chapter 22: How do you best deploy CMS according to your organization's needs, size, new System.IO.StreamWriter("C:ErrorLog.txt", true); and resources? logFile.WriteLine(errorMessage); logFile.Close(); Chapter 32: How do you publish dynamic data? }
catch{} [ Team LiB ] }
The second private function was introduced in Chapter 25 in Listing 25-1. It is used to create an authenticated CMSApplicationContext using the currently logged-on Windows user, typically in Update PublishingMode.
private CmsApplicationContext GetAuthenticatedCmsApplicationContext (PublishingMode cmsMode) //***************************************************************** //Adapted from Listing 25–1 Function to Create an Application //Context. Create a new CmsApplicationContext and authenticate it //Pass the created Context back to the calling method. //***************************************************************** • Table of Contents { Microsoft Content Management Server 2002: A Complete Guide //1. Declare a Context variable ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood CmsApplicationContext cmsContextApp = null; try {Publisher: Addison Wesley //2. Grab a new Application Context Pub Date: October 31, 2003 cmsContextApp = new CmsApplicationContext(); ISBN: 0-321-19444-6 Pages:Assign 1136 //3.
current Windows User to a WindowsIdentity variable // This will only work if IIS is set to Windows // Authentication and Guest Access is enabled in the SCA System.Security.Principal.WindowsIdentity identCurrentUser = "This isSystem.Security.Principal.WindowsIdentity.GetCurrent(); one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint //4. Log in to CMS Server MVP // Use the currently authenticated Windows User credentials Content Server is fast becoming apassed vital content-management // Management Put Context into(CMS) the PublishingMode to the function tool that helpscmsContextApp.AuthenticateUsingUserHandle( administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until identCurrentUser.Token, cmsMode); now. //5. Return the Authenticated Context Microsoft Content Management Server 2002: A Complete Guide is the first book that explains return cmsContextApp; how } to effectively unlock the power of CMS. Administrators and developers alike will learn how to catch(Exception enhance their Web eError) servers' scalability, flexibility, and extensibility by using CMS features and API{ to manage content on the Microsoft platform. //6. Write Error to File This thorough reference explains the product architecture, then shows you how to create and LogErrorToFile(eError.Message.ToString()); edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, the deployment options,in sitethe configuration, anderror template development. A //7. Return null Context event of an running example is used throughout the book to illustrate how important CMS features are return cmsContextApp; implemented in real-world Web site development. Inside you'll find answers to such questions } as: } Chapter 6: How do you customize workflow? The third private function was also introduced in Chapter 25, in Listing 25-3. Given a Channel, a Name, and a Template, the function is used to create an uncommitted Posting. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
private Posting CreateNewPosting( Chapter 17: How do you establish user rights? Channel parentChannel, string newPostingName, Template ChaptercmsTemplate) 22: How do you best deploy CMS according to your organization's needs, size, //***************************************************************** and resources? //Adapted from Listing 25–3 Function to Create New Posting. //Create a new in publish the parentChannel Chapter 32: Posting How do you dynamic data? using the //newPostingName based upon the cmsTemplate all passed to the
[//function. Team LiB ] Pass the created Posting back to the calling method. //***************************************************************** { //1. Declare a Posting variable Posting cmsPosting = null;
try { //2. Determine if the user has sufficient rights to create // a Posting from the would-be parent Channel if(parentChannel.CanCreatePostings) { //3. Create the Posting using the Template passed cmsPosting = parentChannel.CreatePosting(cmsTemplate); •
of Contents //4. Table Validate successful creation
Microsoftif(cmsPosting Content Management != Server null)2002: A Complete Guide
{ ,Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill English //5. Give it the Name passed to the function cmsPosting.Name = newPostingName; } Publisher: Addison Wesley } Date: October 31, 2003 Pub //6. Return the created Posting ISBN: 0-321-19444-6 return cmsPosting; Pages: 1136
} catch(Exception eError) { //7. Write Error to File "ThisLogErrorToFile(eError.Message.ToString()); is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP in the event of an error //8. Return the null Posting return cmsPosting; Content Management Server (CMS) is fast becoming a vital content-management tool that } helps administrators and developers handle the ever-increasing amount of content on their } Web sites. However, an authoritative source of product information has been missing . . . until now. And finally, the fourth private function simply isolates the process of systematically generating Microsoft Content Management Server 2002: A Complete Guide is the first book that explains a name from data provided, so that it can consistently be done from several areas of our Web how to effectively unlock the power of CMS. Administrators and developers alike will learn how Service. We will concatenate the jobEmployer, a period, and the jobID (without the curly to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and brackets) into a name that will help us relocate the created Posting if it is changed or deleted in API to manage content on the Microsoft platform. the future. By including the jobEmployer value in the name, we ensure uniqueness across partner postings, providing a potentially beneficial sorting mechanism while maintaining the This thorough reference explains the product architecture, then shows you how to create and ability to find the created Posting later. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running used throughout the book jobEmployer, to illustrate howstring important CMS features are privateexample string isGenerateJobName(string jobID) implemented in real-world Web site development. Inside you'll find answers to such questions //***************************************************************** as: //Concatenate JobEmployer and ID to consistently form a name //***************************************************************** { Chapter 6: How do you customize workflow? //1. Declare temp variable to hold jobname string jobName = ""; Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 tryusing Visual Studio .NET? { //2. Strip spaces (could any kind of tailoring here) Chapter 17: out How all do you establish user do rights? jobName = jobEmployer.Replace(" ", ""); Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? //3. Concatenate the GUID without the curly brackets to the // Employer name separated with a period Chapter 32:is How do you publish data? this Posting later // This done so that wedynamic can identify jobName += "." + jobID.Substring(1,36);
[ Team LiB ] //4. Return concatenated name return jobName.ToString(); } catch(Exception eError) { //5. Write Error to File LogErrorToFile(eError.Message.ToString());
//6. Return empty name return jobName.ToString(); } }
• Table of first Contents Next we create our WebMethod. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Step 9 Publisher: Addison Wesley BOTS will need to provide its partners with a function that they can call (in a Web Service this Pub Date: October 31, 2003 is called a WebMethod) to add or change a job when it is approved on their Web Property. 0-321-19444-6 MakingISBN: a function available to the outside world via a Web Service is relatively painless in VS.NET. We1136 simply ensure that the function is public and is preceded with the [WebMethod] Pages: attribute. The AddChangeJob WebMethod code is explained with comments throughout but will also be discussed after the code is presented.
"This is one of those rare books that you will read to learn about the product and keep [WebMethod] rereading to find those tidbits that you missed before." public string AddChangeJob(JobPosting job) —Gary Bushey, SharePoint Server MVP { try Management Server (CMS) is fast becoming a vital content-management tool that Content { helps administrators and developers handle the ever-increasing amount of content on their an Authenticated Update PublishingMode Web //1. sites. Grab However, an authoritative Context source of in product information has been missing . . . until // using the GetAuthenticatedCmsApplicationContext function now. // from Listing 25–1 CmsApplicationContext = Microsoft Content Management cmsContextApp Server 2002: A Complete Guide is the first book that explains GetAuthenticatedCmsApplicationContext(PublishingMode.Update); how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and //2. Grabcontent the jobs Channel in platform. which the Posting will exist API to manage on the Microsoft // Cast the result of the Searches object as a Channel Channel cmsChannel = This thorough reference explains the product architecture, then shows you how to create and cmsContextApp.Searches.GetByPath( edit content and use the workflow. Topic coverage includes CMS administration and security, "/Channels/botsconsulting/careers/jobs/") the Publishing API, deployment options, site configuration, and template development. A Channel; runningas example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: //3. Generate a consistent name for the Posting from data // provided. The resulting name will look something like: // Woodgrove.12345 ChapterjobName 6: How do customize workflow? string = you GenerateJobName(job.JobEmployer, job.JobPostingID); Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Grab Visualthis Studio .NET? for update if it already exists //4. Posting
Posting cmsPosting = Chapter 17: How do you establish user rights? cmsContextApp.Searches.GetByPath( "/Channels/botsconsulting/careers/jobs/" + jobName) Chapter 22: How do you best deploy CMS according to your organization's needs, size, as Posting; and resources? //5. If 32: no Posting waspublish found, createdata? one Chapter How do you dynamic if (cmsPosting == null)
{ LiB ] [ Team //6. Grab the Template upon which to create the Posting // Cast the result of the Searches object as a Template Template cmsTemplate = cmsContextApp.Searches.GetByPath( "/Templates/botsconsulting/JobDetail") as Template; //7. Create a new Posting cmsPosting = CreateNewPosting(cmsChannel, jobName, cmsTemplate); } //8. Verify we have a Posting if (cmsPosting != null) • Table of Contents { Microsoft//9. Content Management Serverdata, 2002: Aby Complete Guide Set the Posting synchronizing the Start/Expiry // ,Olga dates. postings automatically published and ByBill English LonderThe , Shawn Shell, Toddare Bleeker , Stephen Cawood // expired together. cmsPosting.DisplayName = job.JobTitle.ToString(); cmsPosting.StartDate = job.JobPostingStartDate; Publisher: Addison Wesley cmsPosting.ExpiryDate = job.JobPostingExpiryDate; Pub Date: October 31, 2003 ISBN: 0-321-19444-6
//10. Grab the description placeholder HtmlPlaceholder cmsPlaceholder = cmsPosting.Placeholders["JobDescription"]
Pages: 1136
as HtmlPlaceholder;
//11. Set the description placeholder's content "This is// one of The those rare books you will read to learn about the want product caller willthat include everything that they to and keep rereading those that yousyndicated missed before." // to find show in tidbits this single Posting in this field —Gary cmsPlaceholder.Html Bushey, SharePoint Server MVP = job.JobDescription; Content//12. Management (CMS) is fast becoming a vital content-management tool that Submit Server the Posting helps administrators and developers the ever-increasing of content on their // This will kick off handle whatever workflow BOTS amount has decided Web sites. However, an authoritative source of product information has been missing . . . until // to implement for the user we authenticated with now. cmsPosting.Submit(); Microsoft Content Management Server 2002: A Complete Guide is the first book that explains //13. Commit all changes. If not explicitly called, the how to effectively unlock the power of CMS. Administrators and developers alike will learn how // disposition of changes is based upon to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and // RollbackOnSessionEnd API to manage content on the Microsoft platform. cmsContextApp.CommitAll(); } This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, //14. Dispose of the stand-alone the Publishing API, deployment options, site Application configuration, Context and template development. A cmsContextApp.Dispose(); running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: //15. Let the caller of the Web Service know the job succeeded return jobName + " successfully syndicated"; } catch(Exception Chapter 6: How eError) do you customize workflow? { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 //16. Write Error to File using Visual Studio .NET? LogErrorToFile(eError.Message.ToString()); Chapter 17:the Howcaller do you of establish user rights? know an error occurred //17. Let the Web Service return job + eError.Message.ToString(); } Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? } Chapter 32: How do you publish dynamic data?
parameter passed to this WebMethod function is of type Job Posting. That is the public [The Team LiB ] class that we created earlier in this chapter. When the caller invokes this AddChangeJob method of our Web Service, they will need to pass it a JobPosting object. With .NET this is easy. They simply create an instance of our public JobPosting class that is exposed to them, populate it with the data that they would like to syndicate, and then pass the instance as if they were calling a local component's method. Because the class has the [Serializable] attribute, the .NET Framework will automatically serialize the object as XML and transfer it to the Web Service where it will automatically be deserialized, and BOTS can use it as if it were a local object. All of the state that was present when the object was serialized will be back when it is deserialized. Frequently, this is referred to as deflating and inflating, or dehydrating and hydrating an object. Very cool. The jobName under comment 3 is of interest. Because CMS allows us to use a different DisplayName from the actual name of the Posting, we are using two pieces of information that the caller provides to create a name for the syndicated Posting that users won't see but has • Table of The Contents great utility for us. naming convention should keep the jobs sent to BOTS in uniquely Microsoft Content Management Server 2002: A Complete named Postings. Also, because CMS has a searchGuide that we can use to find specifically named assets, the naming convention provides us with a convenient ByBill English, Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood way to determine if we have created this Posting before. By naming the Postings in this way, we can also sort the PostingCollection by Name, assuming that BOTS might set this up with more companies than justPublisher: Woodgrove, yielding Addison Wesley a list of Postings ordered by ID within Employer. That could prove to be very helpful. Woodgrove will be sending us a GUID as an ID, so it is highly unlikely that Pub Date: October 31, 2003 anyone else would ever send the same ID, but it is feasible that as BOTS expands this service, ISBN: 0-321-19444-6 two companies could send Postings with the same ID. The naming convention protects us Pages: 1136 against that scenario by including the Employer in the name. However, this solution is not at all bulletproof. We obviously should do a lot more exception handling. For instance, under comment 6 we search for a hard-coded Template but we never "This is one rare books found that you will read to learn the product validate thatofit those was successfully before we create ourabout new Posting. Or ifand thekeep jobName rereading to findwe those tidbits you missed before." returns empty, proceed to that create a Posting with no name. We also don't do any bounds or —Gary SharePoint Server contentBushey, checking, so a malicious orMVP just careless partner could introduce potentially hazardous content (maybe voluminous garbage, maybe containing a script or some kind of hack, maybe Content Server (CMS) is fast becoming a vital content-management tool that spam, orManagement worse). helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information hascontain been missing . . .So, until The way it is set up right now, the JobDescription Placeholder will only plain text. no now. matter how elegant the content is that a client sends, our current Posting will present it with no frills. BOTS may want to consider changing the JobDescription Placeholder to allow for Microsoft Content Management Server 2002: A Complete Guide is the first book that explains FullFormatting. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform.
Step 10
This thorough reference explains the product architecture, then shows you how to create and We need oneand final [WebMethod]. If Topic BOTS coverage partners decide toCMS remove a job posting before or edit content use the workflow. includes administration and security, evenPublishing after it has expired, BOTS options, needs tosite reflect that deletion. DeleteJob WebMethod the API, deployment configuration, andThe template development. A code is explained with comments throughout. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: [WebMethod] public string DeleteJob(JobPosting job) { Chapter 6: How do you customize workflow? try { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Grab Visualan Studio .NET? //1. Authenticated Context in Update PublishingMode // using the GetAuthenticatedCmsApplicationContext function Chapter 17:Listing How do you // from 25-1establish user rights? CmsApplicationContext cmsContextApp = Chapter 22: How do you best deploy CMS according to your organization's needs, size, GetAuthenticatedCmsApplicationContext(PublishingMode.Update); and resources?
//2. Generate a consistent name for the Posting from data Chapter 32: How The do you publish dynamic data? // provided. resulting name will look something like:
// LiBWoodgrove.12345 [ Team ] string jobName = GenerateJobName(job.JobEmployer, job.JobPostingID); //3. Grab this existing Posting for syndicated deletion Posting cmsPosting = cmsContextApp.Searches.GetByPath( "/Channels/botsconsulting/careers/jobs/" + jobName) as Posting; //4. Check to see if the Posting was found, if it was delete it if (cmsPosting != null) { //7. Delete the Posting cmsPosting.Delete(); •
Table of Contents
Microsoft//8. Content Management Server 2002: A Complete Guide Submit the Posting
// ,Olga This will kick workflow BOTS ByBill English Londer , Shawn Shelloff , Toddwhatever Bleeker, Stephen Cawood
has decided // to implement for the user we authenticated with cmsPosting.Submit();
Publisher: Addison Wesley
//9.October Commit all Pub Date: 31, 2003
changes. If not explicitly called, the // disposition of changes is based upon ISBN: 0-321-19444-6 // RollbackOnSessionEnd Pages: 1136 cmsContextApp.CommitAll();
} //10. Dispose of the stand-alone Application Context "ThiscmsContextApp.Dispose(); is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, Server MVPWeb Service know the job succeeded //11. Let SharePoint the caller of the return jobName + " successfully deleted"; Content Management Server (CMS) is fast becoming a vital content-management tool that } helps administrators developers handle the ever-increasing amount of content on their catch(Exception and eError) Web sites. However, an authoritative source of product information has been missing . . . until { now.//12. Write Error to File LogErrorToFile(eError.Message.ToString()); Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how //13. Let the caller of the Web Service know an error occurred to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and return job + eError.Message.ToString(); API to manage content on the Microsoft platform. } } This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Build the PostJobToBOTS Web Service solution in VS.NET. Our Web Service is now complete. running example is used throughout the book to illustrate how important CMS features are Let's modify the Woodgrove Web site to consume it. implemented in real-world Web site development. Inside you'll find answers to such questions as: [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Consuming a Web Service If you haven't looked before, it may be helpful to see what a Woodgrove job posting looks like. Browse to the Careers section of the Woodgrove sample site. From anywhere on the Woodgrove site, we can choose Careers from the About Us menu option in the top navigation, or typing the following URL should get there: http://localhost/WoodgroveNet/About+Us/Careers/. A summary of existing job postings is shown. Clicking one of the postings should show a screen something like Figure 33-14.
Figure 33-14. Woodgrove job posting •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? At the top of the posting is the display name for the posting (Account Manager, in this Chapter 17: How do you establish user rights? example) followed by four fields: Job Title, Job Description, Qualifications, and Application Instructions (this section is not labeled). Click the Switch to Edit Site link and then click the Edit Howplaceholders do you bestthat deploy to These your organization's needs, size,in link toChapter see the22: actual areCMS beingaccording populated. placeholders are named and resources? the associated template in VS.NET. Chapter 32: How do WebMethod you publish only dynamic data? The BOTS AddChangeJob accepts a JobTitle and a JobDescription, so we will need to consolidate a few of these fields or leave off the content. We don't want the Posting to
incomplete, [beTeam LiB ] so we are going to concatenate the Woodgrove JobDescription, Qualifications, and ApplicationInstructions placeholder data into the single JobDescription field in the BOTS Web Service. When a Web Service is consumed, a proxy class is typically created that contains all the properties and methods that the Web Service exposes publicly. When the properties and methods on the proxy class are called, they handle the marshalling of the parameters into SOAP, sending the SOAP request over HTTP, receiving the response from the Web Service, and then unmarshalling the return value. In short, the proxy class will make the BOTS Web Service behave as if it were a local component. VS.NET makes creating this proxy class a snap.
Creating a Proxy Class to the Web Service Open the Woodgrove sample in VS.NET and right-click the References folder. Select Add and • Table of Contents then AddContent Web Reference from the2002: resulting pop-up menu. Microsoft Management Server A Complete Guide
In the Add Web Reference dialog (Figure 33-15), type the URL of the BOTS Web Service we built in the last section, ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood http://localhost/CmsJobsWebService/PostJobToBOTS.asmx, into the Address text box and press Enter. Publisher: Addison Wesley
Figure 33-15. Add Web Reference dialog
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: We can see the DeleteJob and AddChangeJob WebMethods, so this is the Web Service that we want. The JobPosting class is not a Web Method, so it is not listed, but it is also available for use from the Web Service. Click the Addworkflow? Reference button at the bottom of the dialog, and Chapter 6: How do you customize VS.NET will create a new folder called Web References in which the PostJob Web Service is loaded (Figure10: 33-16). Chapter How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Figure 33-16. Added Web Reference
Chapter 17: How do you establish user rights?
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
AddingPages: this 1136 Web Reference in VS.NET prepares the proxy class that we can use to refer to the Web Service public methods and objects locally, and the necessary code to interact with the actual Web Service will be created by VS.NET on our behalf. We simply need to refer to the proxy class methods and object. For instance, we will use localhost.Add ChangeJob(thisJob) to access the AddChangeJob Web Service. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Consuming the AddChangeJob Web Service
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle ever-increasing amount of content on Web their Remember, the requirements as depicted in the Figure 33-8 show that the AddChangeJob Web sites. However,isaninvoked authoritative of product information has been missing . . the . until Service WebMethod when asource Woodgrove job posting is approved. The stub for now. CmsPosting_Approved event can be found in the Woodgrove Global.asax file. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance scalability, flexibility, extensibility by in using CMS features NOTE:their UsingWeb the servers' events in the Global.asax file and is covered in depth Chapters 6 and and API to manage content on the Microsoft platform. 31. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and Global.asax template development. Locate and populate the CmsPosting_Approved function in the file with the A running example is used throughout the book to illustrate how important CMS features are following code: implemented in real-world Web site development. Inside you'll find answers to such questions as: protected void CmsPosting_Approved(Object sender, ChangedEventArgs e) Chapter 6: How do you customize workflow? { try { Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Grab Visualthe Studio .NET? that is being Approved //1. posting Posting cmsPosting = e.Target as Posting; Chapter 17: How do you establish user rights?
//2. Check if it in the Woodgrove channel Chapter 22: to Howsee do you bestisdeploy CMS according Careers to your organization's needs, size, if (cmsPosting.Parent.Name == "Careers") and resources? { //3. Grab the do object that dynamic will pass our data as XML to BOTS Chapter 32: How you publish data? localhost.JobPosting jobToPost = new localhost.JobPosting();
[ Team //4. LiB ] Populate the Employer and Posting characteristic fields jobToPost.JobEmployer = "Woodgrove Bank"; jobToPost.JobPostingID = cmsPosting.Guid.ToString(); jobToPost.JobPostingName = cmsPosting.Name.ToString(); jobToPost.JobPostingStartDate = cmsPosting.StartDate; jobToPost.JobPostingExpiryDate = cmsPosting.ExpiryDate;
//5. Grab the approved Postings Title placeholder and // populate the JobTitle to pass to BOTS using the Html // placeholder property HtmlPlaceholder cmsPlaceholder = cmsPosting.Placeholders["Title"] as HtmlPlaceholder; jobToPost.JobTitle = cmsPlaceholder.Html; //6. Table Grabofthe approved Postings JobDescription placeholder Contents variable cmsPlaceholder = cmsPosting.Placeholders["JobDescription"] ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood as HtmlPlaceholder; string jobDescription = cmsPlaceholder.Html + "
"; •
and assign its Html toA Complete a temporary Microsoft// Content Management Server 2002: Guide
Publisher: Addison Wesley
//7. Grab the approved Postings Qualifications placeholder // and append its Html to the temporary variable ISBN: 0-321-19444-6 = cmsPosting.Placeholders["Qualifications"] cmsPlaceholder Pages: as1136 HtmlPlaceholder; jobDescription += cmsPlaceholder.Html + "
";
Pub Date: October 31, 2003
//8. Grab the approved Postings ApplicationInstructions and that append Htmltoto theabout temporary "This is// one ofplaceholder those rare books you its will read learn the product and keep // to find variable rereading those tidbits that you missed before." = Server MVP —Gary cmsPlaceholder Bushey, SharePoint cmsPosting.Placeholders["ApplicationInstructions"] Content Management Server (CMS) is fast becoming a vital content-management tool that as HtmlPlaceholder; helps administrators and += developers handle the ever-increasing amount of content on their jobDescription cmsPlaceholder.Html + "
"; Web sites. However, an authoritative source of product information has been missing . . . until now. //9. Assign the temporary variable to the BOTS JobDescription jobToPost.JobDescription = jobDescription.ToString(); Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to //10. effectively unlock the powerobject of CMS.to Administrators and Web developers alike will learn how Create the proxy PostJobToBOTS Service to enhance their Web servers' scalability, flexibility, and localhost.PostJobToBOTS postJobToBOTS = extensibility by using CMS features and API to manage content on the Microsoft platform. new localhost.PostJobToBOTS(); This thorough reference explains the producton architecture, shows you how //11. Use the same credentials BOTS thatthen we are using in to create and edit content use the workflow. CMS administration // and Woodgrove. This isTopic but coverage one way includes to authenticate to the and security, the Publishing API, Service. deployment options, site configuration, and template development. A // Web runningpostJobToBOTS.Credentials example is used throughout the = book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions System.Net.CredentialCache.DefaultCredentials; as:
//12. Invoke the BOTS WebMethod to Add or Change a Job postJobToBOTS.AddChangeJob(jobToPost); Chapter 6: How do you customize workflow? } } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 catch(Exception eError) using Visual Studio .NET? { //13. Write Error to File Chapter 17: How do you establish user rights? System.IO.StreamWriter logFile = new System.IO.StreamWriter("C:ErrorLog.txt", true); Chapter 22: How do you best deploy CMS according to your organization's needs, size, logFile.WriteLine(eError.Message.ToString()); and resources? logFile.Close(); } Chapter 32: How do you publish dynamic data? }
[ Team LiB ]
We use the CmsPosting_Approved event rather than the CmsPosting_Approving event because we want to call the Web Service after the local posting has been successfully approved rather than before that processing begins.
Consuming the DeleteJob Web Service The requirements as depicted in Figure 33-9 show that the DeleteJob Web Service WebMethod is invoked when a Woodgrove job posting is deleted. The stub for the CmsPosting_Deleted event can be found in the Woodgrove Global.asax file. Locate and populate the CmsPosting_Deleted function in the Global.asax file with the following code:
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide By Bill English, Olga , Shawn Shell, Todd Bleeker, Stephen Cawood protected voidLonder CmsPosting_Deleted(Object sender,
ChangedEventArgs e) { Publisher: Addison Wesley try {Pub Date: October 31, 2003 //1. the posting that is being Approved ISBN:Grab 0-321-19444-6 Posting cmsPosting = e.Target as Posting; Pages: 1136
//2. Check to see if it is in the Woodgrove Careers channel if (cmsPosting.Parent.Name == "Careers") { "This is one of those rare books that you will read to learn about the product and keep //3. Grab the object that will pass our data as XML to BOTS rereading to find those tidbits that you missed before." localhost.JobPosting jobToPost = new localhost.JobPosting(); —Gary Bushey, SharePoint Server MVP //4. Populate the Employer and Posting characteristic fields Content Management Server (CMS) is fast becoming a vital content-management tool that jobToPost.JobEmployer = "Woodgrove Bank"; helps administrators and developers handle the ever-increasing amount of content on their jobToPost.JobPostingID = cmsPosting.Guid.ToString(); Web sites. However, an authoritative source of product information has been missing . . . until now. //5. Create the proxy object to the PostJobToBOTS Web Service localhost.PostJobToBOTS postJobToBOTS = Microsoft Content Management Server 2002: A Complete Guide is the first book that explains new localhost.PostJobToBOTS(); how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and //6. Use the same credentials on BOTS that we are here API to manage content on the Microsoft platform. postJobToBOTS.Credentials = System.Net.CredentialCache.DefaultCredentials; This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, //7. Commit the pending delete. This is only necessary the Publishing API, deployment options, site configuration, and template development. A because both CMS solutions hosted how on localhost and features are running// example is used throughout the book are to illustrate important CMS // there is a single CommitAll called implemented in real-world Web sitetransaction development.limit Insideper you'll find answers to such questions e.Context.CommitAll(); as:
//8. Invoke the BOTS WebMethod to Delete a Job Chapter 6: How do you customize workflow? postJobToBOTS.DeleteJob(jobToPost); } } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? catch(Exception eError) { Chapter 17: Error How doto youFile establish user rights? //9. Write System.IO.StreamWriter logFile = Chapter 22: How do you best deploy CMS according to your organization's needs, size, new System.IO.StreamWriter("C:ErrorLog.txt", true); and resources? logFile.WriteLine(eError.Message.ToString()); logFile.Close(); Chapter 32: How do you publish dynamic data? }
[} Team LiB ]
We use the CmsPosting_Deleted event rather than the CmsPosting_Deleting event because we want to call the Web Service after the local posting has been successfully deleted rather than before that processing begins. It is important to note that the code under comment 7 is required only if the two CMS solutions are running on the same server. This is due to the fact that CMS only allows for a single posting to be deleted for each CommitAll. So, near the end of the CmsPosting_Deleted event, just before we call the Web Service, we simply explicitly commit the local posting's uncommitted deletion. This way when we call the Web Service and attempt to commit that posting's deletion we don't end up trying to commit both of them at the same time. Build the modified Woodgrove solution in VS.NET. •
Table of Contents
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Testing the Web Service This is the fun part. We get to see it all working in unison.
Open the Two CMS Solutions 1. Open BOTS: Using IE, browse to the Job Offerings section of the BOTS Consulting Web site. From anywhere on the BOTS site, we can choose Careers from the top navigation • Table of Contents and subsequently choose Job Offerings from the left navigation, or typing the following Microsoft Content Management Server 2002: A Complete Guide URL should get there: http://localhost/botsconsulting/careers/jobs. If no other postings ByBill English , Olga Londer , Shawn Shell, Todd page Bleeker , Stephen Cawood have been added, this summary will look like Figure 33-6, shown earlier in this chapter. If you created the solution in your own site, pull up the Job Offerings summary page. Publisher: Addison Wesley
2.Pub Open In a second IE window, browse to the Careers section of the Date: Woodgrove: October 31, 2003 Woodgrove sample site. From anywhere on the Woodgrove site, we can choose Careers ISBN: 0-321-19444-6 from About Us menu option in the top navigation, or typing the following URL should Pages:the 1136 get there: http://localhost/WoodgroveNet/About+Us/Careers/. There should be a summary of postings based upon the Job Posting ASPX template under the Careers heading. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Create a New Woodgrove Job Posting —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web However, source of product hasdefault been missing . . until 1. sites. Click the Switchan to authoritative Edit Site link in the Web Authorinformation console of the page in.the jobs now. channel, unless the posting is already in Unpublished mode. Microsoft Management 2. ClickContent the Create New PageServer link. 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Locatetheir and click About Us Net link in the template gallery. by using CMS features and to3. enhance Web the servers' scalability, flexibility, and extensibility API to manage content on the Microsoft platform. 4. Locate the Job Posting ASPX template and click its Select icon. This thorough reference explains the product architecture, then shows you how to create and 5. content Enter aand job use title the like workflow. "Programmer into the first placeholder. edit TopicAnalyst" coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A 6. Enter a job description like "Proven development skills in .NET XML Web into running example is used throughout the book to illustrate how important CMSServices." features are the second placeholder. implemented in real-world Web site development. Inside you'll find answers to such questions as: 7. Enter qualifications like "Must know C#" into the third placeholder.
8. Chapter Enter "how to apply" information "Call us at 555-1212" into the fourth placeholder. 6: How do you customizelike workflow? 9. Chapter Click the10: Save New link. How doPage you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? 10. Since Woodgrove shows the name of the posting on their summary, we must give it a displayable Type Chapter 17:name. How do you"Programmer establish userAnalyst rights?Posting" into the Name text box. 11. Chapter Click OK 22: to dismiss (the Name automatically used as the Display Name How dothe youdialog best deploy CMSwill according to yourbe organization's needs, size, as well). and resources? 12. Chapter That will 32: fire How the code we publish wrote indynamic the CmsPosting_Approved, unless the channel requires do you data? that the posting be explicitly approved. If the new posting is still in a Saved state rather
12. than [ Team LiBa]Published state, click the Approve link. Our new Programmer Analyst Posting should be visible in the Woodgrove browser (Figure 3317), and if we refresh the BOTS site in the other browser, we will see it was syndicated here as well (Figure 33-18).
Figure 33-17. New Woodgrove posting
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and Figure 33-18.Topic Syndicated to BOTS summary and security, edit content and use the workflow. coverage includes CMS administration the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
View the Syndicated Content Aggregated in BOTS "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." 1. Click the Programmer AnalystMVP link in the BOTS Job Offerings summary, and we see that —Gary Bushey, SharePoint Server the detailed contents of the syndicated posting are even displayed (Figure 33-19). Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Figure 33-19. Syndicated to BOTS detail Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
2. 3.
2. Click [ Team LiBthe ] Switch to Edit Site link in the Web Author. 3. Scroll down and click the Page Properties link. The name of the posting will show that this posting was syndicated to BOTS from Woodgrove Bank. The Woodgrove GUID will be visible in the name too. 4. Click the Cancel button to dismiss the Page Properties dialog.
Change the Woodgrove Posting and Syndicate the Change
1. Toggle back to the Woodgrove browser. • 2. While still Table Contents onofthe Programmer Analyst Posting, click the Edit link in the Web Author. Microsoft Content Management Server 2002: A Complete Guide
Change theLonder Job Title placeholder "Programmer Analyst" By3. Bill English , Olga , Shawn Shell, Todd from Bleeker , Stephen Cawood
to "Programmer II."
4. Change the Qualifications placeholder from "Must know C#" to "Must know VB.NET." Publisher: Addison Wesley
5. Click the Save and Exit link in the Web Author. Pub Date: October 31, 2003
ISBN: 0-321-19444-6 6. Click the Approve link in the Web Author if the page didn't automatically go through Pages: 1136 approval.
7. Once the posting is in the Published state, toggle back to the BOTS browser. 8. Refresh BOTS browser (Figure "This is one ofthe those rare books that you33-20). will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Changes Syndicated to BOTS Figure 33-20. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Delete the Woodgrove Posting and Syndicate the Deletion Chapter 32: How do you publish dynamic data?
1.
[ Team LiB ] back to the Woodgrove browser. 1. Toggle
2. While still on the Programmer Analyst Posting, click the Delete link in the Web Author. 3. The system will prompt "Deleting this page will remove it permanently from the system. Continue?" 4. Click OK to continue. 5. The posting will be deleted, and the Woodgrove site will be returned to the Careers summary page. 6. Toggle back to the BOTS browser. 7. Click the Job Offerings link in the left navigation. •
Table of Contents
8. TheContent posting delete willServer have 2002: been Asyndicated to BOTS, Microsoft Management Complete Guide
and the summary will again look
like Figure 33-6.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary After coming to a complete understanding about the concepts of syndication and aggregation, we successfully created an entire sample Web Service that interfaces two independent CMS Web Properties. We called that Web Service from two events within the exiting Woodgrove sample site, syndicating the creation, alteration, and deletion of a posting in the BOTS Consulting sample site. The next part of the book focuses on performance from a monitoring and a capacity planning perspective. Because CMS dynamically generates all content returned to the user, this is a very important area of of CMS development. • Table Contents Microsoft Content Management Server 2002: A Complete Guide By Bill English [ Team LiB ,]Olga Londer,Shawn Shell,Todd Bleeker,Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part VIII: CMS Performance Chapter 34. Performance Planning Chapter 35. Performance Testing and Capacity Planning Chapter 36. Tips and Techniques [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 34. Performance Planning CMS has been designed to run large Web sites. In fact, it is large Web sites that benefit the most from the features of CMS. But this does not mean that CMS site designers can forgot about performance considerations. Most developers could easily write code that would bring any Web site to a crawl. The onus is on the site designers and developers to research performance questions so that they can produce the fastest pages possible. Performance is not something that is added to a Web site after it is finished. It is an essential part of the site design, development, and deployment. Consider performance at each stage of • Contents your project,Table and of you will save yourself an awful lot of effort. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Designing High-Performance CMS Sites Although you should consider performance in each phase of your CMS project, the design phase is certainly the most important. Designing a site with performance in mind will help you code and deploy a fast site.
ASP versus ASP.NET When you are planning your CMS site, one of the first decisions must be whether to use ASP or Table of Contents ASP.NET. Ultimately, the decision is based on many factors, but from a performance viewpoint, Microsoft Content Management Server 2002: A Complete Guide the advantages of ASP.NET are quite clear. •
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The most obvious benefit of ASP.NET is the new output caching mechanism. This new feature is provided within the ASP.NET framework. Output caching is discussed later in this chapter. Also, Publisher: Addison Wesley performs so well, most of the topics in this chapter will discuss considering that ASP.NET Pub Date: October 31, 2003 ASP.NET site considerations. ISBN: 0-321-19444-6 Pages: 1136
Caching The single greatest difference you can make in the performance of your code is your caching "This is one of those rare books that you will read to learn about keep strategy. If you are serious about performance, then you need tothe getproduct serious and about your rereading to findEarly thoseintidbits that site you design missedprocess, before."you should identify which parts of your caching design. your Web —Gary SharePoint MVP be cached. Generally speaking, you will want to cache site andBushey, which parts of eachServer page could the code that takes the longest to run. However, if you have a highly personalized site, you Content Management Server (CMS) fast a vital content-management toolthe that might not want to implement cachingis at all.becoming As with most decisions, you need to find helps administrators and developers handle the ever-increasing amount of content on their technological solution that best addresses your business needs. Web sites. However, an authoritative source of product information has been missing . . . until now. A number of different caching techniques are described in this chapter. You will need to balance these different caches (see Figure 34-1) according to the resources that you have available. For Microsoft Management Server 2002: A Complete Guideuse is the first book that explains example, Content both ASP.NET output caching and CMS node caching memory resources. In how to effectively unlock the power of CMS. Administrators and developers alike learn how general, you will want to use output caching on as much of your site as possible. will However, if to enhance their scalability, and extensibility by want using to CMS features you cannot fit all Web your servers' most popular pagesflexibility, in the output cache, you will ensure that and you API to manage content on the platform. allocate sufficient resources to Microsoft the CMS node cache. There is no easy rule to follow. You will have to test your site to find the appropriate balance. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Figure 34-1. CMSsite 2002 caching architecture the Publishing API, deployment options, configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
For more information about caching, refer to "Best Practices for Improving MCMS Web Site Pages: 1136 Performance" in the MCMS 2002 documentation.
The Working Set
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The term "working set" is used to refer —Gary Bushey, SharePoint Server MVP to the set of pages that are most frequently accessed. This group of pages usually accounts for roughly 80% of the site traffic. For this reason, caching the working set results in the performance gain across the site. tool that Content Management Server (CMS) is greatest fast becoming a vital content-management helps administrators and developers handle the ever-increasing amount of content on their The default configuration for ASP.NETsource output of caching is information to use up tohas 60% of total physical Web sites. However, an authoritative product been missing . . . until memory. Using this configuration, a CMS server with 1GB of physical RAM can store roughly now. 2,500 pages in the output cache. Of course, this number is significantly influenced by the size of the pages. If your working set is larger than youGuide may want consider dedicating Microsoft Content Management Server 2002: A 2,500, Complete is thetofirst book that explains some testing to determine the size of these pages. Once you have done this, you canlearn target the how to effectively unlock the power of CMS. Administrators and developers alike will how "heavy" pages and tryservers' to scalescalability, them down. Refer to and the CMS partner by page to enhance their Web flexibility, extensibility using CMS features and (http://www.microsoft.com/cmserver/partners) for information about companies that offer API to manage content on the Microsoft platform. products that perform these types of tests. This thorough reference explains the product architecture, then shows you how to create and If you find that having trouble getting your working into the cache, should edit content andyou useare thestill workflow. Topic coverage includes CMS set administration and you security, consider increasing the server's options, memorysite or partitioning your site across multiple CMS servers. the Publishing API, deployment configuration, and template development. A This topic is discussed later in this chapter. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Another key point to mention is that the size of the output cache does not significantly affect as: performance. This means that you can safely increase the resources allocated to the output cache without worrying that this in itself will negatively affect performance. The ASP.NET Chapter How do you output caching6:mechanism is customize intelligent workflow? enough that this is not a concern. As long as increasing this memory allocation is not starving other systems of memory, then it is a good use of your Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 resources. using Visual Studio .NET? Chapter 17: How do you establish user rights?
ASP.NET Output Caching
Chapter 22: How do you best deploy CMS according to your organization's needs, size, As mentioned already, caching is your best way to increase performance. The next point to and resources? consider is that ASP.NET output caching is the most effective caching mechanism. Output Chapter 32: How that do you dynamicWoodgroveNet data? caching is so effective the publish output-cached site performance is over 400% better than the WoodgroveASP site.
[Since Team LiB ] output caching is implemented within the .NET Framework, this technique ASP.NET obviously applies only to ASP.NET pages. However, it is so effective that it's worth considering migrating to ASP.NET purely to use this feature. Figure 34-2 shows the impressive impact of output caching.
Figure 34-2. WoodgroveNet with .NET output caching and WoodgroveASP with ASP fragment caching
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint This chart is dramatic, but itServer is alsoMVP important to show the results when pages are served from outside the cache. This is referred to as a "cache miss." Figure 34-3 shows what happens when Content Management Server (CMS) is fast becoming a vital content-management tool that cache misses increase. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Figure 34-3. .NET output cache ratio now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? by cache misses. When a cache miss The tests show that performance is seriously affected occurs, quite often it results in a trip to the database and also a write to the CMS node cache.
work [This Team LiBis]considerably slower than simply serving the cached HTML. The reason that output caching is so effective is that it is the first operation that the server attempts. If the HTML for the page is cached, it is not necessary to do any other calculations. The cached HTML is simply sent to the browser client. It is possible to cache entire pages or fragments of pages. Performance is obviously optimized if the whole page is cached. However, the decision about how to implement this method of caching will be determined by your business requirements. For example, you may have some legal information displayed on your site. If your business requires that this data is always up to date, it may be that it can never be cached. In this case, you would not be able to output cache the entire page. Partial-page caching is also an important means of using output caching. For example, you could choose to only cache your navigation controls. Whether you cache the whole page or just part of the page, a number of custom settings are available. For example, you can set the cache lifetime. You can also set some CMS-specific properties such as "vary by cms role". This allows you toTable cache the page content based on the role of the user who is accessing the site. • of Contents Microsoft Content Management Server 2002: A Complete Guide
For more information about output caching, refer to the MCMS documentation, the WoodgroveNet sample site, and the ASP.NET documentation.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
ASP Fragment Pub Date: OctoberCaching 31, 2003 ISBN: 0-321-19444-6
If you Pages: are not running an ASP.NET site, then your best bet is to implement ASP fragment 1136 caching. CMS provides a built-in mechanism for doing this, but there are other choices. For example, if you are running Microsoft Commerce Server (CS) 2002, you might decide to use the CS LRU cache instead of the CMS fragment caching mechanism. "This is one of those rarein books that fashion you willto read to learn aboutcaching. the product and keep Fragment caching works a similar ASP.NET output The idea is to compile rereading to findand those tidbits you missed before." pieces of HTML then servethat these from memory instead of compiling them each time they —Gary Bushey, SharePoint MVP are needed. Of course, ASP Server fragment caching can be used on any site since it does not require
the ASP.NET framework or ASPX pages. Content Management Server (CMS) is fast becoming a vital content-management tool that helps and developers handlecaching the ever-increasing amount of site. content on their Figureadministrators 34-4 shows the benefit of fragment on the Woodgrove ASP Web sites. However, an authoritative source of product information has been missing . . . until now.
Figure 34-4. Fragment caching on the WoodgroveASP site
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
The following example shows howdynamic fragment caching is implemented in ASP code. For a Chapter brief 32: How do you publish data? more thorough example of this, refer to the WoodgroveASP sample site available on MSDN.
[ Team LiB ] Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
CMS Node Cache Publisher: Addison Wesley
If a Pub page is October not available Date: 31, 2003via output caching or fragment caching, CMS will have to assemble the HTML. maximize the performance of this assembly process, CMS has a number of its ISBN:To 0-321-19444-6 own caching strategies. Only a couple of these caches are discussed here since many of them Pages: 1136 are not meant to be configured by users. Refer to Chapter 3, CMS Architecture, for more details about these caches. The performance of the CMS server is highly dependent upon its customized caching strategies. "This is one of those of rare books thatCMS you node will read to learn aboutcache the product keepvarious The most prominent these is the cache. The node is used and to store rereading to find those tidbits that you missed before." types of data—for example, the channel structure, the template gallery items, and the —Gary Bushey, SharePoint Server MVP placeholder content. Content Server (CMS) is itfast vital content-management tool that Since theManagement node cache is so important, canbecoming easily be aadjusted by CMS administrators. To helps administrators the ever-increasing amount of click content theirtab configure this cache, and opendevelopers the Serverhandle Configuration Application (SCA) and the on Cache Web sites. However, anallows authoritative source productofinformation has been missing . . . until (seeFigure 34-5). This you to alter theof number nodes in the node cache. now.
Figure 34-5. Cache settings in the Microsoft Content Management Server 2002: A Complete Guide is theSCA first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? As mentioned previously, you do not want to blindly increase this number. The more nodes you
in LiB the ]CMS cache, the less memory there is available for output caching. You will need to [have Team find the right balance. Refer to the next chapter for information about CMS performance counters. These counters can help you find the right balance for your available resources.
Disk Cache The other cache that can be configured in the SCA is the disk cache. The disk cache stores data that would otherwise have to be retrieved from the CMS database. To minimize the trips to SQL Server, these files are cached on the server's hard drive. The combination of this cache and the inherent performance of SQL Server is so effective that SQL Server is rarely the performance bottleneck for a CMS site. This is true even when a significant number of CMS servers are accessing a single SQL Server. More often, the CMS server CPU is simply not able to keep up with the writes to all the appropriate caches. •
Table of Contents
To make use of this cache, you must have sufficient disk space available on your CMS server. Do not set the disk cache size so high that the server could run out of empty space. One By Bill English, Olga Londer Shellis , Todd Bleeker , Stephen Cawood recommendation from,Shawn Microsoft to keep the Internet Information Services (IIS) logs on a different drive from the CMS disk cache. This is one example of how disk space can be freed up for use by CMS. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Template Design Considerations Pages: 1136
CMS template design almost equates to CMS performance design. If your templates are designed well, it is straightforward to deploy a high-performance CMS site. If your template performs poorly, then you may find that you have to spend substantial time tweaking your "This is and one adding of those rareresources books thattoyou will read to learn about the product and keep caches more your deployment. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint MVP trade-offs have to be made between offering increased When you are creating CMSServer templates, flexibility and increased performance. Just as in any other Web site, the fastest templates are Content Server (CMS)of is code fast becoming vital content-management thatsite, the onesManagement that run the least amount and serveathe least amount of data. Ontool a CMS helps administrators and developers handle the ever-increasing amount of content on their placeholders are used to store content, but each added placeholder also requires more code to Web sites. However, authoritative source of have product has been missing . . . of until run. The fastest CMS an templates are those that fewinformation placeholders with small amounts now. data. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Placeholder Data to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. The amount of data in placeholders has a significant effect on the performance of CMS pages. This thorough reference explains the product architecture, then Web shows youthe how to create and But this is a very straightforward principle. Just as in any other site, more data you edit and use workflow. Topic coverage administration and security, sendcontent to the client, thethe slower the page will render. includes For CMS CMS users, it is key to remember that the PublishingdoAPI, options, site configuration, andCMS template development. A placeholders notdeployment nullify this principle. A well-administrated site will include guidelines running example is used throughout the book to illustrate how important CMS features for authors about the size and type of content that can be included on a particular page.are Since implemented in real-world sitemore development. find answers to such questions image placeholders usuallyWeb contain data thanInside HTMLyou'll placeholders, the type of placeholder as: can also have an affect on performance. Make sure that your template design decisions include this consideration. Chapter 6: How do you customize workflow? Another issue with large amounts of placeholder data is that caching is no longer as effective. You may save time compiling HTML, but this savings can be negated if the cached HTML is so Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 large that transferring it across the wire takes a long time. Figure 34-6 demonstrates how using Visual Studio .NET? throughput is affected as the size of placeholder data increases. In this test, each line of content contained 36 characters. Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according your organization's needs, size, Figure 34-6. Placeholder sizetoperformance and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Number Pages: of 1136Placeholders Placeholder data is an important factor, but the number of placeholders is also important. All too often, site developers give in to pressure from their authors and try to build the ultimate template. The with trying to you please with about one template is that end up "This is one of problem those rare books that willeveryone read to learn the product andyou keep with so many placeholders that youyou significantly degrade performance. Each placeholder that rereading to find those tidbits that missed before." you addBushey, requiresSharePoint the serverServer to fetchMVP and render more content. This clearly increases the —Gary amount of code that the server must execute. Content Management Server (CMS) is fast becoming a vital content-management tool that Of course, there are other considerations. You not want to create too of many templates, helps administrators and developers handle thedo ever-increasing amount content on their because this leads to an many different problems. Some sites find that has afterbeen years of running their Web sites. However, authoritative source of product information missing . . . until CMS system, they have produced so many templates that site management becomes awkward. now. The trick is to find a balance between performance and flexibility. CMS 2002 provides the ability to create Content your ownManagement placeholders. A custom placeholder may allow to significantly decrease Microsoft Server 2002: A Complete Guide is you the first book that explains the number of placeholders your of template. how to effectively unlock theon power CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Microsoft has suggested that theplatform. number of placeholders—on each template—under API to manage content on thekeeping Microsoft 100 is important. Although each site has its own performance goals, this is an awful lot of placeholders. you find explains that you the are product using more than 20 placeholders on ahow page, take This thorough If reference architecture, then shows you to then create anda step content back and consider what you really need is another template. edit and use theif workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Figure 34-7 shows number of placeholders affectshow performance the features site. running example ishow usedthe throughout the book to illustrate importantofCMS are implemented in real-world Web site development. Inside you'll find answers to such questions as: Figure 34-7. Placeholder number performance Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Postings and Other CMS Containers CMS containers are virtual structures. For example, you will not find anything resembling the CMS channel structure within your file system. Based on this architecture, CMS containers must "This is one of those rare books that you will read to learn about the product and keep be inflated from the database and cached on the server. These operations take time and are a rereading to find those tidbits that you missed before." significant factor in the performance of a CMS site. Fortunately, there are ways to mitigate this —Gary Bushey, SharePoint Server MVP performance hit. A well-designed CMS site will not suffer from this issue. Content Management Server (CMS) is fast becoming a vital content-management tool that The solution is quite simple. Make sure that all your CMS containers are organized in a helps administrators and developers handle the ever-increasing amount of content on their distributed hierarchy. When it comes to adding channels, template galleries, resource galleries, Web sites. However, an authoritative source of product information has been missing . . . until and user roles, divide your container content into well-proportioned trees. Microsoft has now. suggested that you should keep your container content to less than 300 items. The most important case of this rule is the root level of the container trees. Figure 34-8 illustrates this Microsoft Content Management Server 2002: A Complete Guide is the first book that explains point. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Figure 34-8. Performance of platform. navigation code based on postings in a API to manage content on the Microsoft
single container This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
In addition the number of items in your containers, consider the depth of your trees. Rather ISBN: to 0-321-19444-6 than having few deep trees, divide your containers into trees that balance both depth and Pages: 1136 width. If you have to make a choice, depth is preferential to width. Figure 34-9 shows the results of deep channel structures.
34-9. Posting "This is one of thoseFigure rare books that you will readdepth to learnperformance about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
CMS Resources
Chapter 17: How do you establish user rights?
CMS resources have many benefits. They allow a single file to be easily used in many places Chapter 22: How However, do you best deploy according your organization's needs, size, and by many authors. just as in CMS any other Web to site, resource files should be used and resources? carefully. These files generally comprise a significant portion of the data downloaded to the Web browser client. Resources can be any sort of file. However, for simplicity's sake, image Chapter 32: How do you publish dynamic data? files will be used as the default example.
resources [CMS Team LiB ] are the files stored within a CMS resource gallery. If you add a file directly to a template or add a file directly within a placeholder, then these files are not managed by CMS. Management has advantages but it also comes with a performance implication. This impact can be mitigated by caching your resources. If all your CMS resources are cached, they will behave just like resources on any other Web site. Refer to the earlier section about adjusting the size of your CMS disk cache. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Developing High-Performance CMS Sites This section discusses optimizing performance when you are coding CMS sites. In the previous main section, we already touched on the importance of writing efficient code for site navigation. Now we will cover other issues that CMS developers need to be mindful of when writing code for CMS templates.
Navigation •
Table of Contents
Effective navigation is clearly essential to any Web site. However, making navigation effective and making it perform well may be conflicting goals. But this is the pessimist's view of the By Bill English , Olga Londer Shell , TodditBleeker , Stephen Cawood question; another way,Shawn to think about is that navigation is an excellent opportunity to improve the performance of your templates. A little time spent tweaking your navigation code can result in a large difference in your performance numbers. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley Date: 2003 of your site design, the major factor to consider when you think JustPub like anyOctober other31, aspect about navigation is how much work you are doing. For example, if you include many different ISBN: 0-321-19444-6 types of navigation on every page, then you will be running more code than if you were to pick Pages: 1136 and choose between different navigation options. You may decide that the most popular pages in your working set should have less navigation code than other pages.
The WoodgroveNet sample site uses a number of different types of navigation. On most pages, "This is one of those rare books that you will read to learn about the product and keep there is a standard tree control on the left, a tab-style navigation across the top, and a rereading to find those tidbits that you missed before." breadcrumb control just below the tabs. But this is a small site. If some of the pages could not —Gary Bushey, SharePoint Server MVP fit in the output cache, then it would be important to consider whether all these controls were necessary on all pages. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Once you have narrowed down which controls are required on each page, the next Web sites. However, an authoritative source of product information has been missing . . . until consideration is how much code is being run for each control. The most obvious example of this now. point is the tree control. If your channel structure is deep, it could take some time to render the control. This is true even if you are only displaying the current level of the tree. The key to Microsoft Content Management Server 2002: A Complete Guide is the first book that explains using tree navigation is to use lazy enumeration. Lazy enumeration is the practice of only how to effectively unlock the power of CMS. Administrators and developers alike will learn how compiling the HTML that is necessary to display at any given time. When the WoodgroveNet left to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and navigation control was originally built, it did not use lazy enumeration. This raised a flag during API to manage content on the Microsoft platform. the CMS performance testing, and the control was quickly revised to only enumerate the channels that are expanded. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Once you have run the minimum amount of code required to render your navigation controls, the Publishing API, deployment options, site configuration, and template development. A make sure that you run this code as few times as possible. Unless your navigation changes running example is used throughout the book to illustrate how important CMS features are based on factors such as personalization, you will probably find that caching your navigation implemented in real-world Web site development. Inside you'll find answers to such questions results in a substantial performance benefit. Figures 34-10 and 34-11 show the importance of as: caching your navigation controls. Chapter 6: How do you customize workflow? Figure 34-10. Navigation performance
without caching
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003
Figure 34-11. Navigation performance cached
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
CMS PAPI Searches
Chapter 6: How do you customize workflow?
Not all CMS PAPI searches are created equal. For example, if you want to search your whole Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 site for a particular posting, then a GUID search will be the fastest. The reason for this is quite using Visual Studio .NET? simple: When searching for a GUID, CMS goes directly to the node table and retrieves the object. Other searches, such searching by rights? path, require processing before the object's GUID Chapter 17: How do youas establish user is found. Once the GUID is found, the GUID search is performed. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Not all searches require the same amount of processing; one search in particular must be and resources? handled with care. This is the custom property search. There are good and bad uses for this tool. Consider the How case do of meta information. Many sites use custom properties to store Chapter 32: you publish dynamic data? metadata. This information is then used for various purposes. Figure 34-12 illustrates what
if you [happens Team LiB ] try to use this information to find postings across an entire site. This is a poor use of custom property searches.
Figure 34-12. Custom property search performance
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Custom property searches are not inherently flawed. They can be used efficiently and very "This is oneIfofyou those rare booksperformed that you will read to learn about product and keep property effectively. have already a different search, thenthe you can use custom rereading to afind thosesample. tidbits that you missed before." searches on smaller For example, if you want to find all the postings that contain a —Gary SharePoint Server certain Bushey, custom property value, firstMVP narrow down the search by keeping all these postings within a certain channel. A GUID search can be used to retrieve the channel, and then a custom Content (CMS) is fast becoming a vital content-management that property Management search can beServer used to go through the postings in that channel. Based on tool the previous helps administrators and developers the ever-increasing amount of content on their information, this would narrow down handle the postings searched to less than 300. This same Web sites. However, an authoritative source of product information has been missing . . . until principle should be applied to searching for channels. now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains [ Team LiB ] how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Deploying High-Performance CMS Sites The architecture of your site can have a substantial impact on the performance of your pages. However, it is worth noting again that this is not the best place to start your performance planning. Only after you have optimized all the other areas of your design should you then consider how to improve the performance of your deployment. This game plan will result in the best-performing site with the least amount of hardware and the simplest deployment architecture.
Table of Contents Dedicated Hardware
•
Microsoft Content Management Server 2002: A Complete Guide By Bill of English Olga Londer , Shawn Shell Todd Bleeker Cawoodof One the ,most obvious ways to ,increase the,Stephen performance
your CMS deployment is to use dedicated hardware. Although you could run other applications, such as SQL Server, on the same machine as the CMS server, this is clearly not the best strategy. Publisher: Addison Wesley Pub Date: October 31, 2003 is that having other applications running on the CMS server will make Another point to consider your performance testing much more complicated. As the various applications compete for ISBN: 0-321-19444-6 resources, Pages:there 1136 could be a number of permutations of resource usage that are difficult to diagnose. With a dedicated CMS server and a dedicated SQL server, it is much easier to get reliable performance numbers.
"This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits that you missed before." ScalingtoUp —Gary Bushey, SharePoint Server MVP
You may not feel that it is important for your site to scale, but will this be true in the future? Content Management Server is fast becoming a vital content-management tool that Someday, you may need the (CMS) added flexibility that performance scaling offers. "Scaling up" is helps administrators and developers handle the ever-increasing amount of content their the process of maintaining performance as you increase the number of CPUs withinon your CMS Web sites. However, an scaling authoritative source product information has Rather been missing . . . until server. In the long run, up could saveofyou money on hardware. than adding now. another machine, you could save time and money by adding another processor to your CMS server. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock to the powerthat of CMS. Administrators and developers will learn how However, it is important realize adding processors will not result in aalike linear increase in to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features performance. If you go from one processor to two, you might not see a 100% increase in and API to manageBut content on the platform. performance. you may notMicrosoft require that sort of increase. If you are just under your performance goals, adding an extra processor may be a good solution. This thorough reference explains the product architecture, then shows you how to create and edit content use thethe workflow. coverage includes CMSThe administration andbeen security, Figure 34-13and illustrates scale-upTopic results for WoodgroveNet. numbers have the Publishing API, deployment options, site configuration, and template development. adjusted so that both cached and uncached results start with a value of one. The actualA running example is used throughout book to illustrate how important CMSthan features are throughput for cached pages on one the processor was over seven times greater for uncached implemented in real-world Web site development. Inside you'll find answers to such questions pages. The throughput for eight processors showed a difference of almost five times. as:
Figure 34-13. CMS scale-up results Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Scaling Out Pages: 1136
"Scaling out" is the process of maintaining performance across a server farm. CMS servers support this type of clustering; because of this, CMS is able to run extremely large Web sites. For example, Microsoft has recently deployed dynamic CMS sites on Microsoft.com. To see an "This is one of those rare books that you will read to learn about the product and keep example, you can navigate to http://www.microsoft.com/cmserver. This is the first of many rereading to find those tidbits that you missed before." scheduled CMS deployments across Microsoft.com. It would certainly not be possible to run a —Gary Bushey, SharePoint Server MVP site that gets as much traffic as Microsoft.com without using a scale-out model. Even a static Web siteManagement would not beServer able to(CMS) handleissites this sizeaifvital theycontent-management had to run on a singletool server. Content fast of becoming that helps administrators and developers handle the ever-increasing amount of content on their Clustering is achieved using load balancing. As client requests hit the sites, they first go to the Web sites. However, an authoritative source of product information has been missing . . . until load balancer and then are routed to the Web server that is best able to serve the request. now. There are two flavors of load balancing: software load balancing and hardware load balancing. Software load balancing, such as Windows Network Load Balancer, is often the cheaper of the Microsoft Content Management Server 2002: A Complete Guide is the first book that explains two options. However, hardware load balancing is able to handle a much greater load. Make how to effectively unlock the power of CMS. Administrators and developers alike will learn how sure that you investigate your scalability, needs before you invest either option. 34-14 shows and the to enhance their Web servers' flexibility, andinextensibility by Figure using CMS features benefits of scaling a CMS many machines. API to manage content onsite theacross Microsoft platform. This thorough referenceFigure explains 34-14. the product architecture, thenresults shows you how to create and CMS scale-out edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Note that deploying CMS servers in a cluster is also important in cases where failover and Pub Date: October 31, 2003 reliability are among the top priorities. If your Web site must be running all the time, then you ISBN: will need to 0-321-19444-6 have at least two CMS clusters. Refer to the Microsoft deployment white paper for Pages: 1136 more information.
Site Partitioning
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." It is unlikely that most sites will need to worry about partitioning. However, if your performance —Gary Bushey, SharePoint Server MVP requirements cannot be met by scaling up and scaling out, you will need to partition your site over multiple CMS server clusters. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Partitioning a site can provide many performance benefits. Obviously, a smaller working set Web sites. However, an authoritative source of product information has been missing . . . until means that more pages in the set can be cached. Also, the principle of dedicated hardware now. applies because you are dedicating hardware not only to CMS but to specific parts of your site. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains A candidate for site partitioning would be one with extremely high traffic and a very large how to effectively unlock the power of CMS. Administrators and developers alike will learn how working set. Microsoft points out that a server using the maximum of 4GB of memory might be to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and able to cache a working set of 10,000 pages. If your site happens to have a working set of API to manage content on the Microsoft platform. 20,000 pages, then you may need to divide your site into two clusters. Each cluster would contain half of reference the Web site pages. Keep in mind that this site would likely hundreds of This thorough explains the product architecture, then shows youhave how to create and thousands of pages and would constitute one of the largest Web sites in the world. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented real-world Web site development. Inside you'll find answers to such questions Authoringinand Performance as:
CMS servers are most efficient when many read and few write operations are occurring. This is, of course, the 6: most pattern for any Web site. However, you may find that Chapter Howpopular do youusage customize workflow? authoring on your CMS server is affecting performance to an unacceptable degree. The best possible deployment scenario to separate your CMS servers into an authoring Chapter 10: How do you is develop for Microsoft Content Management Serverenvironment, (CMS) 2002 a test environment, and a production environment. For added security, the production tier is using Visual Studio .NET? generally the only one that is accessible across the Internet. Chapter 17: How do you establish user rights? Having a dedicated authoring environment allows you to bundle your content updates into regular deployment packages theaccording impact totothe production tier. The mostsize, Chapter 22: How do you and bestminimizes deploy CMS your organization's needs, obvious of this is the many caches that are affected by authoring. When CMS authors andexample resources? change content, they are invalidating the many caches on the server. This is particularly Chapter 32: How do you publish dynamic data? important for coarse caches such as the ASP.NET output cache.
in mind the impact to caching, you can imagine how writing to the CMS server can [Keeping Team LiB ] substantially impact your performance. Not only are you performing writes to the database, but then this data must be written into the many caches on the system. Even so, it is quite possible that authoring against your production tier will still leave you within acceptable performance limits. There are administrators running large CMS sites who are comfortable with the performance and security implications of authoring on their production tier. One of the main factors in this decision is how important it is to have updates go live immediately. News sites, for example, may find that their business needs conflict with their desire to improve performance by caching content. They may accept that their authors will be constantly updating and creating pages. But this is their business and therefore is their most important consideration.
Authentication Module Table of Contents
•
Microsoft Content Management Server 2002: A Complete Guide
Authentication is the action of identifying a user. This action, just like any other, carries with it a performance implication. The test results in Figure 34-15 demonstrate that CMS sites experience roughly a 10% performance improvement when the CMS authentication module is removed from the web.config file.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley
Pub Date: October 31, 2003
Figure 34-15. Authentication module removal
ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are The obvious question is, when module be Inside removed safely? remove your implemented in real-world Webcan sitethis development. you'll find Only answers to such questions authentication module if your entire site is available to the CMS guest user. If you have as: portions of your site that are meant only for specific users, you will need the authentication module in order to identify these users. Chapter 6: How do you customize workflow? If you require authentication for part of your site and still want to take advantage of this performance you can consider partitioning your site across different CMS 2002 Chapter improvement, 10: How do you develop for Microsoft Content Management Server (CMS) servers. This would allow.NET? you to remove the module from the cluster that does not require using Visual Studio authentication. Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, Read-Only versus Read/Write CMS Sites and resources?
UsingChapter the CMS32: SCA, it is easy to dynamic change adata? CMS site from read/write to read-only. As How doquite you publish mentioned in Chapter 3, when a CMS server is in read-only mode, roughly 90% of interaction
theLiB database is through stored Structured Query Language (SQL) procedures. An example [with Team ] of this is a read-only CMS server caching CMS pages. When the server is writing—such as creating new CMS pages—approximately 50% of database queries are ad hoc server queries and the other 50% are stored procedures. The fact that so much of the processing is happening through stored procedures adds up to roughly a 10% performance increase over read/write sites. Also, a performance increase comes from not having any cache flushes occurring.
CMS Background Processing CMS background processing is responsible for cleaning up CMS servers. For example, performance of a CMS server is increased by the fact that background processing will remove deleted items from CMS SQL Server database. These items include CMS pages, channels, • Table of the Contents and resources. background processing allows better performance Microsoft Content Removing Managementthese Serveritems 2002:during A Complete Guide during authoring and keeps the database size as small as possible. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Background processing has been significantly improved in CMS 2002. Almost all the work has been moved to the SQL Server. This provides a significant performance gain for the CMS Publisher: Addison Wesley server. However, it does not mean that background processing has no performance impact. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 If a browser client requests content that is cached, the CMS server will continue to serve this content as normal. If, on the other hand, the content needs to be retrieved from the CMS Pages: 1136 database, then there could be a performance hit. The reason for this is that the CMS server might be contending with background processing for the SQL Server resources. Based on this, your CMS server performance will be optimized if you run background processing during your lowestistraffic "This one ofperiod. those rare books that you will read to learn about the product and keep
rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP [ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Network Latency Just like any other Web site, CMS sites are affected by the performance of their network. Network latency is the delay caused by data moving across your network architecture. This topic is outside the scope of this book, but it is important to realize that your network latency can impact your CMS server performance. There are a few points that can easily be noted here. Microsoft advises that CMS performance will be best when the CMS server is on the same network switch as the database server. Keep in mind that security measures, such as firewalls, can also impact your network performance. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
IIS Performance As you know, CMS is not a Web server. The pages sent to a browser client are all coming from IIS. Based on this fact alone, it is important to ensure that your IIS server is optimized for performance. Keeping this in mind, you can make some CMS-specific changes that will provide performance gains. The best candidate for IIS performance gains applies only to read-only sites. As mentioned earlier, the best deployment scenario for CMS performance is to separate the authoring servers from the production servers. If your site is deployed in this architecture, you will also be able to set your production servers to be read-only. As mentioned earlier, simply setting the server to • Table of Contents read-only will result in a performance However, Microsoft Content Management Server 2002:gain. A Complete Guidegiven this scenario, you have an additional option. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
If your CMS server is running as read-only, it is possible for you to remove one of the CMS ISAPI filters. The Resolution HTML Packager filter is only used when CMS authors are Publisher: Addison Wesley comparing different historical versions of content. If your site is read-only, you can safely Pub Date: 31, 2003 remove thisOctober filter and benefit from a small increase in performance. ISBN: 0-321-19444-6
The filter can be removed from within the Internet Information Services Manager. From this Pages: 1136 interface, go to your Web site properties. Once there, you can click on the ISAPI Filters tab and remove the filter. [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
SQL Server Performance Contrary to what many people think, SQL Server is seldom the bottleneck on a runtime CMS site. One SQL Server can easily handle a significant Web farm of CMS servers. Make sure that you have investigated other performance tuning options before you start to spend a great deal of effort trying to optimize your database. You may find that your time is better spent investigating your caching plan or the efficiency of your templates. There is one scenario where SQL Server could be stressed by a CMS site. This is when a lot of authoring is occurring at the same time as a lot of traffic. With this in mind, you need to remember a Table few key points about optimizing your CMS SQL Server database. The most • of Contents important point Management is that you Server will improve performance if you dedicate a SQL Server Microsoft Content 2002: A your Complete Guide machine to your CMS database. SQL Server is able to handle a tremendous load, so this may ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood not be required, but it is certainly the first consideration when you are contemplating this topic. If you are using your SQL Server for many databases, then you should consider how you will Publisher: Addison Wesley prevent resource contention issues. For best performance, the SQL Server databases should be Pub Date:from October 31, transaction 2003 separated their logs. This separation should occur across different physical drives.ISBN: 0-321-19444-6 Pages: 1136
SQL Server performance is a broad topic and will not be discussed in depth in this book. Refer to the SQL Server documentation for a more thorough discussion of this topic at http://go.microsoft.com/fwlink/?LinkId=9512. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." [ Team LiB ] —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Security and Performance As with most design topics, security and performance can often be conflicting goals. If you protect your entire CMS site with a protocol such as Secure Sockets Layer (SSL), you will certainly incur a performance penalty. To mitigate this impact, you should carefully consider which parts of your site require such security mechanisms. For example, most CMS sites will only use SSL for their login page. If you do decide to use SSL with your CMS pages, keep in mind that any data on the page will be encrypted before it is sent across the wire. This includes both text and image data. To maximize your performance, • Table of Contents make sure that the SSL-protected pages are light (i.e., few graphicsContent and asManagement little text as possible). Microsoft Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
For more information about secure Web sites, refer to the security chapters in Part IV of this book and to article Q247658, "Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication," in the Microsoft Knowledge Base Publisher: Addison Wesley (http://msdn.microsoft.com/library/default.asp?url=/library/enPub Date: October 31, 2003 us/dnnetsec/html/SecNetch04.asp). ISBN: 0-321-19444-6 Pages: 1136
[ Team LiB ]
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary Learning about CMS-specific issues is important when considering the performance of your CMS Web site deployment. In this chapter, a number of vital considerations have been discussed. Performance testing, on the other hand, is very similar to testing any other Web site. There are many resources out there that can help you with testing the performance of your CMS site. When you are designing any site, it is important to test and test often. The same holds true for performance testing a CMS site. The next chapter covers Transaction Cost Analysis (TCA). You can apply the techniques that you have learned in this chapter to the TCA for your site. Here is a summary of performance • Table of Contents considerations. Microsoft Content Management Server 2002: A Complete Guide ByBill English , Olga Shell, Todd Bleeker , Stephen Cawood Ensure thatLonder your ,Shawn CMS servers have ample physical memory.
Windows 2003 Advanced Servers can use up to 4GB of RAM. Making more memory available can be the fastest, cheapest, and easiest way to increase your performance.
Publisher: Addison Wesley Pub Date: October 31, 2003 Clarify your working
set and ensure that these pages are cached. The next chapter will provide information about how to define the working set on your site. ISBN: 0-321-19444-6 Pages: 1136
Minimize the frequency of cache flushes caused by content updates. Make sure that your CMS template code is as efficient as possible. "This Use is one of those rare booksthat that isyou will read to learn the product and keep a container hierarchy neither too wide norabout too deep. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVPon a template. Each additional placeholder adds more Limit the number of placeholders code to the template. Content Management Server (CMS) is fast becoming a vital content-management tool that helps Limit administrators and the ever-increasing amount content on their the amount of developers data in yourhandle placeholders. Just as in any other of Web site, you want to Web sites. However, source of product information has been missing . . . until keep your pagesanasauthoritative light as possible. now. Use PAPI searches wisely; GUID searches are the fastest. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how [ Team LiB ]their Web servers' scalability, flexibility, and extensibility by using CMS features and to enhance API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 35. Performance Testing and Capacity Planning Although it is important to have specific performance knowledge about CMS when you are designing a CMS site, it is not as important to have such knowledge when you are testing the site. Performance testing for CMS sites is much the same as testing any other ASP or ASP.NET Web site. It is remarkable how often performance planning is neglected during the Web site planning Table of Contents phase. Quite often it is an afterthought. At the end of the process, when the site is completed, Microsoft Content Management Server 2002: A Complete Guide it is deployed to the production environment and only then tested for performance. This is a ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood recipe for disaster. When planning your CMS site project, make sure to schedule performance tests at a stage when you will actually be able to resolve any issues that are found. Do not make the mistake of running your first tests when you are already rushing to meet impending Publisher: Addison Wesley deadlines. •
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 The previous chapter discussed how to build high-performance CMS sites. This chapter discusses how to create your performance goals and how to test your results. The key message Pages: 1136 of this chapter is "test early and test often."
[ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Performance Goals At the start of your CMS project, you should have the performance goals nailed down. This gives everyone in the Web design and coding process a realistic chance to succeed. If you do not provide specific goals, you are not giving your people a chance. The only thing worse than not having targets is increasing the expectations near the end of the project. Keep in mind that your Web site is designed and coded based on the original numbers. If someone changes those numbers, it could result in a substantial redesign. Creating your performance goals should be a scientific process. If you are already running a Web site andTable you of want to move that Web site to CMS, then you have the data that you require • Contents to createContent your goals. SimplyServer check yourA Web site Guide statistics and base your performance goals on Microsoft Management 2002: Complete these numbers. On the other hand, if you are creating a site from scratch or making major ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood alterations, the task is far more involved. Of course, there is a paradox when you try to estimate your initial performance goals. The Publisher: Addison Wesley closer the testing environment gets to your final site, the more complex the simulation Pub Date: 2003 you will compromise the efficiency of your test by spending too much becomes. AtOctober some31, point, ISBN: 0-321-19444-6 time creating the setup. In other words, the closer the simulation gets to the actual site, the Pages: 1136 less time you save doing the prototype. At some point, you may as well wait for the site to be finished. Nonetheless, this initial testing should be done. Have your developers mock up the best prototype possible. This will give you some confidence that your initial numbers are well founded. "This is one of those rare books that you will read to learn about the product and keep How you determine your performance forbefore." a new site is a business question. However, rereading to find those tidbits that you goals missed there are a number of things that you can do to help nail down realistic goals. Based on the —Gary Bushey, SharePoint Server MVP requirements of your site, you can prototype features and then do some performance tests. These tests can be used to help calculate performance to meet yourtool business Content Management Server (CMS) is fastthe becoming a vitalnecessary content-management that needs and your budget. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until The following are some of the factors that you should consider when creating your performance now. goals. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Site Traffic API to manage content on the Microsoft platform.
This is the most common interpretation of performance. Web developers often talk about how This thorough reference explains the product architecture, then shows you how to create and many "hits" the site can handle. Although the term is used to describe a number of different edit content and use the workflow. Topic coverage includes CMS administration and security, counting techniques, the principle idea is the same. The intent is to define the number of people the Publishing API, deployment options, site configuration, and template development. A who can simultaneously surf the site and still have a decent user experience. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Obviously, this is one of the most important considerations, but it certainly does not give you as: all the information that you require to draft your performance goals. Do not convince yourself that this one measurement will encompass all your performance needs. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Authoring using Visual Studio .NET?
Regardless of 17: whether separate your production Chapter How you do you establish user rights? and authoring environments, the number of authors you support will still be a consideration. You may have different performance goals for each environment, you best will want both your site visitors andorganization's your authors needs, to havesize, a Chapter 22: How but do you deploy CMS according to your pleasant experience. and resources? QuiteChapter often, the performance of CMS sites is neglected. Make sure that your 32:"design-time" How do you publish dynamic data? performance tests include some sort of realistic authoring cases.
[ Team LiB ]
Usage Profile How your site is used can be as important as how much your site is used. Later in this chapter we will discuss how usage profiles are used in performance testing. If you do not take this into consideration, you could find that most of your traffic is heading to your slowest pages. This will substantially skew your performance numbers.
Applications The type of code that you run on your site will dramatically affect how quickly you can serve pages. In fact, this is probably the single greatest consideration that you have the power to • Table of Contents change (other than telling people not to visit your site). Microsoft Content Management Server 2002: A Complete Guide
Many sites ,offer some ,sort ofShell personalization theirCawood visitors. By Bill English Olga Londer Shawn , Todd Bleeker,for Stephen
This is an example of an application that you may wish to run. The action of checking which user is viewing your site will cost you CPU cycles. Other examples include integration with back-end systems and code that makes your Addison Web more Publisher: Wesleyvisually interesting. One example of this is DHTML menus. They may lookPub cool, but they are adding work to the client browsers. Date: October 31, 2003
ISBN: 0-321-19444-6 The balance that you will search for is the amount of functionality that you can offer your users Pages: 1136 and still keep their interest. If you do not offer them anything, then they might get bored. But if you try to give them too much, your site could slow to a crawl. It is not always easy to find balance. You need to do performance testing and usability testing so that you can make an educated decision. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Budget
Content Management Server (CMS) is fast becoming a vital content-management tool that Given administrators an unlimited budget, virtually any sitethe could meet any performance But is not helps and developers handle ever-increasing amount ofgoals. content onthis their the world we livean in.authoritative Your performance will most likely be has constrained by your Web sites.that However, sourcegoals of product information been missing . . . until hardware budget. now.
Just as with any other bugs, fixing performance problemsGuide early in project save you a Microsoft Content Management Server 2002: A Complete is your the first bookwill that explains tremendous amount of time and money. According to Steve McConnell's Code Complete how to effectively unlock the power of CMS. Administrators and developers alike will learn how (Microsoft 1993), "Microsoft's application division has found that takesCMS 3 hours to find to enhancePress, their Web servers' scalability, flexibility, and extensibility by itusing features and and to fixmanage a defect content using code inspection...and 12 hours to find and fix a defect using testing." Test API on the Microsoft platform. your site early and test it often. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Time running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Time is often the trump card in arguments about project plans. You may simply have to as: concede that your performance is partially dependent upon the amount of optimization that can be done within the time that you are allotted. The last chapter discussed how you could save time in your performance tuning by starting early in the project plan. Design your site with Chapter 6: How do you customize workflow? performance in mind. Do not try to add it all at the end. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 [ Team LiB Visual ] using Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Performance Testing This section discusses how you can hunt down any potential problems. Also, as previously discussed, performance testing will be necessary if you want to draft realistic performance goals. Ideally, you will include performance testing in the development of each component within your site. Whether it is your personalization code or your navigation, you should test it to see if it performs well enough to be included in the final version of your site. •
Table of Contents
Performance Counters
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In the area of performance testing, the best new feature of CMS 2002 is the performance counters. Performance counters allow you to monitor various values as you run your Publisher: Addison performance tests.Wesley Although these performance counters are not the most useful ones for Pub Date:your October 31, 2003 calculating performance numbers, they are very useful when you are diagnosing problems. ISBN: 0-321-19444-6 Pages: 1136
Table 35-1 shows the complete list of performance counters provided in MCMS 2002. For more information about how to set up and use performance counters, refer to MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en"This is one of those rare books that you will read to learn about the product keep us/cpguide/html/cpconmonitoringaspnetapplicationperformance.asp). You canand also refer to the rereading to find those tidbits you missed before." CMS help topic "Measuring andthat Testing Site Performance" for more information about CMS—Gary SharePoint Server MVP specific Bushey, considerations. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Table 35-1. Performance Counters Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock Counts the power of CMS. Administrators and developers alike will learn how Counter Description to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Active Number of active These are the COM nodes created as each request is API to manage content on the Microsoft platform. Enterprise (AE) MCMS COM objects processed. Each request will generate many COM This thorough explains architecture, then shows howare to then create and Node objects reference on the server the product objects in the AEServer object,you which edit content and use the workflow. Topicdestroyed coverage includes CMS administration as the processing completes.and Thissecurity, counter the Publishing API, deployment options, site and template development. A is a configuration, snapshot of the number of COM objects active at running example is used throughout the any bookone to illustrate importantof CMS time and how is a reflection the features amount are of implemented in real-world Web site development. you'll findthe answers such questions processingInside activity within MCMSto server. as: In itself this does not provide a direct gauge of performance;however, high values would Chapter 6: How do you customize workflow? demonstrate a very active MCMS site. If the site is underperforming, this value can be decreased by Chapter 10: How do you develop for Microsoft Content Management (CMS) 2002 using techniques such as caching Server the navigation using Visual Studio .NET? controls, which in turn could improve performance. Chapter 17: How do you user rights?but this provides the average activity over AE Node objects Number of establish AE As above, created/sec Node objects time. Chapter 22: How do you deploy CMS according to your organization's needs, size, created perbest second and resources? Chapter 32: How do you publish dynamic data?
[ Guest Team sessions LiB ]
Number of guest sessions on the server
This is the number of current connections to the MCMS server that are authenticated as a Guest user. This is more for informational purposes than to adjust performance, although it could be used to identify peaks of activity.
Guest sessions opened/sec
Number of guest sessions opened per second
As above, but this provides the average activity over time.
Authenticated sessions
Number of authenticated sessions connected to server
This is the number of current authenticated connections to the MCMS server.
This is more for informational purposes than to adjust performance, although it could be used to identify • Table of Contents peaks of Guide activity. Microsoft Content Management Server 2002: A Complete By Bill English, Olga Londer , Shawnof Shell, Todd Bleeker , Stephen Authenticated Number As above, butCawood this provides
sessions opened/sec
authenticated sessions opened Publisher: Addison Wesley per second
the average activity over
time.
Pub Date: October 31, 2003
Edit sessions Authoring or ISBN: 0-321-19444-6 development Pages: 1136 sessions connected to server
This is the number of current authenticated connections to the MCMS server that are in Edit mode.
This is more for informational purposes than to adjust performance, although it could be used to identify "This is one of those rare books that youpeaks will read to learn Edit about the product and keep of activity. activity on an MCMS server can rereading to find those tidbits that you missed have abefore." significant impact on performance. —Gary Bushey, SharePoint Server MVP Edit sessions Number of As above, but this provides the average activity over Content Management Server (CMS) is fast becoming a vital content-management tool that opened/sec authoring or time. helps administrators and developers handle the ever-increasing amount of content on their development Web sites. However, an authoritative sessions opened source of product information has been missing . . . until now. sessions opened second Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively theofpower of CMS. Administrators and will learn how ISAPI sessions unlock Number Internet Provides the number of developers connectionsalike currently in the to enhance their Web servers' flexibility, extensibility using CMS features and Server API scalability, (ISAPI) MCMS ISAPIand filter performingbyURL transformations. If API to manage content on the Microsoft sessions opened by platform. you have a high number of these, it may mean that server the URL transformation is taking a long time, which This thorough reference explains the product then shows you create and may architecture, be adjusted by increasing the how nodetocache size. edit content and use the workflow. Topic coverage includes CMS administration and security, ISAPI sessions of ISAPI Tellsconfiguration, you how many connections are opened per the Publishing API, Number deployment options, site and template development. A opened/sec opened the second the MCMS ISAPI filter. CMS Provides the number running example is sessions used throughout book toin illustrate how important features are per second of URL requests MCMS second. implemented in real-world Web site development. Inside to you'll findper answers to such questions as: Master cache Number of items in Number of nodes in master cache. This is limited by nodes internal MCMS the node cache size set in the SCA. If this value is master cache less than the setting in the SCA, then this is an Chapter 6: How do you customize workflow? indication that all requested MCMS nodes are Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 currently cached. If this value is close to or above the using Visual Studio .NET? value in the SCA, then this is an indication that the setting in the SCA is not high enough to allow all Chapter 17: How do you establish user rights?nodes to be cached. requested Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Shared Team LiB ] nodes
Shared nodes created/sec
Number of items/nodes referenced by server, including master cache items
This value is related to the number of master cache nodes; however this value will reflect multiple versions (e.g., checked in and checked out) of the same master node.
Shared nodes created per second
This is a reflection of the increase in size of the node cache as new nodes are cached. If the master node cache value is close to or above the value in the SCA and this value is high, then this is a clear indication that objects are being moved into and out of cache, which will lower performance.
of cache hits • Cache hits/sec Table of Rate Contents
A high value here relative to the following value use of cache.
on master cache implies an effective Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Cache misses/sec
Rate of cache misses on master cache
A high value here relative to the preceding value implies an inefficient cache setting.
Publisher: Addison Wesley
Pubaccess Date: October 31, 2003 Data Number of data operations/sec access operations ISBN: 0-321-19444-6 executed per Pages: 1136 second
This is the count of accesses to the SQL Server database. A high value could imply one of several things: The node cache value may be too small; the resource cache may be too small; or there is a need to cache search results.
Exceptions Number of This is informational and provides a count of "This is one of thoseexceptions rare books that youexceptions will read tothrown. learn about product and keep over thrown thrown If thisthe is increasing rapidly rereading to find those tidbits that you missed by server time, itbefore." could indicate problems on the server or in —Gary Bushey, SharePoint Server MVP the code base. Content Serverof(CMS) becoming a vital content-management tool that NumberManagement of Number open is fast This is informational and provides an indication of the helps administrators and developers amount of content on their MCMS MCMS applicationhandle loadthe on ever-increasing the MCMS server. It includes all current Web sites. However, an authoritative source of product information has been . . until connections connections connections to the MCMS server at a missing point in .time. It now. includes the ISAPI connections plus all other connections. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Measuring Performance API to manage content on the Microsoft platform.
How thorough you determine yourexplains performance numbers determinesthen how shows realistic those This reference the product architecture, you hownumbers to createwill andbe when you deploy your site to the Web. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A There are three steps to creating a performance test. First, you need to create a realistic usage running example is used throughout the book to illustrate how important CMS features are profile. Next, you create test scripts, and finally, you run your test scripts. The following implemented in real-world Web site development. Inside you'll find answers to such questions subsections discuss each of these steps. as: 6: How do you customize workflow? StepChapter 1: Create a Usage Profile Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Your usage profile will be used as the game plan for your stress testing. Without the profile, using Visual Studio .NET? you cannot be sure that you are focusing on the right portions of your site. For example, you may have a section of your site that is used frequently but performs worse than the rest of the Chapter 17: How do you establish user rights? site. You will want to ensure that you address the performance issues for these pages. Usage profiles will be22: discussed more detail later in this chapter. Chapter How doinyou best deploy CMS according to your organization's needs, size, and resources? For more information about a usage profile, refer to "Creating a Usage Profile for Site Capacity Planning" (http://go.microsoft.com/fwlink/?LinkId=9508). Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Step 2: Create a Test Script There are different tools that you can use to stress your site. The most popular tool is Microsoft Application Center Test (ACT). This tool is designed to simulate load on your Web site. Once you have created a usage profile, you will have a good idea of the URLs that will get hit in each visit. Hitting these URLs with a stress tool will give you performance numbers for each visit. You can either record a test script or programmatically create a test script. For more information about ACT, refer to this URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/act/htm/actml_main.asp.
Step 3: Use a Stress Tool to Run the Script against Your Site •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Running the stress tool against your site will give you the opportunity to use performance needs, but typical Web site stress tests measure CPU usage and ASP.NET (or ASP) requests.
By Bill English , Olga Londer , Shawn , Toddwill Bleeker , Stephen counters. Which counters youShell record depend uponCawood your business
Addison Wesley For Publisher: more information about throughput, refer to "Understanding Performance Testing" (http://go.microsoft.com/fwlink/?LinkId=9511). Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Usage Profiles Creating realistic usage profiles is fundamental to effective performance testing. A usage profile "This is one of thoseofrare that youbehavior will readwhile to learn the product and keep is a representation yourbooks site visitors' theyabout are surfing your site. rereading to find those tidbits that you missed before." —Gary Bushey, Server Generally, usageSharePoint profiles consist of MVP the following information: Content Management Server (CMS) is fast becoming a vital content-management tool that sessionand length of the user helps Average administrators developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. List of pages visited
TotalContent numberManagement of pages visited in a2002: session Microsoft Server A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Frequency which each scalability, page is visited to enhance their at Web servers' flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. You will not need to model all these parameters, but you will need to accurately model pages that are hit and the frequency with theyarchitecture, are hit. This thorough reference explains thewhich product then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Average Session Length running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: "Session" is a word that is far too overloaded. In the context of usage profiles, think of a session as a unique visit from a user. One user may have many unique visits to a site. As the user surfs around the site, their one session might involve hitting many pages. Within those 6: elements How do you customize workflow? pagesChapter are many that can access many files. For example, one site might contain pieces cached in memory or various images from your hard drive. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? The average session length represents the average number of minutes from the start of a
user's visit to the end of the visit. You will need to use your IIS logs to gather information Chapter 17: How do you establish user rights? about the length of each session. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Pages Visited
Chapter 32: How do you publish dynamic data?
views [Page Team LiB ]define the way that users surf a Web site. You can check your IIS logs to see the URLs for the pages that are being accessed the most.
Number of Pages Tracking the number of pages visited will allow you to create usage profiles that match your users. By looking at how many pages are surfed, you can create stress scripts that include the appropriate number of URLs. If you have statistics for the average session length, you can use this number and the number of pages visited to calculate the frequency of page visits.
FrequencyTable of Page Visits • of Contents Microsoft Content Management Server 2002: A Complete Guide
This is important because it indicates how quickly your By Bill statistic English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
users navigate through your site. If you have a lot of content on your pages, you may find that users spend some time before moving on to the next page. However, if your users click rapidly through pages, then youPublisher: would want toWesley consider this when creating your usage profiles. Addison Pub Date: October 31, 2003
[ Team LiB ]
ISBN: 0-321-19444-6
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Web Usage Statistics There are numerous tools and services available for interpreting Web site usage. If you want to do this work yourself, you can use your IIS logs to compile the information that you require. The goal of performance testing is to plan for peak periods on the Web site. Generally, site operators consider peak to be three times their normal load. With this in mind, you should try to gather usage statistics from a period long enough that it includes periods that are as close to your peak usage as possible. After having done this, you can identify a peak period and use those numbers for your testing. Typically, a sample of a day is used. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Page Requests
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
To get pages per second, you might want to record a script using ACT. Then open the script Wesley andPublisher: take outAddison any redirects. In other words, leave in URLs like Pub Date: October 31, 2003 http://localhost/mysite/default.htm. But, on an ASP site, you would want to take out anything like http://localhost/mysite/. The reason for this is that this URL is simply a redirect and does ISBN: 0-321-19444-6 not correspond Pages: 1136to a page hit. However, on an ASP.NET site, you would not want to have a URL like http://localhost/mysite/ right next to the URL http://localhost/mysite/default.htm. These two URLs are equivalent, and therefore one of them could be considered a redirect. Having done this, you can use your "This is one of those rare books that you will read to learn about the product and keep performance counters to calculate pages per second. Once you have warmed up the site by rereading to find those tidbits that you missed before." running the test for a few minutes before you start to record, ASP.NET (or ASP) requests per —Gary Bushey, SharePoint Server MVP second will equal pages per second. This is a rough method, but it generally works well. Content Management Server (CMS) is fast becoming a vital content-management tool that We have now completed our discussion of one of the main methods of performance testing a helps administrators and developers handle the ever-increasing amount of content on their Web site: prototype modeling. This method involves running tests on hardware similar to the Web sites. However, an authoritative source of product information has been missing . . . until production environment and on applications that model your production code. now.
In summary, the way to use this method is to create a test environment as close to your Microsoft Content Management Server 2002: A Complete Guide is the first book that explains production environment as possible. Then you would create your usage profile, simulate this how to effectively unlock the power of CMS. Administrators and developers alike will learn how profile using a stress tool, and determine the throughput of the profile in pages per second. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Based on this, you can extrapolate the number of concurrent users that your site can support. API to manage content on the Microsoft platform. You can use rules of thumb like 30 seconds per click per user, or you can use the statistics in your usage profile. Once you have all this information, you can take your throughput and divide This thorough reference explains the product architecture, then shows you how to create and it by the number of clicks for each user. For example, if your site renders 100 pages per second edit content and use the workflow. Topic coverage includes CMS administration and security, and your users click 1 page per second, then you could support 100 concurrent users. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are We will now move on to the other popular strategy for performance testing: Transaction Cost implemented in real-world Web site development. Inside you'll find answers to such questions Analysis (TCA). as: [ Team LiB ] Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Transaction Cost Analysis The Transaction Cost Analysis methodology is used to provide mathematical calculations for capacity planning. You can also use TCA principles to find performance bottlenecks on your site. Each operation is isolated and examined. Remember that creating accurate usage profiles is the first step to successful TCA analysis. The benefit of this paradigm is that you do not have to model your environment the same way that you would using the prototype modeling approach. TCA is far more granular and therefore more flexible. For example, it may allow you to test on hardware that is not the same as your performanceTable environment. • of ContentsFurthermore, you will be able to modify things like your usage profiles without having to run any2002: new Atests. Microsoft Content Management Server Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Once you have initial values for your TCA analysis, you will be able to use them for future changes to your site. Rather than analyzing the entire site, you can focus purely on the sections that have changed. Publisher: Addison Wesley
Octoberof 31,this 2003 For Pub theDate: purposes chapter, we are using the example of CPU utilization. However, the ISBN: 0-321-19444-6 TCA principles can be applied to other costs. For example, you might want to analyze the performance of your SQL Server machine or the memory usage of your Web server. Pages: 1136
For more information about the TCA methodology, refer to the following articles: "This "Using is one of those rareCost books that you to learn about the product and keep Transaction Analysis forwill Siteread Capacity Planning," rereading to find those tidbits that you missed before." http://go.microsoft.com/fwlink/?LinkId=9509. This article provides a hands-on guide to —Gary Bushey, Server MVP that you read this paper before you read the rest of this using TCA. SharePoint We highly recommend
chapter. Content Management Server (CMS) is fast becoming a vital content-management tool that helps "Capacity administrators handle the ever-increasing amount of content on their Modeland for developers Internet Transactions," http://go.microsoft.com/fwlink/?LinkId=9507. Web sites. However, an authoritative product information has been missing . . . until This article provides an overviewsource of the of TCA methodology. now. CMS 2002 white paper "Transaction Cost Analysis and Capacity Planning for MCMS 2002." Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Page Cost Strategy API to manage content on the Microsoft platform. This thorough reference the productin architecture, then how create and is the strategy that explains we will be exploring this chapter. Theshows reasonyou that we to will use this edit content and the workflow. CMS administration security, method is that it use is the most reliableTopic way coverage to test theincludes performance of a CMS site.and Depending on the API, your deployment site configuration, template development. A if you yourPublishing business and site, youoptions, may decide to use one of and the other strategies. But even running throughout book tocost illustrate important CMS do, pageexample cost will is beused a useful test for the you. Page is thehow easiest because thefeatures tests areare implemented in real-world site development. Inside you'll to such straightforward. You use a Web stress tool and record the results of find one answers page. There isn'tquestions much that as: can go wrong with this strategy.
Since you have already read the TCA paper listed earlier (you did read it, right?), you have Chapter 6: How you customizevarious workflow? seen the example of ado site performing "operations." In our discussion, you can equate these operations with page cost. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Using Page toyou Test Youruser CMS Site Chapter 17:Cost How do establish rights? 22: How doidentified you best for deploy CMS the according to your needs, size, BasedChapter on the page types the site, following tablesorganization's can be produced. These and resources? numbers are based on the fictitious BOTS Consulting site. How do you publish Each Chapter of these 32: tables represents a pagedynamic from thedata? usage profile. After using the performance
to ]gather the cost of each page, you then average out the cost and calculate the total [counters Team LiB cost of the site. What we will now do is create three scripts that hit each page individually. The scripts will be executed such that the processor will be at or near 85% utilization. Keep in mind that most sites try to run their production machines at about 35% utilization. This allows them to scale to a peak load of three times the normal traffic. We are using 85% for these tests to check the performance near the peak load. Having run these scripts, we will record the CPU utilization and the pages-per-second throughput. Tables 35-2 through 35-4 illustrate the CPU cost for each of the three pages that we are testing. We gather this information by running an ACT script against the URL for the page and then recording the Windows performance counter for CPU utilization.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Table 35-2. Page 1: Home Page
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Measurement
Value
Publisher: Addison Wesley
CPU Pubusage Date: October 31, 2003 ISBN: 0-321-19444-6
Throughput
Pages: 1136
0.80 (MHz) 100 (pages per second)
Table 35-3. Page 2:learn Case Study "This is one of those rare books that you will read to about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Measurement Value Content Management Server (CMS) is fast becoming0.85 a vital content-management tool that CPU usage (MHz) helps administrators and developers handle the ever-increasing amount of content on their Throughput 150information (pages per has second) Web sites. However, an authoritative source of product been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Table 35-4. Page 3: Article to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Measurement Value This thorough reference explains the product architecture, then shows you how to create and edit CMS administration and security, CPUcontent usage and use the workflow. Topic coverage includes 0.90 (MHz) the Publishing API, deployment options, site configuration, and template development. A Throughput 200 (pages per second) running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Calculating Users Based on CPU Capacity
Chapter How doofyou customize workflow? Calculating the6:number users that your site can support is one of the key aims of performance testing. In fact, this one measurement is often the catalyst for all performance Chapter 10: How you develop Microsoft Content Management Server (CMS) by 2002 testing. The formula fordo calculating CPUfor capacity is the number of processors multiplied the using Visual Studio .NET? megahertz rating of the CPU. Chapter 17: How do you establish user rights? CPU capacity = (number of processors) x speed Chapter 22: to How do you isbest accordingThis to your organization's size, The next number calculate thedeploy target CMS CPU capacity. will determine yourneeds, goal for CPU and resources? capacity. You will need to determine what you think your target should be. A value of 80% is often used because it allows some room in case your usage spikes for some period of time. For Chapter 32: How do you publish dynamic data? example, if your site happened to be mentioned by some large news site, you might find that
need that [you Team LiB ] extra 20% of capacity. Target CPU capacity = CPU capacity x .80 It is then a simple matter to determine how many simultaneous users you are able to support on one machine. User capacity = target CPU capacity / Web CPU cost per user
Cost Table for Pages Once you have numbers for each page, you can create a table such as Table 35-5. For this example, we are using fictitious numbers for the BOTS Consulting site, with one 1,000MHz processor.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
The total CPU cost for each page is calculated with this formula:
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Total CPU cost = (CPU usage x number of processors x CPU speed)/requests per second For Publisher: example: Addison Wesley Pub Date: October 31, 2003
Page 1 total CPU cost = (0.01 x 1 x 1,000)/110 = 0.09 ISBN: 0-321-19444-6
Pages: 1136
Using Usage Profiles for TCA Now we know cost of individual Based we canand addkeep in the page "This is one of the those rare books thatpages. you will read on to our learnusage aboutprofile, the product distribution Table 35-6. Thisbefore." determines how much of the traffic we expect rereading tonumbers, find thoseshown tidbitsinthat you missed each page to carry. —Gary Bushey, SharePoint Server MVP For this example, we will continue toisuse numbers performance testing the Content Management Server (CMS) fastfictitious becoming a vital from content-management toolon that BOTS Consulting site. We will use these numbers to demonstrate how to calculate the user helps administrators and developers handle the ever-increasing amount of content on their capacity forHowever, a CMS site. will also assume the Web server has one 1,000MHz Web sites. an We authoritative source that of product information has been missingprocessor. . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how 35-5. Total CPU Cost for and Each Page in to enhanceTable their Web servers' scalability, flexibility, extensibility bythe usingProfile CMS features and API to manage content on the Microsoft platform.
per CPU Usage then shows Total CPU This thorough referenceRequests explains the product architecture, you how to Cost create and Pages Second (MHz) (MHz/Request) edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing options, site0.80 configuration, and 7.27 template development. A Page 1: HomeAPI, deployment 110 running example is used throughout the book to illustrate how important CMS features are Page implemented in real-world Web site development. Inside you'll find answers to such questions as: Page 2: Case 120 0.85 7.08 Study 6: How130 do you customize workflow? PageChapter 3: Article 0.95
7.31
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
35-6.user Distribution Chapter 17: How doTable you establish rights?
of Traffic
Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ] Posting Operation
Distribution
Page 1
50%
Page 2
30%
Page 3
20%
Total
100%
Next we can take our numbers from the CPU cost table (Table 35-5) and add in the data about the distribution of the load (Table 35-6). This gives us the cost of the particular usage profile, shown in Table 35-7.Table 35-8 shows the result of calculating the pages-per-second cost of the distribution profile. As we learned earlier in this chapter, once you have all this information, you can take your • Table of Contents throughput and Management divide it by Server the number clicks for each Microsoft Content 2002: A of Complete Guide
user. In this example, our site renders roughly 111 pages per second. If our users click 1 page per second, then we could support 111 ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood concurrent users. Remember that your usage profile could include the rate that your users are clicking through Publisher: Addison Wesley your site. If we found that our IIS logs indicated that the average session length was ten Pub Date: October 31, 2003 minutes and the average pages per session was 20, then the click rate would be 0.017 pages ISBN: per 0-321-19444-6 per second user. Based on this rate, we could support 6,517 concurrent users (110.79 Pages: 1136 pages per second / 0.017 pages per second per user). Now that you have these numbers for a 1,000MHz processor, you could change the processor power to 2,000MHz. Without running any new tests, you would know that you would be able to support 13,034 concurrent users. Youyou could yourabout user profile distributions and "This is one of those rare books that willalso readalter to learn the product and keep calculate the resulting your performance numbers. And finally, you could change the rereading to find thoseeffect tidbitson that you missed before." code onBushey, one page and then Server just test the new page. You would not have to run all the other —Gary SharePoint MVP page tests again. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
Table 35-7. CPU Cost for Distribution Profile
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Pages Distribution Profile CPU Cost for Profile to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Home Page 50% 7.27 x 0.5 = 3.635 This thorough you how to create and Case Study reference 30%explains the product architecture, 7.08 then x 0.3 shows = 2.124 edit content and use the workflow. Topic coverage includes CMS administration and security, Article 20% 7.31 x 0.2template = 1.462 development. A the Publishing API, deployment options, site configuration, and running example is used throughout the book to illustrate how important CMS features are Total 100% Web site development. Inside 7.221 implemented in real-world you'll find answers to such questions as: Chapter 6: How do you customize workflow? Table 35-8. CPU Cost
of Profile
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Server CPU Target CPU Web CPU Cost for Profile Pages/Second for Profile
1,000 1,000 .80you = 800 7.221 Chapter 17: Howxdo establish user rights?
110.79
Chapter [ Team LiB ] 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Troubleshooting Performance Issues From the perspective of a CMS developer, the first step in any performance investigation is to verify whether or not the performance issue is actually a CMS problem. The Microsoft PSS support team for CMS actually spends a good portion of its time chasing down problems that are not the result of a CMS issue. To determine whether an issue is directly related to CMS, take as much of the code from the problematic template as possible and run it outside of a CMS context. In other words, put the code into a stand-alone ASPX (or ASP) page and see what sort of performance difference exists. If theTable codeofruns considerably faster outside of CMS, then you can start to think about • Contents CMS-specific considerations. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Obviously, this is more difficult to do if the code is using the CMS PAPI. But the key message is to not just assume that the issue is a CMS problem. Try to narrow it down to a particular template and then a particular section of code. You can do this by practicing the all-important Publisher: Addison Wesley methodology of "one thing at a time." Try removing each component until you find the code Date: October 31, 2003 thatPub is dragging. ISBN: 0-321-19444-6
Table 35-9 Pages: lists 1136 a number of issues and their possible causes and solutions.
"This is one of those rare books that you will read to learn about the product and keep Table 35-9. Troubleshooting Performance Issues rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Behavior Solution Content Management Server (CMS) is fast becoming a vital content-management tool that helps and the ever-increasing of content their Rate administrators of cache misses is developers Examine handle size and balance of caches.amount Ensure that outputon cache Web sites. However, an authoritative of product information been missing . . . until high. directives source are correct and the durations has are appropriate. now. Rate of cache misses is Adjust your cache settings and usage. This could also be the result high plusContent data access of large searches—try cachingGuide the most common searches. Microsoft Management Server 2002: A Complete is the first book that explains operations are high. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Rate cache misses Increase theplatform. size of the master node cache—ideally your peak API to of manage contentison the Microsoft high plus number of node cache requirements should be around 80% of allocated node master node cache items cachethe sizeproduct to allow for shared nodes. You can this in and This thorough reference explains architecture, then shows youalso howuse to create is high. conjunction with the ASP.NET performance counters for output edit content and use the workflow. Topic coverage includes CMS administration and the security, cache to trace the caching of data MCMS. the Publishing API, deployment options, site configuration, andbefore template development. A running example is used throughout the book to illustrate how important CMS features are Number of exceptions Check the event log. implemented in real-world Web site development. Inside you'll find answers to such questions thrown by server is high. as:
The cost for your Check your authentication mechanism for potential issues. authenticated users is Chapter 6: How do you customize workflow? much higher than for guest users. 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Chapter using Visual Studio .NET? Web server is starved Check the performance counters to see what is using the most for resources. resources. Chapter 17: How do you establish user rights? Chapter [ Team LiB ] 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary Performance testing is a vital component in your Web site development plan. Ensure that you have provided yourself with adequate time and resources for proper performance testing. Do not wait until your site is completely finished before you start your performance testing. As each feature is built, you can use the prototype modeling or the TCA methodology to analyze the performance of the code. This will help you find performance issues early in the process. This will save you time and money since you will detect defects when they are easier to fix. •
Table of Contents
This chapter discussed various aspects of performance testing and the TCA methodology. For more information about these topics, refer to Performance Testing Microsoft .NET Web ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood Applications, by the Microsoft Application Consulting and Engineering Team (Microsoft Press, 2003). Microsoft Content Management Server 2002: A Complete Guide
Publisher: [ Team LiB ]Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 36. Tips and Techniques Overview Building a Site Map with Recursive Navigation Impersonation Anonymous Content Contribution •
Table of Contents
Creating Alternate Server Version of aAPosting Microsoft Contentan Management 2002: Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
How Do I Debug a CMS Project?
Why Am I Prompted for Logon Credentials When I Have Windows Authentication Enabled? Publisher: Addison Wesley Pub Date: October 2003 Reducing the31, Number
of Clicks to Attachments
ISBN: 0-321-19444-6
Creating Navigation with Existing .NET Server Controls Pages: 1136 Summary [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview Some of our most frustrating moments have been trying to figure out solutions to "problems." In some cases these problems are the result of what CMS can or cannot do. However, it's more often that we simply have a challenging requirement to meet and we're not sure what the solution is. In this chapter, we provide you with a frequently asked questions (FAQ)-style summary of some of the challenges we've run across and how we solved them. This list is by no means complete. However, we hope that it will give you insight into some common challenges and, perhaps, lead youoftoContents your own answers as you develop on the platform. • Table Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Building a Site Map with Recursive Navigation In traditional Web site development, the developer controlled navigation. This model worked pretty well, since they also controlled content contribution. However, after you've implemented CMS, the business users really control the site. More to the point, even if the developers wanted to maintain navigation manually, it's almost impossible to keep up with even a modestly sized contributor group. As a result, developers must create a mechanism that can effectively react to a site without inherently knowing what the structure of that site is. This is especially apparent when we are talking about a site map. To this end, CMS provides two mechanisms for allowing developers to create code that can elegantly and effectively react to an ever changing site structure: the Publishing API (PAPI) and Site Manager. • Table of Contents Microsoft Content Management Server 2002: A Complete Guide
To begin, Site Manager allows developers and content contributors to create a structure that defines the organization of their site in the form of channels. This channel structure is easily defined through Site Manager and through the constant contribution of postings within CMS. Then, the Publishing API provides the ability to access that structure, exposing properties like Publisher: Addison Wesley URL, Display Name, and Name in addition to an unlimited number of custom properties. Once Date: October 31, 2003 youPub have a structure and a way to access it, programmatic recursion of that structure allows ISBN: 0-321-19444-6 developers to be freed from the bonds of having to know the structure up front. To illustrate Pages: 1136examine the BOTS Consulting site map. this point, let's
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In Figure 36-1 you'll see a picture of Site Manager, exposing the channel structure of the BOTS Web site. Be careful to note the channels and the structure. "This is one of those rare books that you will read to learn about the product and keep rereading find those that you missed Figureto36-1. In tidbits Site Manager youbefore." can see the channel structure —Gary Bushey, SharePoint Server MVP BOTS
for
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
Now, let's look at the actual mapisinfast thebecoming site. In Figure you'll notice that all thethat Content Management Serversite (CMS) a vital36-2 content-management tool channels defined in Site Manager are exposed in the site map page. In this case the BOTS helps administrators and developers handle the ever-increasing amount of content on theirIT department decided that they only wanted to expose the sections of the site (the channels) and Web sites. However, an authoritative source of product information has been missing . . . until not the actual pages. It's relatively trivial to include postings as well; just keep in mind that it now. may affect performance since you're exposing many more objects. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the36-2. power of CMS. Administrators and developers alike will learn how Figure The BOTS Consulting site map to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 In Listing 36-1 you
can see our site map function. In this function, we're adding literal and HtmlAnchor controls to a .NET placeholder control we've embedded in our user control.
Listing 36-1 A sample recursive site map control
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary SharePoint Server MVP startChannel) public Bushey, void BuildSiteMap(Channel
{ Content Management Server (CMS) is fast becoming a vital content-management tool that // Add an unordered list tag to our .NET placeholder control helps administrators and developers handle the ever-increasing amount of content on their this.SiteMap.Controls.Add(new LiteralControl("
")); Web sites. However, an authoritative source of product information has been missing . . . until now. // Create a new link and assign the appropriate values from the channel // startChannel object. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains HtmlAnchor navigationLink = new HtmlAnchor(); how to effectively unlock the power of CMS. Administrators and developers alike will learn how navigationLink.InnerText = startChannel.DisplayName; to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and navigationLink.HRef = startChannel.Url; API to manage content on the Microsoft platform. navigationLink.Attributes.Add("style","FONT-WEIGHT: bold; COLOR: gray"); This thorough reference explains the product architecture, then shows you how to create and // Add link to our placeholder control edit content andthe usenew the workflow. Topic.NET coverage includes CMS administration and security, this.SiteMap.Controls.Add(new the Publishing API, deployment options, siteLiteralControl("- ")); configuration, and template development. A runningthis.SiteMap.Controls.Add(navigationLink); example is used throughout the book to illustrate how important CMS features are this.SiteMap.Controls.Add(new LiteralControl("
")); implemented in real-world Web site development. Inside you'll find answers to such questions as: // Get a collection of channels in the current channel ChannelCollection subChannels = startChannel.Channels; // Make that got a collection Chapter 6: sure How do you we customize workflow? if (subChannels != null) Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 { using Visual .NET? // Studio Call our BuildSiteMap function for each of the subchannels foreach(Channel subChannel in subChannels) Chapter 17: { How do you establish user rights? this.BuildSiteMap(subChannel); Chapter 22: } How do you best deploy CMS according to your organization's needs, size, and resources?
} Chapter 32: How do you publish dynamic data? // Close the unordered list tag and add it to our .NET placeholder control
LiteralControl("
")); [ Team this.SiteMap.Controls.Add(new LiB ] }
In this example, we accept one parameter, which is the starting point for the site map. From there we recursively traverse our tree structure, "discovering" all the channels in our site. We've hardcoded how the site map displays (a large unordered list), but this can certainly be expanded to include formatting as a parameter. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Impersonation
Impersonation is a way to programmatically log on as a user who is different from the actual physical user. In the context of CMS, there are a few reasons why you might want to implement this feature. For example let's suppose that the current user is an author and you would like to give them the ability to create a channel. The only sure way to provide them with this functionality is to make them a channel manager or an administrator. Obviously, this route is not always the best one and it tends to be unilateral—yes, you've given them the ability to create channels, but you've also provided them with certain authority over security, channel properties, and content approval. This is not ideal. So, the real answer to the problem is impersonation. •
Table of Contents
Essentially, it is Management possible to Server programmatically andGuide temporarily Microsoft Content 2002: A Complete
log on as a generic, impersonated user with certain rights—in this case as either an administrator or a channel manager—perform the operation you ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood need to perform, and log that generic user out. The first step is defining what functionality you would like to expose. Building off of the example we Publisher: Addison Wesley provided earlier, let's suppose that BOTS Consulting wants to give their editors the ability to create new Pub Date: 31, 2003 section so that it's possible for editors to create new classifications of channels in October the Knowledge ISBN: 0-321-19444-6 "knowledge" as the firm changes over time. Since editors don't inherently have this ability, you'll first need Pages: 1136 ID under which this operation can be performed. In this example, we've created a generic to create a user user called IMPCHANNELADMIN. This user is defined as a channel manager in the Knowledge section.
"This is one of those rare books that you will read to learn about the product and keep NOTE: create administrator-level rereading to You find could those also tidbits that an you missed before." account, but since the requirement was specific to the Knowledge section, —Gary Bushey, SharePoint Server MVP we didn't want to give the impersonated user too much power. The choice is up to you. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until The next step is to create an interface that allows the editor to provide the channel properties for the new now. channel (see Figure 36-3). In this example, you need to create a form that allows the editor to enter the name andContent display Management name for the Server new channel. Microsoft 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, and extensibility by using CMS features Figure 36-3. Sampleflexibility, interface for a channel creation tooland API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 the interface
Once is defined, you need to add the code to support the operation. In this case, the form will allow the user to enter the properties and, on postback, log on as the generic administrator, create the channel, and return a success or failure message. In Listing 36-2 you will see a rough sample of how to create the impersonation logic. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits a that you missed before." Listing 36-2 Creating Web-based channel creation solution using —Gary Bushey, SharePoint Server MVP impersonation Content Management Server (CMS) is fast becoming a vital content-management tool that [View full width] helps administrators and developers handle the ever-increasing amount of content on their Web sites.void However, an authoritativesender, source of product information private Page_Load(object System.EventArgs e)has been missing . . . until now. {
try Microsoft Content Management Server 2002: A Complete Guide is the first book that explains { how to effectively unlock the power of CMS. Administrators and developers alike will learn how // Show the current user to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and this.CurrentUser.Text = CmsHttpContext.Current.User. ServerAccountName; API to manage content on the Microsoft platform. Set parent channel fromarchitecture, the query then string This thorough // reference explains the product shows you how to create and // We assume that you would create a from a posting the edit content and use the workflow. Topic coverage includeslink CMS administration andin security, to thisoptions, page, site enabling the user createdevelopment. a channel. A the Publishing // API,site deployment configuration, andto template // isWhen call the you provide current channel's path running example usedyou throughout thepage, book to illustrate howthe important CMS features are // as a query string parameter. You could equally pass the implemented in real-world Web site development. Inside you'll find answers to such questions // parent's GUID. as: if (Request.Params["ParentChannel"] != null) { = Request.Params ["ParentChannel"]; Chapter 6: How this.txbParentChannel.Text do you customize workflow? Chapter 10: How// doCreate you develop for Microsoft Content Management Server (CMS) 2002 a reference to the channel using Visual Studio .NET? objParentChannel = (Channel)CmsHttpContext.Current. Searches Channel .GetByPath(this.txbParentChannel.Text); Chapter 17: How do you establish user rights? // Make sure the channel exists Chapter 22: Howif do(objParentChannel you best deploy CMS== according null) to your organization's needs, size, and resources? { this.DisplayNonExceptionMessage("The specified channel does not Chapter 32: How do you publish dynamic data? exist.");
[ Team LiB ]
} } else {this.DisplayNonExceptionMessage("No parent channel specified");}
} scatch(Exception eException) { this.DisplayExceptionMessage(eException); } }
public CmsApplicationContext AuthenticateasAdminUser() { • Table of Contents CmsApplicationContext newContext = new CmsApplicationContext(); MicrosoftnewContext.AuthenticateAsUser("WinNT://cmsdemo1/cmsadmin","password", Content Management Server 2002: A Complete Guide PublishingMod .Update); By Bill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood return newContext; } Publisher: Addison Wesley
private void CreateNewChannel (CmsApplicationContext myContext) Pub Date: October 31, 2003 { ISBN: 0-321-19444-6 Pages: 1136
try {
// Create a channel object representing the parent channel Channel objParentChannel = (Channel)myContext.Searches.GetByPath(this "This is one of those rare books that you will read to learn about the product and keep .txbParentChannel.Text); rereading to find those tidbits that you missed before." —Gary Bushey, Server //SharePoint Create the new MVP channel, assign the name and displayname // properties as provided by the user and commit the transaction Content Management (CMS) is fast a vital content-management tool that ChannelServer objNewChannel = becoming (Channel)objParentChannel.CreateChannel(); helps administrators and developers handle the ever-increasing amount of content on their objNewChannel.Name = this.txbName.Text.ToString(); Web sites. However, an authoritative source of product information has been missing . . . until objNewChannel.DisplayName = this.txbDisplayName.Text.ToString(); now. myContext.CommitAll(); this.DisplayNonExceptionMessage("New channel created successfully."); Microsoft Content Management Server 2002: A Complete Guide is the first book that explains } how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and catch(Exception eException) API to manage content on the Microsoft platform. { This thorough this.DisplayExceptionMessage(eException); reference explains the product architecture, then shows you how to create and } edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A } running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions private void DisplayExceptionMessage(Exception eException) as: { this.lblMessage.Text = "An exception occurred:
Message: " +eException.Message.ToString()+"
Source: "+eException.Source; Chapter 6: How do you customize workflow? } Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 usingvoid Visual Studio .NET? private DisplayNonExceptionMessage(string strMessage) { Chapter 17: How do you establish user rights? this.lblMessage.Text = strMessage; } Chapter 22: How do you best deploy CMS according to your organization's needs, size, and void resources? private btnCreateChannel_Click(object sender, System.EventArgs e)
{
Chapter 32: How do you publish dynamic data? CreateNewChannel(AuthenticateasAdminUser());
[} Team LiB ]
In our example, we clearly broke some basic rules of security by embedding the user ID and password in the code. Keep in mind that this is just a sample. The overall concept, however, could be useful in extendin the Web Author to allow a moderated ability to expand the structure of your site. A variation on this code could be a check to see what role the user occupies and to limit the channel creation ability to editors instead of everyone. Also, we're using the CmsApplication Context object for a few reasons: It allows us to authenticate inline without having to set a cookie and redirect. We leave the existing user's credentials intact on their machine. We can use this method whether or not we're using Forms or Windows authentication. •
Table of Contents
If you are using Forms authentication and you want to log the current user out, log your impersonated use in, perform the operation, and then log the original user back in, it's possible to do that with CmsForms By Bill English, Olga We Londer , Shawn , Todd Bleeker , Stephen Cawoodsince you don't have to worry about persisting Authentication. found ourShell methodology easier, though, the current user's credentials somewhere. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley
[ Team LiB ]October 31, 2003 Pub Date: ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Anonymous Content Contribution Building upon our impersonation example, there may be times when it's not a matter of granting additional abilities to an existing content contributor, but granting limited authoring capabilities to an anonymous user. For example, say you wanted to create a knowledge base (similar to Microsoft's) that allowed anyone in your company to contribute an article. However, you didn't want to grant a large population authoring rights to CMS. An alternative would be to build a basic Web form that collected all of the appropriate content, along with a display name, and programmatically created a posting. You would then programmatically submit the content for approval. In this way, you could allow anonymous content contribution and still maintain control of what content was published. Once the new article was approved, it would • Table of Contents automatically show up on your site. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
[ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating an Alternate Version of a Posting
Alternate versions of postings are useful in presenting existing content in different formats. For example, yo may want to create a "print friendly" version, at the simplest level, or you may need to create a PDA versio which presents a little more of a challenge. In either case, it's easy enough to create a new template that formats the content appropriately and then create a connected posting. We don't think you should have to create a new posting every time you add content. Instead, there should be a way to simply "reformat" exis content on the fly. It's possible to do just that, by dynamically associating a posting's content with an altern template. The idea was provided by the earlier version of CMS (2001), which had a direct API call to accom what we're doing here (there are good reasons why it was dropped, though). Since CMS 2002 no longer supports thatTable API of call, you'll have to write a little code to replicate that functionality. The following code wa • Contents providedContent by Pat Management Miller (of Microsoft) on Athe Microsoft-hosted newsgroup microsoft.public.cmserver.general; Microsoft Server 2002: Complete Guide simply commented it a bit more and changed some variable names to protect the innocent (see Listing 36ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Listing 36-3 Repurposing content programmatically—dynamic template switch Publisher: Addison Wesley Pub Date: October 31, 2003
publicISBN: string UrlUsingAlternateTemplate(string templateName) 0-321-19444-6 { Pages: 1136 // Set a variable to the current CMS Context CmsHttpContext myContext = CmsHttpContext.Current; // Set a variable to point to the current posting; we'll use this "This is one of those rare books that you will read to learn about the product and keep // object to get to its template and to that template's rereading to find those tidbits that you missed before." // connected templates. —Gary Bushey, SharePoint Server MVP Posting thisPosting = myContext.Posting;
Content Management Server (CMS) is fast becoming a vital content-management tool that if ( thisPosting != null ) helps administrators and developers handle the ever-increasing amount of content on their { Web sites. However, an authoritative source of product information has been missing . . . until // Retrieve a reference to the current posting's now. // template Template thisTemplate = thisPosting.Template; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains if ( thisTemplate != null ) how to effectively unlock the power of CMS. Administrators and developers alike will learn how { Web servers' scalability, flexibility, and extensibility by using CMS features and to enhance their //onUse requested template name to find it in the API to manage content thethe Microsoft platform. // collection connected templates. Template = thisTemplate.ConnectedTemplates[templateN This thorough reference explainstemplateToSwitchTo the product architecture, then shows you how to create and if ( templateToSwitchTo != null ) edit content and use the workflow. Topic coverage includes CMS administration and security, { the Publishing API, deployment options, site configuration, and template development. A // Determine whether the how TGI important we found CMS is connected running example is used throughout the book to illustrate features are // site to a physical template file. implemented in real-world Web development. Inside you'll find answers to such questions if ( templateToSwitchTo.SourceFile != "" ) as: { // Return the source path and file of the Chapter 6: How do you customize workflow? template, along with the query // alternate // string of the current posting. The query Chapter 10: How do you develop Microsoft Management (CMS) 2002 // for string willContent indicate the GUIDServer of the posting using Visual Studio .NET? // (which contains the content) to display // within the context of the alternate template. Chapter 17: How do you establish user templateToSwitchTo.SourceFile rights? return + "?" + Request.QueryString.ToString(); Chapter 22: How do you best deploy CMS according to your organization's needs, size, } and resources? else { Chapter 32: How do you publish dynamic data? return null;
}
[ Team LiB ]
} else { return null; } } else { return null; }
} else { return null; •
}
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide } ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In Listing 36-3 we're using the connection between the current posting's template and its connected templa In other words, this function will only work if you have templates with connected templates in your solution Publisher: Addison Wesley advantage to this approach is that all connected templates share the same placeholder definitions, so you'r Pub Date: October 31, 2003 assured that content in the original posting shows up on the alternate version. Keep in mind, however, that ISBN: 0-321-19444-6 you're passing in the name of the template as a string. This will only work if all the connected templates ha Pages: 1136 unique names. [ Team LiB ] "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
How Do I Debug a CMS Project? Generally, you can debug a CMS project as you would any other ASP.NET application, using the built-in debugging facility in VS.NET. However, because of the way CMS works—the ASPX files aren't run directly—you can't simply set the startup page in your VS.NET project to a template file. To debug a CMS project, you can use either of the following techniques: Manually attach to the ASPNET_WP.EXE process and then open Internet Explorer and browse to your site. •
Table of Contents
Create a small ASPX page that redirects to a posting in your site. In your project, set the startup page to that redirect ASPX file. Now, simply press F5.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
If you'd like more detail on debugging, refer to Chapter 12, Designing Templates. Publisher: [ Team LiB ]Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Why Am I Prompted for Logon Credentials When I Have Windows Authentication Enabled? There are two sets of permissions that must be in sync for your CMS site to operate properly. One set of permissions are set in CMS, through Site Manager. The other set of permission are the specific Access Control Lists (ACLs) for the directory where your solution files are stored. If you change the ACLs on the project folders, it's possible to prevent users from accessing the site. For example, if we were to change the ACLs for our templates folder in the BOTS site to disallow the CMS guest account, our anonymous access would stop working; CMS would still allow access Table to the • of content, Contents but since the template can't run, the site won't operate. However, if you create a special folderServer in your project to hold templates that are appropriate only for Microsoft Content Management 2002: A Complete Guide postings accessed by certain individuals, then it's possible to block access to the postings based ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood on those templates by changing the ACLs on that folder. This could work for you or against you depending on your situation. Using this technique, you can create a more secure site, or a completely inaccessible site if you don't set the permissions correctly. Publisher: Addison Wesley
Pub Date: October 31, 2003
[ TeamISBN: LiB ]0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Reducing the Number of Clicks to Attachments As we've mentioned several times in this book, there are really two audiences for your CMS site: content contributors and content consumers. As a result, there are some cases where the site should operate differently depending on who's using the site. For example, let's suppose that you create a template that allows content contributors to upload attachments. Let's further suppose that the attachment is the only content on that page. In this case, all the attachment templates are summarized in some list on the site as well. If we were subscribers, the only thing we would be interested in is the attachment. We don't want to have to clickTable a linkofto get to a posting and then click the link to the attachment. Instead, we should be • Contents able to simply the link Server to the2002: posting and automatically be redirected to the attachment. Microsoft Contentclick Management A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Conversely, if we were the author, we would be interested in getting to that posting if the site were in Edit mode (remember the rule: You must be able to navigate to where you want to affect content). So how do you resolve the needs of these two distinct audiences? Easy. Create an attachment redirect Publisher: Addison Wesley template. Pub Date: October 31, 2003 ISBN: 0-321-19444-6 OK, let's review the "rules" for this template: Pages: 1136
When a user clicks a link to a posting containing just an attachment, they should be automatically redirected to the posting. "This When is one the of those books thatauthors you willshould read tobelearn the product keep site israre in Edit mode, able about to click the link to and the posting and actually get rereading toposting find those tidbits thatredirected. you missed before." to the without being —Gary Bushey, SharePoint Server MVP Well, that seems simple enough. It is. In Listing 36-4 you can see the code that you'll need to put in the Content Management Server (CMS) is fast a vital content-management tool that code-behind of the attachment template tobecoming make all this work. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until Listing 36-4 The code for the redirect attachment template now. [View full width] Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how private void sender, System.EventArgs e) by using CMS features and to enhance theirPage_Load(object Web servers' scalability, flexibility, and extensibility { API to manage content on the Microsoft platform. this.BodyTitle.Text = "" + CmsHttpContext.Current.Posting. DisplayName "";explains the product architecture, then shows you how to create and This thorough + reference
edit content and use the workflow. Topic coverage includes CMS administration and security, // Call the redirect options, logic site configuration, and template development. A the Publishing API, deployment runningHandleRedirect(); example is used throughout the book to illustrate how important CMS features are } implemented in real-world Web site development. Inside you'll find answers to such questions private void HandleRedirect() as: { // Set a reference to the current Web Author Context Chapter 6: How do youcurrentWebAuthor customize workflow? WebAuthorContext = WebAuthorContext.Current; Chapter 10: to Howsee do you develop for Microsoft Content Management 2002 // Check if the various conditions where we don'tServer want (CMS) to using Visual Studio .NET? // redirect exist. If so, just stay on the posting. If not, redirect // to the attachment. Chapter 17: How do you establish != user rights? if ((currentWebAuthor.Mode WebAuthorContextMode.AuthoringNew) &&
(currentWebAuthor.Mode != WebAuthorContextMode.AuthoringReedit) && Chapter 22: How do you best deploy!= CMS according to your organization's needs, size, (currentWebAuthor.Mode WebAuthorContextMode.PresentationUnpublished) && and resources? (currentWebAuthor.Mode != WebAuthorContextMode.TemplatePreview)) { Chapter 32: How do you publish dynamic data? string redirectUrl = ((AttachmentPlaceholder)CmsHttpContext. Current.Posting
[.Placeholders["WhitepaperAttachment"]).Url; Team LiB ] Response.Redirect(redirectUrl); } }
As you can see, the code for this improvement is pretty simple. However, techniques like this can really mean the difference between a good implementation of CMS and one that just didn't quite make it. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Creating Navigation with Existing .NET Server Controls Almost every navigation example in this book used literals, tables, and a few HTML Anchors to create navigation. Although this is a perfectly acceptable, and sometimes preferable, method of creating navigation in your site, it's also possible to use other server controls, like a Tree control or a Datalist. To make it easier on us to describe, we'll call this methodology "creating navigation with alternative controls." In Listings 36-5 and 36-6, we show you two ways of creating navigation using alternative controls. Keep in mind that, in the case of the Tree control specifically, there are performance considerations that aren't apparent in our samples and Microsoft doesn't support this control any longer (it's included in the IE Web • Table of Contents Controls). Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Listing 36-5 Creating a site map with a Tree control [View full width] Publisher: Addison Wesley Pub Date: October 31, 2003
protected Microsoft.Web.UI.WebControls.TreeView myTreeView; ISBN: 0-321-19444-6
Pages: 1136
private void Page_Load(object sender, System.EventArgs e) { // Set the "root" of our site map to the home channel of // BOTS consulting "This isChannel one of those rare books that will read to learn about the product and keep myStartChannel = you (Channel)CmsHttpContext.Current.Searches.GetByPath(" rereading to find those tidbits that you missed before." /Channels/botsconsulting"); —Gary Bushey, SharePoint Server MVP // Turn off the lines and the plus/minus signs, making Content// Management Server (CMS) fast becoming a vital content-management tool that the tree control look isless like a "tree" helps administrators and developers handle the ever-increasing amount of content on their myTreeView.ShowLines = false; Web sites. However, an authoritative source of product information has been missing . . . until myTreeView.ShowPlus = false; now. // Call the BUILDSITEMAP function, passing in the starting // channel and a null reference for the parentChannel (since Microsoft Management Server //Content we're starting with the 2002: root)A Complete Guide is the first book that explains how to BuildSiteMap(myStartChannel,null); effectively unlock the power of CMS. Administrators and developers alike will learn how to } enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API manage content on the Microsoft platform. /// to <summary> /// This function recursively builds a site map using a TreeControl. This thorough reference explains the product architecture, then shows you how to create and /// The function only displays the channels and not the postings to edit content and use the workflow. Topic coverage includes CMS administration and security, /// improve performance. The function will generally work well on the Publishing API, deployment options, site configuration, and template development. A /// smaller sites, but may be sluggish on larger, more complicated running example is used throughout the book to illustrate how important CMS features are /// sites. implemented in real-world Web site development. Inside you'll find answers to such questions /// as: /// <param name="(Channel) startChannel"> /// <param name="(TreeNode) parentTreeNode"> public void 6: BuildSiteMap(Channel TreeNode parentTreeNode) Chapter How do you customize startChannel, workflow? { // Create a new treedevelop node for Microsoft Content Management Server (CMS) 2002 Chapter 10: How do you TreeNode myNewNode using Visual Studio .NET?= new TreeNode(); Chapter How do youweestablish user // Add17: the styles want to ourrights? node (yes, we could have used // CSS, but we were lazy) Chapter 22: How do you best deploy CMS according to your organization's needs, size, myNewNode.DefaultStyle.Add("FONT-FAMILY","verdana"); and resources? myNewNode.DefaultStyle.Add("FONT-WEIGHT","bold"); myNewNode.DefaultStyle.Add("COLOR","gray"); Chapter 32: How do you publish dynamic data?
the NavigateUrl property to the URL of the current channel [ Team // LiBSet ] // Set the Text property to the displayname myNewNode.NavigateUrl = startChannel.Url; myNewNode.Text = startChannel.DisplayName; // Check to see if the parentTreeNode is null. If it is // this is the first time this function has been called, so // we know we're at the root. if(parentTreeNode == null) { // Add the new node to the myTreeNode control on our user // control. myTreeView.Nodes.Add(myNewNode); } else • Table of Contents { Microsoft Content// Management Server 2002: a A Complete If we were given parent,Guide add our new node to that //Londer parent node sure it'sCawood expanded. ByBill English, Olga , Shawn Shelland , Toddmake Bleeker , Stephen parentTreeNode.Nodes.Add(myNewNode); parentTreeNode.Expanded = true; } Publisher: Addison Wesley // If the 31, current channel has subchannels, recursively Pub Date: October 2003 // call this function to finish out the rest of the tree. ISBN: 0-321-19444-6 if (startChannel.Channels.Count > 0) Pages: 1136 { foreach(Channel subChannel in startChannel.Channels) { BuildSiteMap(subChannel,myNewNode); "This is one of }those rare books that you will read to learn about the product and keep rereading } to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP } Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites.inHowever, an authoritative product information hashad been missing . . . added until at design The code Listing 36-5 resides insidesource a user of control. The user control a Tree control now. time, and we create the nodes within the tree at runtime. During the Page_Load event, we simply set up the Tree control and get a reference to the root channel. We then recursively traverse the tree to gather Microsoft Content Management Server 2002: A Complete Guide is the first book that explains all the nodes. As we mentioned in the code comments, this particular implementation will work for how to effectively unlock the power of CMS. Administrators and developers alike will learn how relatively small sites. However, we've seen similar implementations on larger sites perform poorly, to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and through a combination of sheer processing time and the size of the resulting property bag. If you API to manage content on the Microsoft platform. implement this control on your site, be sure to properly load test the site to ensure optimal performance. This thorough reference explains the product architecture, then shows you how to create and Next, in Listing 36-6, you'll see a sample of our left navigation using a Datalist. In this sample, we're edit content and use the workflow. Topic coverage includes CMS administration and security, creating a data source dynamically from the collection of postings and then binding that data source to the Publishing API, deployment options, site configuration, and template development. A our Data list. A display template handles all of the formatting. Thanks to Drew Jones for this contribution. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Listing 36-6 Creating navigation with a Datalist as: Chapter 6: How do you customize workflow? protected System.Web.UI.WebControls.DataList myDataList; private string startchannelpath; Chapter 10:startChannelPath How do you develop for Microsoft Content Management Server (CMS) 2002 public string using Visual Studio .NET?
{
Chapter 17: How do you establish user rights? get { Chapter 22: How do you best deploy CMS according to your organization's needs, size, return startchannelpath; and resources? } set Chapter 32: How do you publish dynamic data? {
[ Team LiB ] } }
startchannelpath = value;
private void Page_Load(object sender, System.EventArgs e) { // Check to see if a path has been provided by the developer // If one hasn't been provided, get the path to the current channel. if(startChannelPath =="") {startchannelpath = CmsHttpContext.Current.Channel.Path;} // Set a reference to the channel indicated by the startChannelPath // property Channel startChannel = (Channel)CmsHttpContext.Current.Searches. GetByPath(startchannelpath); •
Table of Contents
Microsoft// Content Management A Complete Guide If an invalid Server path 2002: was provided, set
the startChannel to the current
// channel ByBill English , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood if (startChannel == null) {startChannel = CmsHttpContext.Current.Channel;} Publisher: Addison Wesley
// Call the navigation Pub Date: October 31, 2003 }
function BuildNavigation(startChannel); ISBN: 0-321-19444-6
Pages: 1136
public void BuildNavigation(Channel startChannel) { // Check to see if startChannel is null "This isif one(startChannel of those rare books that you will read to learn about the product and keep != null) rereading { to find those tidbits that you missed before." —Gary Bushey, Server MVP of my list to the collection of channels //SharePoint Set the datasource myDataList.DataSource = startChannel.Channels; Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators andthe developers handle the ever-increasing amount of content on their // Bind DataList to the datasource Web sites. However, an authoritative source of product information has been missing . . . until myDataList.DataBind(); now. } } Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and The code in Listing 36-6 sets up the Datalist and binds the collection of postings. However, you also have API to manage content on the Microsoft platform. to provide a "template" that defines how to display the data when it's rendered. In our case, we just want a simple list. In Listing 36-7 we've provided the item template that controls the display of the Datalist. In This thorough reference explains the product architecture, then shows you how to create and Figure 36-4, you can see the result of this new user control when it is added to the general template in edit content and use the workflow. Topic coverage includes CMS administration and security, the BOTS site. We've simply added it just below the existing navigation. It fundamentally looks the same the Publishing API, deployment options, site configuration, and template development. A as the original navigation; it just ultimately required fewer lines of code to create. It may not be running example is used throughout the book to illustrate how important CMS features are appropriate for all situations, but we thought it was cool. implemented in real-world Web site development. Inside you'll find answers to such questions as:
Listing 36-7 Item template for the Datalist Chapter [View full width]6: How do you customize workflow?
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002
using Visual Studio .NET?   | Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data? Team LiB ] |
Figure 36-4. Both original and Datalist left navigation on the BOTS site •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and [ Team LiB ] API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter we've provided several tips and techniques. Again, there's lots of material that could be written about this topic, and we highlighted a few tips that we felt were interesting. However, we also encourage you to develop your own techniques. When you do, please share them with the rest of us through the various communities on the Web. A great resource to share code samples and white papers is at http://www.gotdotnet.com. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part IX: Moving Forward with CMS Chapter 37. Upgrading or Migrating Your Site to Content Management Server 2002 [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Chapter 37. Upgrading or Migrating Your Site to Content Management Server 2002 Whether you are new to Microsoft's Content Management Server (CMS) or you have deployed the earlier product, implementing CMS will involve getting your existing site into this new tool. In the following sections, we discuss the steps necessary to migrate your site and how to upgrade from CMS 2001. In the case of a migration, we assume that you do not have CMS 2001 installed; therefore, we will show you the additional steps that you will need to accomplish to successfully complete a migration from your current Web site to CMS 2001. If you are • Table of Contents upgrading from Management CMS 2001, Server we assume you've largely completed the non-CMS-related Microsoft Content 2002: Athat Complete Guide work before implementing the 2001 product. However, since CMS 2002 uses an entirely ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood different framework for developing sites, we still recommend reviewing the migration section, even if you are already running CMS 2001. Publisher: Addison Wesley [ Team LiB ] Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Migrating Your Existing Site to CMS 2002 As an organization's Web sites mature, many firms look to Web content management (WCM) systems like Microsoft's Content Management Server 2002 to help them manage their Web content. Not only does CMS offer a flexible platform with which to create and maintain sites, more fundamentally, it provides business users with the ability to directly control one of the most important customer touch points that businesses have today. Unfortunately, most firms misjudge the work involved in the migration effort. They often underestimate the work to move the functionality, the content conversion (e.g., moving content from static pages to CMS's repository), and the impact on day-to-day operations caused by a radical change in how Web site management is Contents conducted. As a result, many implementations of CMS aren't as smooth as • Table of they should be—not because of the tool, but because Microsoft Content Management Server 2002: A Complete Guideof the process. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In this chapter, we'll introduce a framework for structuring the conversion of your site. This framework will allow you to appropriately plan for and manage the process of introducing CMS into your organization, as well as help you anticipate "gotchas" before they become a problem. Publisher: Addison Wesley Specifically, we'll review activities such as content inventory, functionality inventory, Pub Date: October 31, 2003 deployment strategy, information architecture (IA) review and template design, ISBN: 0-321-19444-6 approval/review workflow, role definition, content conversion, and technical and content Pages: training. 1136 contributor Some of these activities may sound obvious, but they're often not given enough weight, which leads to problems throughout the project.
[ Team "This is LiB one]of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Content Inventory A content inventory is a complete list of all content that you want to manage within CMS 2002. Think of a content inventory as taking stock of everything that makes up your current Web site. This may sound a little tedious and perhaps unnecessary; however, consider that most Web sites are usually "owned" by a number of parties. With multiple people or groups contributing content, it's difficult to track and/or know what is actually out there. Performing a full content inventory will provide the following: A complete list of all Web pages and/or content included in your Web site: Again, Web Table of Contents sites tend to grow organically through interaction with multiple groups or people; most Microsoft Content Management Server 2002: A Complete Guide firms don't know what they have until they make a concerted effort to go through a ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood discovery process. •
A mechanism to account for all content that needs to be converted (or not): It would be is possible to know whether a conversion was successful without Pub Date: October 2003 knowing what31, the precondition was. In other words, this is a way to ensure that you have ISBN: 0-321-19444-6 successfully converted all of your content by comparing it with a known list of what your site had. A thorough content inventory is a great quality assurance (QA) resource when Pages: 1136 you are performing the final testing.
Publisher: Addison Wesleyit foolhardy to think
A way of assigning content ownership: As part of implementing CMS, you will define a workflow process. This workflow process will determine what people or groups are "This is one of those rare books that you will read to learn about the product and keep involved in producing and approving content. As the first step, you will have to identify rereading to find those tidbits that you missed before." the current owners of each piece of content. Often, firms will begin the process of —Gary Bushey, SharePoint Server MVP converting their sites without the involvement of the key stakeholders—generally because they don't know who they are. is This usually to user communitytool that Content Management Server (CMS) fastcondition becoming a vitalleads content-management dissatisfaction or errors in the conversion. Determining content ownership up front will helps administrators and developers handle the ever-increasing amount of content on their greatly reduce these issues. Web sites. However, an authoritative source of product information has been missing . . . until now.
What content can be removed from the Web site: Implementing CMS provides the unprecedented opportunityServer to review what content isGuide published your Web site. Most Microsoft Content Management 2002: A Complete is theon first book that explains companies have probably gone through one or two revisions of their site by now; how to effectively unlock the power of CMS. Administrators and developers alike will learn how however, most not concentrated on reviewing the content by as using a partCMS of the redesign to enhance their Webhave servers' scalability, flexibility, and extensibility features and process. Usually, this means that a great deal of the content on the site has likely API to manage content on the Microsoft platform. "evolved" over time. As a result, you may find that some content isn't relevant or is simply outdated. Inexplains either case, you may wish to remove content when convert This thorough reference the product architecture, thenthis shows you how toyou create and your site. A side benefit is that this exercise may reduce the work necessary to migrate edit content and use the workflow. Topic coverage includes CMS administration and security, your site,API, since you're reducing thesite content you have and to convert. the Publishing deployment options, configuration, template development. A running example is used throughout the book to illustrate how important CMS features are Content in consistency Through a combination of factors like content evolution, implemented real-worldreview: Web site development. Inside you'll find answers to such questions multiple group involvement, and ownership changes, content on a Web site could and as: does become inconsistent over time. For example, over time a product or service's positioning changes—because of product maturity, new product uses, product bundling, or simple product As a result, a product's content changes to account for this Chapter 6: Howchanges. do you customize workflow? metamorphosis. However, did all of the Web content change? Is it possible that out of the Chapter 10: Howordo you develop for Microsoft Content Management Server (CMS) some 2002 of tens, hundreds, thousands of references, descriptions, or links to your product, using Visual .NET? them are outStudio of sync? Could the same product be positioned differently across your site (especially if the same product is cross-sold between different business units)? A content Chapter you establish user rights? inventory17: willHow helpdo highlight these inconsistencies and serve as a checklist for fixing them. Chapter 22: How Adothorough you bestcontent deploy inventory CMS according to your organization's Missing content: (in a conversion project) is aneeds, way ofsize, and resources? determining what content you currently have. However, if you are adding new sections to your site or you are reorganizing your site, you may be missing content in one or more Chapter doayou publish dynamic data? areas. In32: thisHow case, content inventory will help point out missing content before it
becomes [ Team LiB ] necessary to create it. Guidance for information architecture, template design, and content conversion: How is your current content structured? Do you have groupings of similar content? Are there patterns to your content? The answers to these questions are important to discover during the content inventory. Again, since you are converting your site, it is likely that you already have an information architecture and a solidified design. As with any site, yours will have changed over time, this will be your opportunity to ensure that your information architecture changed along with it. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Functionality Inventory A functionality inventory, like a content inventory, is a way of taking stock of what your Web site does. Too many times, developers are given an existing application and told, "Here, build this." Unfortunately, even the most gifted developer would not be able to discover every feature or function within the application. At best, they may be able to discover half the features in the existing application. Imagine being handed Microsoft Word, never having worked with the application before, and being asked to re-create it from scratch. This situation is often where developers find themselves, and it often leads to failed implementations. A functionality inventory is a collaborative effort between the business folks and the • Table of Contents IT/development staff. The inventory serves two functions: Microsoft Content Management Server 2002: A Complete Guide
review of the existing functionality and a road map for the new site. The review is helpful in knowing what the site does today. In ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood the same way that a content inventory can help point out content that everyone may not have known about, the functionality inventory provides the baseline functionality that your converted Web site must have when the project is finished. Does the site have a "contact us" page? How Publisher: Addison Wesley many contact pages? How can customers order products and services? Is there one way or Pub Date: October 31, 2003 many ways to download white papers? Over time, Web sites tend to collect functionality as ISBN: 0-321-19444-6 they collect content. Different developers, different managers, changes in technology, and Pages: 1136 changes in technique all lead to situations where a Web site grows functionally—sometimes inconsistently and often sprawling. Once you've identified what your site does, what is your new site going to do? This is the other important benefit of the inventory. After you have whatand your site does, "This is one of those rarefunctionality books that you will read to learn aboutidentified the product keep you can effectively plantidbits for what you need to develop. rereading to find those that you missed before."This is not necessarily a straightforward exercise. Do notSharePoint think that once you've —Gary Bushey, Server MVP finished your functionality inventory, you're done. The inventory will tell you what features your site has and, in some cases, what you can potentially eliminate. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now.
The "Already Built" Syndrome
Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how We have, on more than one occasion, been presented an existing to enhance their Web servers' scalability, flexibility, andwith extensibility byapplication using CMS features and andto told to simply "convert" it Microsoft to some new platform. In this context, the word API manage content on the platform. "convert" seems to indicate that there is some process by which an existing application canreference be morphed, upgraded, and/or magically transformed newto create and This thorough explains the product architecture, then shows into you ahow version of itself running on the latest technology with little or no effort, since "itand security, edit content and use the workflow. Topic coverage includes CMS administration already exists." Thedeployment truth, however, is that applications simply be the Publishing API, options, site most configuration, andcan't template development. A "converted"—they be rewritten. This means that no matter how much of the are running example is have used to throughout the book to illustrate how important CMS features application already exists, Web the existing application Inside will have to be from implemented in real-world site development. you'll findrewritten, answers to such questions scratch, to yield the "converted" application. as:
Consider this: If the government wanted to convert all asphalt-based roads to Chapter 6:roads, How do you customize workflow? cement-based they would literally have to rebuild, from scratch, every road. It's true that some of the work necessary for a brand-new road has been done Chapter How do youland, develop Server (CMS) 2002 (cutting down10: trees, clearing andfor so Microsoft on), but itContent doesn'tManagement diminish the fact that using Visual Studio .NET? the old asphalt road must be torn up and the new cement road laid in its place. Chapter 17: How do you rights? In the same way, it's true thatestablish users willuser expect the application to operate in a particular way, and the application's functionality should be well known (although 22: How do you best deploy itCMS to your size, that'sChapter not as true as we'd like). However, stillaccording doesn't mean thatorganization's it's any easierneeds, to and resources? convert to a new technology. Keep this in mind, since many of you will be "converting" from ASP-based applications to ASP.NET. Chapter 32: How do you publish dynamic data?
[Beyond Team LiB ] we've identified here, there are other benefits to the functionality map: what
Traceability for QA: Once you've built the new Web site, what do you test and how should it operate? The functionality inventory will provide you with a way of tracing functionality in your new Web site back to what you had in the older version. Resource and effort planning: Many companies engage in a development effort without fully understanding what the work effort will be. We're not suggesting that the functionality inventory will provide you with a complete picture, but it will give you a start. By understanding what features the current site has, you can better plan what resources will be necessary to help build or rebuild that functionality in the new site. In addition, very few companies are likely to have the original developers available to them; the functionality inventory will help the new developers understand the site better. Table of Contents Are there multiple "contact us" forms? How about ordering Removing duplication: A functionality inventory will expose all these issues. re-creating your site, this is the opportunity to do some ByBill English , Olga LonderSince , Shawnyou're Shell, Todd Bleeker, Stephen Cawood housecleaning. •
Microsoft Content Management Serverimplemented 2002: A Complete Guide processes? Is functionality consistently?
Guidance for Wesley template Publisher: Addison
design: In CMS, the templates will house the functionality in your site. If you know what functionality exists and how it operates, you can more effectively Pub Date: October 31, 2003 design the templates that support your site. In general, a goal of CMS is to try to leverage ISBN: 0-321-19444-6 one template for as many pages as practical. If you understand the functionality within Pages: 1136 your site, you may be able to create more robust templates to support multiple sections of your site. Without this information, you will probably create more templates than are necessary, thereby increasing the development effort necessary to rebuild your site.
"This is one of those rare books that you will read to learn about the product and keep [ Team LiBto] find those tidbits that you missed before." rereading —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Information Architecture Review and Template Design Without a doubt, the most important aspect of a Web site is the information architecture. The IA defines how information is organized on your site—from the relationship between pages to the organization of information within a page. Whether or not you've consciously developed an IA, every site has one. Although some sites have a more logical and clear IA, moving to CMS will solidify the IA of your site, removing ambiguity caused by content contribution. As a result, it's a good idea to fully review and document an IA before moving your site to CMS. The first step in creating a formal IA is to develop an information architecture diagram. This diagram, sometimes loosely referred to as a site map, is the equivalent of an organizational • Table of Contents chart forContent your site. It showsServer all the content categories Microsoft Management 2002: A Complete Guide and all the pages, determines the nomenclature for these items, and illustrates where each page or category will be housed ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood (under what parent category). Truly, the IA becomes a map of how end users get from point A to point B. Publisher: Addison Wesley Now, the IA isn't just the site diagram. In addition, the IA includes page layout. Sometimes Pubschematics Date: October or 31, wire 2003 frames, these documents illustrate the layout of content and called ISBN: 0-321-19444-6 functionality within a particular page (a posting, in CMS terms). Where is the search field? 1136 does the global navigation appear? These questions and many others are WherePages: and how answered by the page schematics.
More than a few companies have viewed IA development as trivial, but it is generally more complicated than most firms expect. Within context of a CMS the implementation, these "This is one of those rare books that you willthe read to learn about product and keep exercises have a tremendous impact on the project's success. The mere nature of CMS rereading to find those tidbits that you missed before." removes some of the arbitrary nature of site development. For example, when developers are —Gary Bushey, SharePoint Server MVP in complete control, they can make decisions about nomenclature, site structure, and page layout asManagement they code; when you have is many developersa working on the project, youtool maythat end up Content Server (CMS) fast becoming vital content-management with different interpretations of nomenclature and layout. However, CMS reduces these helps administrators and developers handle the ever-increasing amount of content on their inconsistencies by providing one placesource to retrieve the site organization structure) and Web sites. However, an authoritative of product information has(channel been missing . . . until by implementing a template structure. The templates, in turn, are used by the content now. contributors to create pages within the site. The channel structure is what the developed code reads to display navigation on the site. This is not to say thatisCMS reduces flexibility. Microsoft Contentthe Management Server 2002: A Complete Guide the first booksite that explains In fact, CMS sites can be extremely flexible. CMS simply creates a constant environment for end how to effectively unlock the power of CMS. Administrators and developers alike will learn how users, content contributors, and developers, and consistently reinforces this structure no to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and matter how much content added. API to manage content on is the Microsoft platform. Earlier in this chapter, we discussed content and functionality inventory. Those two and This thorough reference explains thethe product architecture, then shows you how to create documents will serve as the foundation for all of the work you'll perform in this phase. In fact, edit content and use the workflow. Topic coverage includes CMS administration and security, in conjunction with deployment the content inventory, the IA may pointand out template what content needs to be the Publishing API, options, site configuration, development. A removed, "fixed,"isorused added. running example throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions At BOTS Consulting, the business users developed the information architecture shown in Figure as: 37-1. Chapter 6: How do you customize workflow? Figure 37-1. Sample information architecture for BOTS Consulting Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
Once the information architecture is developed, you can directly translate that into a channel structure in CMS. Whereas the IA is the logical organization of your content, the channel structure represents the physical storage. In addition, as you have seen in prior chapters, the channel structure forms the foundation of your site's navigation. If we were to translate the "This is one architecture of those rarefor books that you will read learn about the product and keep information BOTS Consulting into atochannel structure, it might look something rereading find those tidbits that you missed before." like Figure to 37-2. —Gary Bushey, SharePoint Server MVP
Figure 37-2. BOTS Consulting channel structure
Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[InTeam LiB ] you can see how the IA was translated into the channel structure. The IA the figure, descriptions become the channel Display Name property, and the channel name is a shortened version of the description. Also notice that although there may be items listed on the IA (links to pages or channels) more than once, they will not be listed in the channel structure in the same way; remember, the channel structure is the physical representation of a logical architecture—a navigation element may appear logically in more than one place, but it will be physically represented only once.
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Workflow In Chapter 6, we discussed developing code to support your workflow processes. However, how do you know what you need to develop? Workflow must necessarily include all activities from creation through destruction of your content. Since you already have an existing Web site, you already have a workflow process. Is that process documented? Does it include everything from creation through destruction? Does everyone in the organization understand the process? Is it enforceable? With CMS, you can apply a consistent and enforceable workflow process for all content. Depending on your organization, this may or may not be a good thing, but you must understand what your company does and how it operates to effectively implement the right technology with • TableCMS. of Contents Microsoft Content Management Server 2002: A Complete Guide
To make sure you are ready to move to CMS, perform the following exercises to discover if you have enough information about your workflow process.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Wesley Talk toAddison the business
stakeholders . Does everyone who "owns" a portion of the Web site makes its way to the site? Ask them to describe the process as ISBN: 0-321-19444-6 they understand it. Keep in mind that if you are part of the group that initially created the process, the answer the stakeholder gives you may be what you want to hear, not what Pages: 1136 actually happens.
Pub Date: Octoberhow 31, 2003 understand content
Review company policies on document/content retention . It is paramount that you understand how your company retains and destroys documents or content. Although most "This is one of those rare books that you will read to learn about the product and keep firms have long-standing document retention policies, they do not necessarily have a Web rereading to find those tidbits that you missed before." site retention policy. Sometimes Web sites, although they represent a public source of —Gary Bushey, SharePoint Server MVP information about your company, are not considered a "document" as defined in document retention policies. It is is fast one becoming thing to keep paper in a box for seven years; it is an Content Management Server (CMS) a vital content-management tool that entirely different matter to preserve Web content for that long—technology changes, helps administrators and developers handle the ever-increasing amount of content on their products are expired, and computer media radically changes (e.g., do you have a. .5.1/4Web sites. However, an authoritative source of product information has been missing until inch floppy drive?). You should determine if your legal or compliance department has now. issued guidelines specifically targeting Web content. If so, these guidelines will be helpful in designing system thatServer appropriately content, when the Microsoft Content aManagement 2002: Apreserves Completeand/or Guide destroys is the first book that explains time comes (hint: It's not likely to include Content Management Server 2002). In addition how to effectively unlock the power of CMS. Administrators and developers alike will learn how to basic guidelines, it is important toflexibility, understand the parametersbyofusing thoseCMS guidelines. to enhance their Web servers' scalability, and extensibility featuresFor and youron company provided standards for Web content preservation—format, API toexample, manage has content the Microsoft platform. expectations for recovery, whether it has to be noneditable? Ask questions, get good answers, reference and your explains companythe willproduct thank you. This thorough architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, Consider API, automated and people-based processes . There are typically a number the Publishing deployment options, site workflow configuration, and template development. A of steps to publishing content on the Web. of those steps require interaction running example is used throughout the book to Some illustrate how important CMShuman features are and some not. When you develop your formalized workflow, make sure to include implemented in do real-world Web site development. Inside you'll find answers to such questions as: both. For example, when an author finishes creating content and submits that content for approval, you can automatically send an e-mail to the editor(s) involved in reviewing the page. However, a human must review and potentially edit submitted content. Both Chapter 6: How do you customize workflow? processes—sending e-mail and reviewing the content—must be completed in order for the page to be published, and therefore must be included in any documented workflow. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual .NET? Consider howStudio you implement automated workflow features . A very common workflow process is to send an e-mail after an event (e.g., on submit, on decline, on approve). An Chapter 17:beHow do you establish rights? that some action has been taken or that e-mail can a very effective way user of notifying someone must take an action (e.g., reviewing content). However, since the e-mail is an Chapter 22:feature, How dosomeone you best involved deploy CMS according toprocess your organization's automated in the workflow may quickly needs, becomesize, and resources? overwhelmed by the volume. You should consider very carefully how you implement any notification process, or consider alternatives. For example, if you use Outlook as your mail Chapter 32: How do you dynamic data?a task to an editor's Task List when they client, consider using the publish Task List and adding
need [ Team LiBto ] review content, instead of sending the editor an e-mail. Although e-mail is the example we used here, there are a number of automated workflow features that will often confound the most well-prepared developer. Thorough testing is the only sure way of catching these oversights before your users do. In the workflow process diagram shown in Figure 37-3, the subject matter expert (SME) is responsible for beginning the workflow by creating a case study. Once the SME is finished, they submit the posting to the technical director for the practice area. The technical director reviews the case study to ensure that the SME has accurately described the work and that the outcome reflects BOTS Consulting's process for solving this customer's specific problem. If the technical director approves the content, the posting is then reviewed by the practice manager, who also has the ability to make changes to the content; primarily, the practice manager is looking to ensure that the case study fits an "ideal" customer. If either of these individuals declines the case study, it is returned to the original author for corrections. •
Table of Contents Figure 37-3. Example workflow process for BOTS Consulting
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. After the practice area finishes reviewing the content, the posting moves on to the marketing department. the practice area, is responsible for shows reviewing This thoroughLike reference explains themarketing product architecture, then you the howcontent. to create and However, in this case, instead of reviewing the content for technical accuracy, wants edit content and use the workflow. Topic coverage includes CMS administrationmarketing and security, to ensure that API, the case study accurately represents the firm. Further, they wish to ensure the Publishing deployment options, site configuration, and template development. A that the caseexample study is is written in the right the tonebook of voice and thathow anyimportant offerings mentioned in the running used throughout to illustrate CMS features arecase study are consistently described. implemented in real-world Web site development. Inside you'll find answers to such questions as: Now, without continuing the description of the BOTS workflow, you should be seeing a pattern here. Not only are we providing a visual representation of the workflow, but we're also Chapter 6: How do workflow? providing a narrative. In you this customize way, you are providing everyone with a clear understanding of what happens to content as well as who is involved. The workflow diagram and written Chapter How dobusiness you develop forand Microsoft Content create Management Server (CMS) 2002 description will10: help your users the developers the appropriate workflow using Visual Studio .NET? actions within CMS. Chapter [ Team LiB ] 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Role Definition In the preceding workflow process, we illustrated how BOTS Consulting handles the production of its content. However, this workflow diagram only shows the BOTS business definitions. It does not map the business definitions to actual roles within CMS. In Chapter 6, we showed how CMS defines various roles. In order to make this process work, you need to map each business user to a specific CMS role. In BOTS Consulting, there are several groups represented. The SME creates the case study, the technical director and practice manager edit and review the content, and the marketing department also and reviews. Finally, the legal department approves the copy produced, • Table edits of Contents and the case study publishes to the Web site. Now, to map each of these groups to a role, we Microsoft Content Management Server 2002: A Complete Guide need to quickly review the CMS roles involved in content creation: ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Author: The author role allows individuals to create and edit their own content; this role to modify other authors' content (while in the workflow Pub Date: October 2003 process), but31, they can submit content for approval. In BOTS's case, the SME should ISBN: 0-321-19444-6 rightly be put in an author role for the purposes of case studies; the SME simply creates the case studies and submits that content for review and approval. Pages: 1136
Publisher: Addison Wesley does not allow an individual
Editor: The editor role allows individuals to create their own content as well as edit and review other authors' content. This role also has the responsibility of approving content within the site. Where BOTS is concerned, there are three likely candidates for the role of "This is one of those rare books that you will read to learn about the product and keep editor: the technical director, the practice manager, and marketing. Each of these people rereading to find those tidbits that you missed before." requires the ability to edit someone else's work and needs the ability to approve content. —Gary Bushey, SharePoint Server MVP Moderator: A moderator approves placement of content and all page properties. Within Content Management Server (CMS) is fast becoming a vital content-management tool that the context of CMS, moderators are only involved in the initial approval of the posting helps administrators and developers handle the ever-increasing amount of content on their properties created during the content creation process. Unless the attributes of a posting Web sites. However, an authoritative source of product information has been missing . . . until are changed (i.e., start date, display name, important flag, and so on), the moderator now. isn't involved in subsequent content changes. BOTS's legal department will be a likely candidate forManagement the moderator role. 2002: This assumes, however, they be Microsoft Content Server A Complete Guide that is the firstdon't bookwant that to explains involved in the future changes in the content. If this assumption is not accurate, then how to effectively unlock the power of CMS. Administrators and developers alike will learn how BOTS may put the legal department in and an editor role. by using CMS features and to enhance their wish Web to servers' scalability, flexibility, extensibility API to manage content on the Microsoft platform. It is important that you understand how your firm creates and approves content. Ensuring that the right individuals are put in thethe right roles in CMS will minimize the amount This thorough reference explains product architecture, then shows you howoftocustom create and workflow code required to power your Web site. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A [ Team LiB ] running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Content Import
Once you have finished all the other steps in this process, you have to import your content into CMS. Impo your content (or content conversion, as it is sometimes called) is the process of creating postings within CM and filling the placeholders within those postings with the content in your existing site.
Since most sites are rather unique, it would be difficult to describe what you specifically must do to convert your content. However, there are two general approaches to migrating your content: an automated import a manual import. •
Table of Contents
Automated Import
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
If your current site is already in a structured format (e.g., in a database or using templates), then it may b possible to directly import your content. The following code sample demonstrates, in C#, how to Publisher: Addison create Wesley a posting, populate the placeholders, and submit it for approval. programmatically Pub Date: October 31, 2003
[View ISBN: full0-321-19444-6 width] using Pages: System; 1136 using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; "This one of those rare books that you will read to learn about the product and keep usingisSystem.Web; rereading to find those tidbits that you missed before." using System.Web.SessionState; —Gary Bushey, SharePoint Server MVP using System.Web.UI; using System.Web.UI.WebControls; Content Management Server (CMS) is fast becoming a vital content-management tool that using System.Web.UI.HtmlControls; helps administrators and developers handle the ever-increasing amount of content on their using Microsoft.ContentManagement.Publishing; Web sites. However, an authoritative source of product information has been missing . . . until using Microsoft.ContentManagement.Publishing.Extensions.Placeholders; now. using Microsoft.ContentManagement.Web.Security; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains namespace botsconsulting.ContentImport how to effectively unlock the power of CMS. Administrators and developers alike will learn how { enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and to /// <summary> API to manage content on the Microsoft platform. /* This page allows for an import ofthen structured content This thorough reference explains theautomated product architecture, shows you how to create and The file assumes that you have two server controls on your file: edit content and use the workflow. Topic coverage includes CMS administrationASPX and security, A list box called lstImportList the Publishing API, deployment options, site configuration, and template development. A - Ais button called btnGo running example used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions This is meant to be a template file, associated with a TGI. Once you've created as: your template, you must create a posting to run the code. */ Chapter 6: How do you customize workflow? ///
Chapter How ContentImport do you develop for Microsoft Content Management Server (CMS) 2002 public10: class : System.Web.UI.Page using Visual Studio .NET? { protected Microsoft.ContentManagement.WebControls.RobotMetaTag RobotMetaTag1; Chapter 17: How do you establish user rights? protected System.Web.UI.WebControls.ListBox lstImportList; protected System.Web.UI.WebControls.Button btnGO; Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? private void Page_Load(object sender, System.EventArgs e)
{ Chapter 32: How do you publish dynamic data? if (CmsHttpContext.Current.Mode != Microsoft.ContentManagement
[.Publishing.PublishingMode.Update) Team LiB ] { Response.Redirect(CmsHttpContext.Current.Posting.UrlModeUpdate); } if (!this.IsPostBack) {this.AddLogEntry("Current CMS Publishing Mode: " + CmsHttpContext .Current.Mode);} } private bool CreatePosting(string strPostingName, string strTitle, string strByLine, string strTeaser, string strBodyCopy) { // CreatePosting handles the work of creating the new posting. It take the necessary parameters to create // the new posting, but assumes the channel and template. This code could be expanded to include those • Table of Contents // items as well. Microsoft Content Management Server 2002: A Complete Guide
Create reference to the channel ByBill English, Olga Londer// , Shawn Shell,a Todd Bleeker, Stephen Cawood
where the posting will be created Channel objRootChannel = CmsHttpContext.Current.RootChannel; try { Publisher: Addison Wesley // Make sure that the current user can add postings to the channe Pub Date: October 31, 2003 if (objRootChannel.CanCreatePostings) ISBN: 0-321-19444-6 { Pages: 1136 // Create a reference to the template you're going to use with the new posting Template objArticleTemplate = (Template)CmsHttpContext .Current.Searches.GetByPath("/Templates/Insight/HTMLArticle"); "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you // missed Createbefore." the new posting in the channel —Gary Bushey, SharePoint Server MVP Posting objNewPosting = objRootChannel.CreatePosting (objArticleTemplate); Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers// handle ever-increasing amount of content theirfill in the Givethe the posting a name, display nameonand Web sites. However, an authoritative source of product information has been missing . . . until placeholders now. objNewPosting.Name = strPostingName; objNewPosting.DisplayName = strTitle; Microsoft Content Management Server 2002: A Complete Guide is the first book that explains HtmlPlaceholder objPlaceholder = how to effectively unlock the power of CMS. Administrators and developers alike will learn how (HtmlPlaceholder)objNewPosting.Placeholders["strArticleAuthor"]; to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and objPlaceholder.Html = strByLine; API to manage content on the Microsoft platform. objPlaceholder = (HtmlPlaceholder)objNewPosting .Placeholders["strArticleTeaser"]; This thorough reference explains the product architecture, then shows you how to create and objPlaceholder.Html = strTeaser; edit content and use the workflow. Topic coverage includes CMS administration and security, objPlaceholder = (HtmlPlaceholder)objNewPosting the Publishing API, deployment options, site configuration, and template development. A .Placeholders["strArticleBodyCopy"]; running example is used throughout the book to illustrate how important CMS features are = strBodyCopy; implemented in real-world Web site objPlaceholder.Html development. Inside you'll find answers to such questions as:
// Put an entry in the list box indicating you've successfully added the posting this.AddLogEntry (objNewPosting.Name + " added successfully Chapter 6: How do you customize workflow? Chapter 10: How do you develop Microsoft (CMS) 2002 // for Commit the Content change Management to the CMS Server repository using Visual Studio .NET? CmsHttpContext.Current.CommitAll(); Chapter 17: How do you establish user rights? // Submit the new posting for approval objNewPosting.Submit(); Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? // Return a successful import
return true; Chapter 32: How do you} publish dynamic data?
else {
[ Team LiB ]
// If the user does not have sufficient rights, add an entr to the list box
this.AddLogEntry("User did not have sufficient rights to ad a posting."); return false; } } catch {
// If an exception is thrown, simply add an entry to the list box this.AddLogEntry("An exception was thrown when trying to create the posting."); return false; •
Table of Contents }
Microsoft Content Management Server 2002: A Complete Guide
} Londer,Shawn Shell,Todd Bleeker,Stephen Cawood ByBill English, Olga
private void ImportContent() { // Add two entries to the list box, indicating the process has begun an Publisher: Addison Wesley who is logged on Pub Date: October 31, 2003 this.AddLogEntry("Starting import."); ISBN: 0-321-19444-6 this.AddLogEntry("User logged on: " + CmsHttpContext.Current.User Pages: 1136 .ClientAccountName.ToString());
// Try to create the posting, passing in the appropriate values. While this call "This is one of those rare bookspasses that youa will read to learn about product // only single argument, youthecan pass and in keep multiple argues by rereading find those tidbits that you missed before." looping to through —Gary Bushey, SharePoint Server MVP or other data source. // a recordset if (!CreatePosting("MyPageName","My Title","First placeholder value" Content Management Server (CMS) is fastplaceholder becoming a vital content-management tool that ,"Second placeholder value","Third value")) helps administrators and developers handle the ever-increasing amount of content on their { Web sites. However, an authoritative source of product information has been missing . . . until this.AddLogEntry("Import failed."); now. } else Microsoft Content Management Server 2002: A Complete Guide is the first book that explains { how to effectively unlock the power of CMS. Administrators and developers alike will learn how this.AddLogEntry("Import succesful."); to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and } API to manage content on the Microsoft platform. } void AddLogEntry(string strLogEntry) This thorough public reference explains the product architecture, then shows you how to create and { edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A // throughout This is a the simple log adds items to theare list box running example is used book progress to illustrate howthat important CMS features ListItem lstItem = new ListItem(); implemented in real-world Web site development. Inside you'll find answers to such questions lstItem.Text = System.DateTime.Now + " :: " + strLogEntry; as: lstImportList.Items.Add(lstItem); } #region Designer generated code Chapter 6: How doWeb you Form customize workflow? override protected void OnInit(EventArgs e) Chapter 10: { How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio // .NET? // CODEGEN: This call is required by the ASP.NET Web Form Designer. Chapter 17: How// do you establish user rights? InitializeComponent(); Chapter 22: Howbase.OnInit(e); do you best deploy CMS according to your organization's needs, size, and resources? } Chapter 32: do you publish dynamic data? ///How <summary>
[ Team LiB ]
/// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.btnGO.Click += new System.EventHandler(this.btnGO_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void btnGO_Click(object sender, System.EventArgs e) { ImportContent(); }
•
}
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide } ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
In Figure 37-4 you can see how this automated import process works. The interface is rudimentary but serv its purpose. Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Figure 37-4. View of the template as a posting
Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Manual Import (Copy-and-Paste Method)
Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Frankly, most WebStudio sites are not very structured. If your Web site is like most, it would be difficult or impos using Visual .NET? to extract content from HTML files (primarily because it would be difficult to distinguish between HTML for formatting and17: HTML is necessary the content). As a result, manually copying and pasting content Chapter Howthat do you establishfor user rights? your old site to the new one is what a lot of firms end up doing. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Ultimately, you will probably end up using a combination of the automated and manual methods. There will and resources? probably be a number of pages that have some regular structure to them. These pages may be imported Chapter How do you publish dynamic through some32: scripted import, since they followdata? some regular pattern (developers like consistency). Howev the vast majority will likely follow an inconsistent format. As a result, it will be impossible to extract the con
an automated way. On the upside, these inconsistent pages do make for a great training exercise for you [inTeam LiB ] content contributors (see the next section). [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Technical and Content Contributor Training There are two types of training curricula that need to be developed: technical and content contributor. The technical track will target your technical staff, largely made up of your development staff responsible for implementing CMS. However, keep in mind that running a Web site is more than a development effort—your network security and data center folks will also want to understand how CMS integrates with the current technical infrastructure. When looking for training programs, you should certainly consider the Microsoft certified training courses. In addition, there are a number of commercial firms that offer short fix-priced engagements targeted at providing practical experience by allowing your staff to work with professionalsTable whoofhave implemented the tool. • Contents Microsoft Content Management Server 2002: A Complete Guide
Now, training your content contributors is a little trickier. Unlike training your technical staff, teaching your business users the tool is not useful. Most courses are structured to use a sample site, which will bear no resemblance to your new Web site. As a result, the training program will not be very effective in teaching your content contributors how to use this tool in conjunction Publisher: Addison Wesley with your Web site. Remember, what the content contributors see is not CMS but your Web site Pub Date: October 31, 2003 using CMS functionality; there will be many features that are not "native" CMS. For example, ISBN: 0-321-19444-6 you may implement a feature that allows a business user to simply click a link that reads "Click Pages: Here to Add1136 Another News Story." In the background, you programmatically pick the appropriate template and create the posting in the current channel. In this case, you are technically using standard CMS functionality, but it is not something a commercial course would teach. Consider developing your own custom course for your site. In addition to being able to teach is the specific steps that a content contributor must take to add content your site, "This one of those rare books that you will read to learn about thenew product and to keep you will beto able dramatically reduce training time required; most commercial courses are rereading findtothose tidbits that you the missed before." at least Bushey, five days, with a heavy emphasis —Gary SharePoint Server MVP on technical training. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Content Management Server (CMS) is fast becoming a vital content-management tool that [ Team LiB ] helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Upgrading from CMS 2001 to 2002 The basic installation of CMS 2002 is straightforward, and the documentation from Microsoft is pretty clear. There are, however, some major changes (as you have seen) between the products that must be taken into account. Specifically, we will discuss the following: backing up your existing site, uninstalling CMS 2001, finding and reviewing your old templates, and running in mixed mode. As with any upgrade, you should refer to the product documentation for specifics. [ Team LiB ] •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Backing Up Your Existing Site For obvious reasons, the most important task to do when upgrading your site is to back up your existing implementation. There are three parts to your site: file-based assets, customizations, and the repository. Each part needs to be handled separately as you upgrade.
•
File assets: The file assets are files that aren't included in the repository. These file assets include everything from your include files to the images that make up your site design. If you have created a special directory for all these assets, the process of backing them up is probably trivial. Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Customizations: Customizations are a little harder to track down, especially if you did not customizations, we are talking about any additional code added to CMS-supplied files. For example, a common customization is to send e-mail when someone submits content for approval. This code Publisher: Addisonbe Wesley can usually found in the Workflowhooks.inc file. When you upgrade, you should capture Pub October 31, 2003 allDate: of these kinds of files, because when you uninstall CMS 2001 in the next step, you'll ISBN: 0-321-19444-6 lose those files. Since there are other "hook" files in CMS 2001, you should perform a thorough Pages: 1136review of your current CMS implementation to ensure that nothing is missed.
ByBill English , Olga Londer , Shawn , Todd BleekerWhen , Stephen implement the site you Shell are upgrading. weCawood talk about
Your repository: Your repository is the SQL database to which your CMS server(s) connects. If you are not sure what database or database server you are using, you can look at the Server Configuration Application (SCA); it is located under Programs > "This is one of those rare books that you will read to learn about the product and keep Content Management Server > Server Configuration Application. The SCA lists the rereading to find those tidbits that you missed before." database server and database at the top of its main interface. Since the upgrade process —Gary Bushey, SharePoint Server MVP makes changes to the database structure and contents, it is a good idea (no, it is a great idea) to have a backup runbecoming the installation Content Management Server before (CMS) you is fast a vital process. content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until [ Team LiB ] now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Uninstalling CMS 2001 CMS 2001 and CMS 2002 cannot exist on the same server. As a result, you must uninstall CMS 2001 before running the CMS 2002 installation process. Uninstalling CMS 2001 is as simple as going to the Control Panel, picking Add/Remove Software, finding CMS 2001 on the list, and uninstalling the application. Depending on your implementation, you will have one or all of the following: the server, Site Builder, and Site Stager. In a standard implementation, CMS installs in X:\Program Files\Microsoft Content Management Server, where X is the drive on which you installed the server. Be sure to uninstall all components of CMS 2001 before running the CMS 2002 installation process. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
[ Team LiB ]
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Finding and Reviewing Your Templates One of the changes in CMS 2002 is that your templates are now stored on the file system. When the upgrade process runs, it removes the templates from the database and places them on the file system. For each template in your old 2001 site, a template gallery item (TGI) will be created and a physical ASP file will be created in a subdirectory of NR (depending on your implementation). Once the upgrade is complete, you can begin reviewing and converting your templates. One advantage of the new TGI/physical file model of CMS 2002 is that you can replace the underlying template file without affecting the TGI or its relationship to your postings. In CMS • Table of Contents 2002, postings technically associated with theGuide TGI, not the template file. When you rewrite Microsoft Content are Management Server 2002: A Complete your ASP templates in ASP.NET, you can simply point the TGI to a new template file. The same ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood is true with placeholders. Each placeholder control is bound to a placeholder definition, just as a template file is tried to a TGI. As you add placeholder controls to your new template, bind those placeholder controls to the placeholder definitions created during the upgrade process. Publisher: Addison Wesley
Pub Date: [ Team LiB ]October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Running in Mixed Mode CMS 2002 supports both ASP and ASP.NET templates. If you install a clean copy of CMS 2002, you'll be asked whether you want CMS to support mixed mode; essentially, you'll need to instruct setup whether you want to support both ASP- and ASP.NET-based templates, or just the ASP.NET-based templates. In the case of an upgrade, CMS does not give you a choice; once you have finished your upgrade process, you'll be running in mixed mode. Running in mixed mode is very much like running mixed verses "native" mode in Windows 2000, in the sense that you are supporting two different architectures. In the case of Windows 2000, you were are) supporting both Domain security and pure Active Directory. In the • Table(or of Contents case of CMS 2002, you are Server supporting ASP 3.0 and ASP.NET (all the files to support both Microsoft Content Management 2002: both A Complete Guide are installed as part of running in mixed mode). In your converted templates, you will still see ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood the old Autosession object, along with other elements such as Channels and Postings. There are some differences between the 2002 COM API and the 2001 version (most notably the way placeholders and the edit console are handled), but there is little material difference. Publisher: Addison Wesley
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136 NOTE: There is really no way to take your server out of mixed mode. During the installation process, all the files necessary to support both ASP.NET and ASP templates were installed. If you want a "clean" CMS 2002 installation, you will have to create an export package, copy off your project, reinstall the server on a clean copy your projectthat back, the CMSabout package you made earlier. "Thisdatabase, is one of those rare books youand willimport read to learn the product and keep
rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP
[ Team LiB ] Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary In this chapter, we have reviewed how to migrate your non-CMS site to Content Management Server as well as reviewing some key points when you are upgrading from CMS 2001. If you are migrating your site from an unstructured to a structured environment, you must spend more time up front examining your site. We pointed out several tools that you could use to document your site, such as an information architecture, a functionality inventory, and a content inventory. In addition, we discussed two approaches for importing your content, understanding content workflow, defining the workflow roles, and training both your content contributors and your technical staff. •
Table of Contents
If you are upgrading your site from CMS 2001 to Guide 2002, Microsoft Content Management Server 2002: A Complete
there are some additional tasks that you must be aware of. First and foremost, backing up your existing implementation is key to a ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood successful upgrade. We also discussed where to find your old templates and how to convert them to .NET templates. Publisher: Addison Wesley [ Team LiB ] Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Part X: Appendixes Appendix A. HTTP Reference Appendix B. Publishing API Reference [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Appendix A. HTTP Reference Overview HTTP Request HTTP Response General Header Fields •
Table of Contents
Entity Header Fields Server 2002: A Complete Guide Microsoft Content Management ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Summary [ Team LiB ]
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Overview The Hypertext Transfer Protocol (HTTP) is an application-level protocol that defines the information interchange between HTTP clients, commonly known as Web browsers, and HTTP servers, commonly referred to as Web servers. HTTP uses the request-response message mechanism for communication between a client and a server. An HTTP client opens a connection and sends a request message to an HTTP server; the server then returns a response message, usually containing the resource that was requested. After delivering the response, the server closes the connection. HTTP is a stateless protocol—that is, it does not maintain any connection information across requests. •
Table of Contents
Three versions HTTP have been2002: usedA on the Internet Microsoft Content of Management Server Complete Guide
since 1990: 0.9, 1.0, and 1.1. The HTTP version number consists of a major and a minor part. A minor number change implies the ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood addition of some field values that do not change the general message-parsing algorithm. Major numbers are changed when the format of the message is altered. Addison Wesley ThePublisher: first version of HTTP was HTTP/0.9. It was a simple protocol for ASCII data transfer across Pub Date: October 31, 2003 The next version, HTTP/1.0, was defined by RFC 1945. It brought a TCP/IP-based network. ISBN:changes 0-321-19444-6 significant to the original protocol by allowing both requests and responses to contain Pages: 1136 metadata describing the data being transferred, as well as additional modifiers. The requests and responses are based on the message format defined by the Multipurpose Internet Mail Extensions (MIME) in RFC 1521 and later in RFC 2045. For example, the introduction of a content-type header allowed multimedia data transfer from the server to the client, so that client is software can display not only text but to other media such asand images, "This one of those rare books thatASCII you will read learn abouttypes, the product keep sound, and video.to That's what made desktop browsers as we know them today. rereading find those tidbits possible that youGUI missed before."
—Gary Bushey, SharePoint Server MVP Both request and response messages consist of an initial line, zero or more header lines, a blank lineManagement (i.e., a CRLF—carriage return, line feed—byaitself), and an optional message-body. Content Server (CMS) is fast becoming vital content-management tool that Initial lines for requests and responses are different. Header lines are usually different as well; helps administrators and developers handle the ever-increasing amount of content on their however, headers may be used source in bothof requests responses. general format for Web sites.some However, an authoritative productand information hasThe been missing . . . until request and response messages is as follows: now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains unlock the power of CMS. Administrators and developers alike will learn how how to effectively Header1: to enhancevalue1 their Web servers' scalability, flexibility, and extensibility by using CMS features and Header2: value2 API to manage content on the Microsoft platform. ... This thorough reference explains the product architecture, then shows you how to create and HeaderN: valueN edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Initial lines and headers should end in CRLF; CR and LF here mean ASCII values 13 and 10.
A typical example of HTTP/1.0 request-response interchange is shown in Figure A-1. In this Chapter 6: Howsends do you customize example, a browser a request to aworkflow? server asking for a file called page.html located in the root folder of the Web server. The HTTP initial request line has three parts, separated by Chapter 10: How dothe youlocal develop Microsoft Content Management 2002 spaces: a method name, pathfor of the requested resource, and theServer version(CMS) of HTTP using Visual Studio .NET? being used, as follows: Chapter 17: How do you establish user rights? GET /page.html HTTP/1.0 Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources?
Figure HTTP/1.0 Chapter 32: How doA-1. you publish dynamicclient-server data?
interaction
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addisongets Wesley When the server the request, it retrieves the file, forms a response, and sends the response back to the requesting client as follows: Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
HTTP/1.0 200 OK Content-Type: text/html "This ... is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) fast becoming vital content-management tool that The initial response line is called the is status line. It hasa three parts separated by spaces: the helps administrators and developers handlephrase the ever-increasing of content on their HTTP version, a status code, and a reason describing theamount status code. The Content-Type Web sites. However, an authoritative of product information has been missing message . . . until header specifies the media type of thesource data being sent to the client in the response's now. body in the format of the MIME type. Because the server is sending back an HTML file, the
MIME type is text/html. The body of the message contains the requested resource; the header Microsoft Content Server 2002:line A Complete lines and the bodyManagement are separated by a blank (CRLF). Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance Web scalability, flexibility, and extensibility by using CMS features HTTP/1.1 is their defined byservers' RFC 2616. It extends the functionality of HTTP/1.0 by adding supportand API to manage content on the Microsoft platform. for virtual server hosting, persistent connections between the client and the server, caching, hierarchical proxies, and gateways. For example, an HTTP/1.1 request must include the Host This thorough reference explains theas product then shows you how to create and header that identifies a Web server, shownarchitecture, in Figure A-2. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A A-2. HTTP/1.1 interaction running exampleFigure is used throughout the book client-server to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
NOTE: Modern browsers, as well as HTTP proxy servers, include support for both users can easily disable HTTP/1.1 on their client Pub Date: October 31, want. 2003 Also, it is possible to configure a proxy server to use only software if they HTTP/1.0. These factors mean that Web servers need to support both HTTP/1.1 and ISBN: 0-321-19444-6 HTTP/1.0 so that they are able to communicate with the widest possible variety of Pages: 1136 requesting clients.
Publisher: Addison HTTP/1.0 andWesley 1.1. However,
"This is one of those rare looks booksinto thatthe youformats, will readmethods, to learn about product and keep The rest of this appendix headerthe fields, and status codes for rereading to find those tidbits that you missed before." HTTP requests and responses. It includes partial quotes from RFC 2616. For the detailed —Gary Bushey, SharePoint MVP specification, refer to the fullServer version of RFC 2616. Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their [ Team LiB ] Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
HTTP Request An HTTP request from a client to a server defines the HTTP method to be applied to a requested resource, the identifier of the resource, and the HTTP protocol version in use on the client. The request may include the MIME-like header fields that indicate the purpose of a request and provide additional information. The initial request line begins with a method token, followed by the Request-URI and the protocol version, and ending with CRLF. The elements are separated by the space (SP) character, as follows: •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
The resource upon which to apply the request is identified by a Request-URI (Uniform Resource Publisher: Addison Wesley Identifier). Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
NOTE: As far as HTTP is concerned, Uniform Resource Identifiers are simply formatted strings that identify—via name, location, or any other characteristic—a resource. A Uniform Resource Locator (URL) is a form of URI. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP is that used to identify a resource on a Web server. In The most common form of Request-URI this case, the path of the URI is transmitted as the Request-URI in the initial line, and the Content Management Server (CMS) is fast becoming a vital content-management tool that network location of the URI is transmitted in a Host header field. For example, when a user helps administrators and developers handle the ever-increasing amount of content on their types or clicks http://www.botsconsulting.com/about/default.htm in a browser, an HTTP/1.1 Web sites. However, an authoritative source of product information has been missing . . . until client will create a TCP connection to port 80 of the host www.botsconsulting.com and send the now. following at the beginning of the request: Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how GET /about/default.htm HTTP/1.1 to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Host: www.botsconsulting.com API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A NOTE: A Request-URI cannot be empty. If the path is not present in the original URL, running example is used throughout the book to illustrate how important CMS features are itmust be given as "/" (the server root). implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? HTTP Methods Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 HTTP using method names are .NET? case-sensitive. The methods defined in RFC 2616 are as follows: Visual Studio Chapter 17: How do you establish user rights? TheOPTIONS method represents a request for information about the communication options available chain identified byorganization's the Request-URI. Thissize, Chapter 22: How on do the yourequest-response best deploy CMS according to your needs, method allows the client to determine the options and/or requirements associated with a and resources? resource, or the capabilities of a server, without implying a resource action or initiating resource32: retrieval. Chapter How do you publish dynamic data?
The GET [ Team LiB ] method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data that will be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process. TheHEAD method is identical to GET except that the server must not return a messagebody in the response. The meta information contained in the HTTP headers in response to a HEAD request should be identical to the information sent in response to a GET request. ThePOST method is used to request that the server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:
•
Annotation of existing resources Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Posting a message to a bulletin board, newsgroup, mailing list, or similar group of
ByBill Englisharticles , Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Providing a block of data, such as the result of submitting a form, to a data-handling Publisher:process Addison Wesley Pub Date: October 31, 2003
a database ISBN:Extending 0-321-19444-6
through an append operation.
Pages: 1136
The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a "This database. is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server The PUT method requests thatMVP the enclosed entity be stored under the supplied RequestURI. If the Request-URI refers to an already existing resource, the enclosed entity should Content Management (CMS) is fastofbecoming a vital content-management tool that be considered asServer a modified version the one residing on the server. If the Request-URI helps does administrators and handle the amount of content onastheir not point to andevelopers existing resource, andever-increasing that URI is capable of being defined a new Web sites. However, authoritative hasresource been missing . . . URI. until resource by the an requesting user source agent, of theproduct server information can create the with that now. TheDELETE method requests that the server delete the resource identified by the Microsoft Content Management A Complete Guideintervention is the first book that means) explainson Request-URI. This methodServer may be2002: overridden by human (or other how to effectively unlock the powerbe ofguaranteed CMS. Administrators and developers alike will learn the server. The client cannot that the operation has been carried out, how even to enhance their Web scalability, andindicates extensibility CMS and if the status codeservers' returned from the flexibility, origin server that by theusing action hasfeatures been API tocompleted manage content on the Microsoft platform. successfully. This thorough reference the product architecture, then shows loopback you how of to the create and TheTRACE methodexplains is used to invoke a remote, application-layer request edit content andThe usefinal the recipient workflow.ofTopic coverage includes CMS administration and security, message. the request should reflect the message received back to the Publishing deployment options, site(OK) configuration, the clientAPI, as the entity-body of a 200 response. and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web siteisdevelopment. Inside you'll find answers such questions TheCONNECT method name reserved for use with a proxy that can to dynamically switch as: to being a tunnel (e.g., SSL tunneling). Chapter 6: How do you customize workflow?
NOTE: The list of methods allowed by a resource can be specified in an Allow header Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 field (see the General Header Fields section in this appendix). The return code of the using Visual Studio .NET? response always notifies the client whether a method is currently allowed on a resource, since the set of allowed methods can change dynamically. An origin server Chapter 17: How do you establish user rights? should return the status code 405 (Method Not Allowed) if the method is known by the origin22: server for the requested resource, and 501 (Not needs, size, Chapter Howbut do not you allowed best deploy CMS according to your organization's Implemented) if the method is unrecognized or not implemented by the origin server. and resources? Chapter 32: How do you publish dynamic data?
[Request Team LiB ]Header
Fields
The request header fields allow the client to pass additional information about the request, and about the client itself, to the server. These fields act as request modifiers, with semantics equivalent to the parameters on a programming language method invocation. The request header fields defined in RFC 2616 are as follows: TheAccept header field can be used to specify certain media types that are acceptable for the response. Accept headers can be used to indicate that the request is specifically limited to a small set of desired types, as in the case of a request for an inline image. TheAccept-Charset header field can be used to indicate what character sets are acceptable for the response. This field allows clients capable of understanding more • Table of Contents comprehensive or special-purpose character sets to signal that capability to a server that Microsoft Content Management Server 2002: A Complete Guide is capable of representing documents in those character sets. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
TheAccept-Encoding header field is similar to Accept, but restricts the content-codings that are acceptable in the response. Publisher: Addison Wesley
The Accept-Language Pub Date: October 31, 2003
header field is similar to Accept, but restricts the set of natural languages that are preferred as a response to the request. ISBN: 0-321-19444-6
Pages: 1136
TheAuthorization header field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. TheExpect header field is used to indicate that particular server behaviors are required the of client. "This by is one those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." The From header field Server contains an Internet e-mail address for the human user who —Gary Bushey, SharePoint MVP controls the requesting user agent, if given. This is not supported by most browsers. Content Management Server (CMS) is fast becoming a vital content-management tool that Host headerand field specifies the Internet host and port number resource being helps The administrators developers handle the ever-increasing amountofofthe content on their requested, as obtained from the source originalofURI giveninformation by the userhas or referring resource Web sites. However, an authoritative product been missing . . . until now. (generally, an HTTP URL). The Host field value must represent the naming authority of the server or gateway given by the original URL. This allows the server or gateway to differentiate internally ambiguous URLs, such as the rootfirst "/" book URL of a server for Microsoft Content between Management Server 2002: A Complete Guide is the that explains multiple hostunlock namesthe on power a singleofIP address. how to effectively CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and If-Match header fieldMicrosoft is used with a method to make it conditional. A client that has API toThe manage content on the platform. one or more entities previously obtained from the resource can verify that one of those entities isreference current by including list of their associatedthen entity tagsyou in the If-Match header This thorough explains theaproduct architecture, shows how to create and field. and use the workflow. Topic coverage includes CMS administration and security, edit content the Publishing API, deployment options, site configuration, and template development. A Theexample If-Modified-Since header field is used with a method to make it conditional: If the running is used throughout the book to illustrate how important CMS features are requested hasWeb not been modified since the time specified in thisto field, entity will implemented in variant real-world site development. Inside you'll find answers suchan questions as: not be returned from the server; instead, a 304 (Not Modified) response will be returned without any message-body. TheIf-None-Match header field isworkflow? used with a method to make it conditional. A client Chapter 6: How do you customize that has one or more entities previously obtained from the resource can verify that none Chapter Howisdo you develop for Microsoft Management 2002 of those 10: entities current by including a list ofContent their associated entityServer tags in(CMS) the If-Noneusing MatchVisual headerStudio field. .NET? The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. Chapter 17: How do you establish user rights? TheIf-Range header field allows a client to "short-circuit" the second request. Informally, Chapter 22: is How best CMS according to your organization's needs, size, its meaning "If do theyou entity is deploy unchanged, send me the part(s) that I am missing; and resources? otherwise, send me the entire new entity." If a client has a partial copy of an entity in its cache and wants to have an up-to-date copy of the entire entity in its cache, it could use Chapter 32: How do you publish data? the Range request header with a dynamic conditional GET (using either If-Unmodified-Since or If-
Match, [ Team LiB ] or both.) However, if the condition fails because the entity has been modified, the client would then have to make a second request to obtain the entire current entity-body. TheIf-Unmodified-Since header field is used with a method to make it conditional. If the requested resource has not been modified since the time specified in this field, the server should perform the requested operation as if the If-Unmodified-Since header were not present. TheMax-Forwards header field provides a mechanism with the TRACE and OPTIONS methods to limit the number of proxies or gateways that can forward the request to the next inbound server. This can be useful when the client is attempting to trace a request chain that appears to be failing or looping in midchain. TheProxy-Authorization header field allows the client to identify itself (or its user) to a proxy that requires authentication. The Proxy-Authorization field value consists of credentials • Tablecontaining of Contents the authentication information of the user agent for the proxy and/or realm of the resource being requested. Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
TheRange header field allows the client to define the byte range specifications that apply to the sequence of bytes in the entity-body (not necessarily the same as the messagebody). A byte range operation may specify a single range of bytes or a set of ranges Publisher: Addison Wesley within a single entity. HTTP retrieval requests using conditional or unconditional GET Pub Date: October 31, 2003 methodsmay request one or more subranges of the entity instead of the entire entity, ISBN: the 0-321-19444-6 using Range request header, which applies to the entity returned as the result of the Pages: 1136 request
TheReferer header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the "referrer," although header fieldrare is misspelled). a server generate "This the is one of those books that The you Referer will readrequest to learnheader about allows the product andtokeep lists of resources for missed interest, logging, optimized caching, and so on. rereading to back-links find those to tidbits that you before." —Gary Bushey, SharePoint Server MVP TheTE header field indicates what extension transfer-codings the client is willing to accept in the response and whether it is is fast willing to accept trailer fields in a chunked transferContent Management Server (CMS) becoming a vital content-management tool that coding. Its value may consist of the keyword "trailers" and/or a comma-separated list of helps administrators and developers handle the ever-increasing amount of content on their extension transfer-coding namessource with optional accept parameters. Web sites. However, an authoritative of product information has been missing . . . until now.
TheUser-Agent header field contains information about the user agent originating the request. ThisManagement is for statistical purposes, tracing of protocol violations, and automated Microsoft Content Server 2002: the A Complete Guide is the first book that explains recognition of user agents for the sake of tailoring responses to avoid particular user how how to effectively unlock the power of CMS. Administrators and developers alike will learn agent limitations. User agents shouldflexibility, include this with requests. TheCMS fieldfeatures can contain to enhance their Web servers' scalability, andfield extensibility by using and comments identifying the agent and any subproducts that API tomultiple manageproduct contenttokens on theand Microsoft platform. form a significant part of the user agent. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, [ Team LiB ] API, deployment options, site configuration, and template development. A the Publishing running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
HTTP Response The HTTP response message consists of an initial status line, one or more header fields, a blank line (CRLF) and an optional message body. The status line consists of the protocol version followed by a numeric status code and its associated textual phrase, with each element separated by space (SP) characters, as follows:
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF •
Table of Contents
The Status-Code element is a three-digit integer result code of the attempt to understand and satisfy the request. The first digit of the Status-Code defines the class of response. The last two ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood digits do not have any categorization role. The Reason-Phrase is intended to give a short textual description of the Status-Code; the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase. Microsoft Content Management Server 2002: A Complete Guide
Publisher: Addison Wesley
Pub Date: October 31, 2003 ISBN: 0-321-19444-6 HTTP Status Codes Pages: 1136
The HTTP status codes and their corresponding Reason-Phrases as defined in RFC 2616 are as follows: "This is one of those rare books that you will read to learn about the product and keep rereading find those tidbits you missed before."continuing process. 1xx: to Informational— Thethat request was received; —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that 100— Continue helps administrators and developers handle the ever-increasing amount of content on their Switching Protocols source of product information has been missing . . . until Web sites. 101— However, an authoritative now. 2xx: Success— The action was successfully received, understood, and accepted. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how OK servers' scalability, flexibility, and extensibility by using CMS features and to enhance200— their Web API to manage content on the Microsoft platform. 201— Created This thorough reference explains the product architecture, then shows you how to create and 202— Accepted edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A 203— Non-Authoritative Information running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions 204— No Content as: 205— Reset Content Chapter 6: How doContent you customize workflow? 206— Partial Chapter 10: How do you develop Microsoft Content Management (CMS) 2002 3xx: Redirection— Further action for must be taken in order to completeServer the request. using Visual Studio .NET? Chapter 17:Multiple How doChoices you establish user rights? 300— Chapter 22:Moved How do you best deploy CMS according to your organization's needs, size, 301— Permanently and resources? 302— Found Chapter 32: How do you publish dynamic data? 303— See Other
[ Team LiB ] 304— Not Modified
305— Use Proxy 307— Temporary Redirect 4xx: Client Error— The request contains bad syntax or cannot be fulfilled. 400— Bad Request 401— Unauthorized 402— Payment Required •
403— Table Forbidden of Contents
Microsoft Content Management Server 2002: A Complete Guide
404— Not Found
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
405— Method Not Allowed Publisher: Addison Wesley
406— Not Acceptable
Pub Date: October 31, 2003
Proxy Authentication ISBN:407— 0-321-19444-6
Required
Pages: 1136
408— Request Time-out 409— Conflict
"This is one410— of those rare books that you will read to learn about the product and keep Gone rereading to find those tidbits that you missed before." —Gary Bushey, Server MVP 411—SharePoint Length Required Content Management Server (CMS) 412— Precondition Failed is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Request Entity Too Large Web sites. 413— However, an authoritative source of product information has been missing . . . until now. 414— Request-URI Too Large Microsoft Content Management Server 2002: A Complete Guide is the first book that explains 415— Unsupported MediaofType how to effectively unlock the power CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and 416—content Requested Range Not Satisfiable API to manage on the Microsoft platform.
417— Expectation Failed This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, 5xx: Server Error— The server failed to fulfill an apparently valid request. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions 500— Internal Server Error as: 501— Not Implemented Chapter 6: How do you customize workflow? 502— Bad Gateway Chapter 10:Service How doUnavailable you develop for Microsoft Content Management Server (CMS) 2002 503— using Visual Studio .NET? 504— Gateway Time-out Chapter 17: How do you establish user rights? 505— HTTP Version Not Supported Chapter 22: How do you best deploy CMS according to your organization's needs, size, resources? HTTP and status codes are extensible. HTTP applications are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. Chapter 32: How must do you publish dynamic data? However, applications understand the class of any status code, as indicated by the first
and any unrecognized response as being equivalent to the x00 status code of that [digit, Team LiBtreat ] class, with the exception that an unrecognized response must not be cached.
Response Header Fields The response header fields allow the server to pass additional information about the response that cannot be placed in the status line. The header fields give information about the server and about further access to the resource identified by the Request-URI. The response header fields defined in RFC 2616 are as follows:
•
TheAccept-Ranges header field allows the server to indicate its acceptance of range requests for a resource. Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
TheAge header field conveys the sender's estimate of the amount of time since the server. A cached response is "fresh" if its age does not exceed its freshness lifetime.
ByBill English , Olga(or Londer , Shawn Shell, Todd , Stephen Cawood response its revalidation) wasBleeker generated at the origin
Publisher: Addison Wesley TheETag header field
provides the current value of the entity tag for the requested
variant. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
TheLocation header field is used to redirect the recipient to a location other than the Pages: 1136 Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource that was created by the request. For 3xx responses, the Location should indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you field missed before." TheProxy-Authenticate header must be included as part of a 407 (Proxy —Gary Bushey, SharePoint Server MVP Authentication Required) response. The field value consists of a challenge that indicates the authentication scheme and parameters applicable to the proxy for this Request-URI. Content Management Server (CMS) is fast becoming a vital content-management tool that helps The administrators developers handle thewith ever-increasing amount of content on theirto Retry-Afterand header field can be used a 503 (Service Unavailable) response Web sites. However, anthe authoritative source of to product information hasrequesting been missing . . . until indicate how long service is expected be unavailable to the client. now. TheServer header field contains information about the software used by the origin server Microsoft Content Server 2002: A Complete Guide is the first book that explains to handle theManagement request. how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, extensibility by using TheVary header field value indicatesflexibility, the set ofand request header fields thatCMS fullyfeatures and API todetermines, manage content Microsoft platform. while on thethe response is fresh, whether a cache is permitted to use the response to reply to a subsequent request without revalidation. For uncacheable or stale responses, This thorough architecture, shows to to create and the Vary reference field valueexplains advises the product user agent about the then criteria that you werehow used select the edit content and use the workflow. Topic includes and security, representation. A Vary field value ofcoverage "*" implies that a CMS cacheadministration cannot determine from the the Publishing API, deployment options,request site configuration, template development. request headers of a subsequent whether thisand response is the appropriateA running example is used throughout the book to illustrate how important CMS features are representation. implemented in real-world Web site development. Inside you'll find answers to such questions as: TheWWW-Authenticate header field must be included in 401 (Unauthorized) response messages. The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the Request-URI. Chapter 6: How do you customize workflow? Chapter [ Team LiB ] 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
General Header Fields There are several headers that are applicable for both request and response messages. These header fields apply only to the overall message being transmitted; they do not apply to the entity being transferred. The general header fields defined in RFC 2616 are as follows: TheCache-Control header field is used to specify directives that must be obeyed by all caching mechanisms along the request-response chain. The directives specify behavior intended to prevent caches from adversely interfering with the request or response. These directives typically override the default caching algorithms. Cache directives are • Table of Contents unidirectional in that the presence of a directive in a request does not imply that the same Microsoft Content Management Server 2002: A Complete Guide directive is to be given in the response. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
TheConnection header field allows the sender to specify options that are desired for that particular connection and must not be communicated by proxies over further connections. Publisher: Addison Wesley Pub Date: October 31, 2003 The Date header field
represents the date and time at which the message was originated. The field value is an HTTP-date, it must be sent in RFC 1123 date format. For example, ISBN: 0-321-19444-6 Pages: 1136
Date: Sun, 9 Mar 2003 08:09:10 GMT
ThePragma header field is used to include implementation-specific directives that might "This apply is oneto of any those rare books will read to learn about product and keep recipient alongthat theyou request-response chain. All the pragma directives specify rereading to find those tidbits that you missed before." optional behavior from the viewpoint of the protocol; however, some systems may require —Gary Bushey, SharePoint Serverwith MVP that behavior be consistent the directives. For example, Content Management Server (CMS) is fast becoming a vital content-management tool that Pragma: no-cache helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. TheTrailer header field value indicates that the given set of header fields is present in
the trailer of a message encoded with chunked transfer-coding. An HTTP/1.1 message Microsoft Content Management Server 2002: A Complete Guide is the first book that explains should include a Trailer header field in a message using chunked transfer-coding with a how to effectively unlock the power of CMS. Administrators and developers alike will learn how nonempty trailer. Doing so allows the recipient to know which header fields to expect in to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and the trailer. API to manage content on the Microsoft platform. TheTransfer-Encoding header field indicates what (if any) type of transformation has This thorough reference explains the product architecture, then shows you how to create and been applied to the message-body in order to safely transfer it between the sender and edit content and use the workflow. Topic coverage includes CMS administration and security, the recipient. This differs from the content-coding in that the transfer-coding is a property the Publishing API, deployment options, site configuration, and template development. A of the message, not of the entity. For example, running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Transfer-Encoding: chunked as: TheUpgrade header field allows the client to specify what additional communication Chapter 6: How do you customize workflow? protocols it supports and would like to use if the server finds it appropriate to switch protocols. The Upgrade field intendedContent to provide a simple mechanism for 2002 Chapter 10: How do youheader develop forisMicrosoft Management Server (CMS) transition from HTTP/1.1 using Visual Studio .NET? to some other, incompatible protocol. TheVia header field be used by gateways Chapter 17: How do must you establish user rights? and proxies to indicate the intermediate protocols and recipients between the user agent and the server on requests, and between the origin22: server the best clientdeploy on responses. It is intended be used for tracking Chapter How and do you CMS according to yourto organization's needs, size, message forwards, avoiding request loops, and identifying the protocol capabilities of all and resources? senders along the request-response chain. Chapter 32: How do you publish dynamic data? TheWarning header field is used to carry additional information about the status or
transformation of a message that might not be reflected in the message. This information [ Team LiB ] is typically used to warn about a possible lack of semantic transparency from caching operations or transformations applied to the entity body of the message. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Entity Header Fields Entity header fields define meta information about the entity body or, if no body is present, about the resource identified by the request. Some of this meta information is optional; some might be required. The entity header fields defined in RFC 2616 are as follows:
•
TheAllow header field lists the set of methods supported by the resource identified by the Request-URI. The purpose of this field is strictly to inform the recipient of valid Table of Contents methods associated with the resource.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English , Olga Londer, Shawn Shell , Toddfield Bleeker , Stephen TheContent-Encoding header is used as aCawood modifier
to the media type. When present, its value indicates what additional content codings have been applied to the entity body, and thus what decoding mechanisms must be applied in order to obtain the Publisher: Wesley media Addison type referenced by the Content-Type header field. Content-Encoding is primarily Pub Date:to October 2003 used allow31, a document to be compressed without losing the identity of its underlying media type. ISBN: 0-321-19444-6 Pages: 1136
TheContent-Language header field describes the natural language(s) of the intended audience for the enclosed entity. Note that this might not be equivalent to all the languages used within the entity-body. "This The is one of those rare books that youindicates will readthe to size learnofabout the product in and keep Content-Length header field the entity-body, decimal rereading to find those tidbits missed number of octets, sent tothat the you recipient or,before." in the case of the HEAD method, the size of the —Gary Bushey, SharePoint MVP sent had the request been a GET. entity-body that wouldServer have been Content Server header (CMS) is fastmay becoming vital content-management tool for thatthe TheManagement Content-Location field be useda to supply the resource location helps entity administrators and developers handlethat the entity ever-increasing amount oflocation content separate on their enclosed in the message when is accessible from a Web sites. However, an authoritative source of product information has been missing . . . until from the requested resource's URI. now. TheContent-MD5 header field contains an MD5 digest of the entity-body for the purpose Microsoft Content an Management 2002: A Complete is the book that explains of providing end-to-endServer message integrity check Guide (MIC) of the first entity-body. (Note: An how to effectively unlock the power of CMS. Administrators developers will learn how MIC is good for detecting accidental modification of theand entity-body in alike transit but is not to enhance their Web servers'attacks.) scalability, flexibility, and extensibility by using CMS features and proof against malicious API to manage content on the Microsoft platform. TheContent-Type header field indicates the media type of the entity body sent to the This thorough explains theHEAD product architecture, then shows howhave to create and recipient reference or, in the case of the method, the media type thatyou would been sent edit content use the workflow. had theand request been a GET. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running is used throughout the to illustrate important features Theexample Content-Range header field is book sent with a partialhow entity body toCMS specify whereare in the implemented in real-world Web site development. Inside you'll find answers to such questions full entity body the partial body should be applied. as: TheDate header field contains the date and time at which the message was originated. Chapter 6: How do you workflow? TheExpires header fieldcustomize contains the date and time after which the response is considered stale. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio header .NET? field indicates the date and time at which the server believes TheLast-Modified the document being sent to the browser was last modified. Chapter 17: How do you establish user rights? [ Team LiB ] Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Summary This appendix provided a brief reference to HTTP requests and responses, including format, methods, headers, and status codes. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Appendix B. Publishing API Reference CmsHttpContext Parentage CmsApplicationContext Parentage Channel Parentage Posting Parentage •
Table of Contents
Placeholder ParentageServer 2002: A Complete Guide Microsoft Content Management ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
PlaceholderDefinition Parentage [ Team LiB ] Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CmsHttpContext Parentage Table B-1 shows the complete parentage of the CmsHttpContext class. The properties and methods listed in italics in the table are defined by the class in the column header and then inherited by the derived class(es) to the left. So, for instance, only Current, UserCacheKey, and ChannelItemIsVisible are coded in the CmsHttpContext class, whereas Equals, GetHashCode, GetType, and ToString are coded in the System. Object class and then inherited by the CmsContext class, the CmsAspContext class, and finally the CmsHttpContext class.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Table B-1. CmsHttpContext Parentage
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
CmsHttpContext
CmsAspContext
CmsContext
System.Object
Publisher: Addison Wesley
Public Properties Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Channel
Channel
Pages: 1136
ChannelItem
ChannelItem
CmsQueryString CmsQueryString "This is one of those rare books that you will read to learn about the product and keep Current to find those tidbits that you missed before." rereading —Gary Bushey, SharePoint Server MVP IsDefaultGuest Enabled IsDefaultGuest Enabled IsDefaultGuest Enabled Content Management Server (CMS) is fast becoming a vital content-management tool that IsLoggedIn AsGuest IsLoggedIn AsGuest IsLoggedIn AsG uest helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until IsUsingTemplate IsUsingTemplate now.
Mode Mode Mode Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Placeholder Placeholder Placeholder toDefinitionTypes enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and DefinitionTypes DefinitionTypes API to manage content on the Microsoft platform. Posting Posting This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS SessionEnd administration and security, RollbackOn SessionEnd RollbackOn SessionEnd RollbackOn the Publishing API, deployment options, site configuration, and template development. A RootChannel RootChannel RootChannel running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions RootResource Gallery RootResource Gallery RootResource Gallery as: RootTemplate Gallery RootTemplate Gallery Chapter 6: How do you customize workflow? Searches Searches Chapter 10: How do you develop for Microsoft ServerTime ServerTime using Visual Studio .NET?
RootTemplate Gallery Searches Content Management Server (CMS) 2002 ServerTime
SessionSettings SessionSettings Chapter 17: How do you establish user rights? SessionSettings Temporary Temporary Temporary Chapter 22: How do you best deploy CMS according to your organization's needs, size, UploadFolder UploadFolder UploadFolder and resources? UserChapter 32: How do you Userpublish dynamic data?User
[ UserCacheKey Team LiB ]
UserCanApprove
UserCanApprove
UserCanApprove
UserCanAuthor
UserCanAuthor
UserCanAuthor
UserCanEdit Resources
UserCanEdit Resources
UserCanEdit Resources
UserCanEdit Templates
UserCanEdit Templates
UserCanEdit Templates
UserCan
UserCan
UserCan
ModifySite
ModifySite
ModifySite
Public Methods •
Table of Contents
AcceptBinary File
AcceptBinary File
AcceptBinary File
Microsoft Content Management Server 2002: A Complete Guide
By Bill English, Olga Londer Shell, Todd Bleeker , Stephen Cawood ChannelItemIs Visible,Shawn ChannelItem IsVisible
CommitAll
CommitAll
CommitAll
Publisher: Addison Wesley
Dispose Pub Date: October 31, 2003 Dispose ISBN: 0-321-19444-6
Equals
Dispose
Equals
Equals
Equals
GetHashCode
GetHashCode
GetHashCode
GetHashCode
GetType
GetType
GetType
GetType
Pages: 1136
"This is one Parameter of those rare books that you will read to Propagate learn aboutParameter the product and keep Propagate Propagate Parameter rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint ResolveUrl Server MVP ResolveUrl Content Management Server (CMS) is fast becoming RollbackAll a vital content-management tool that RollbackAll RollbackAll helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative information has been missing ToString ToString source of product ToString ToString. . . until now. UserHasRight ToBrowse UserHasRight ToBrowse UserHasRight ToBrowse Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock power directly of CMS.from Administrators and developers alike will learn A handful of methods arethe inherited System.Object. But the CmsContext classhow is to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and the base class in which most of the CMS functionality is found. API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. TopicPosting, coverage includes CMS NOTE: If a Web page is not a CMS even though it isadministration running withinand IIS,security, it the Publishing API, deployment options, site configuration, and template development. A cannot access CmsHttpContext. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as:
Table B-2 defines all the members listed for CmsHttpContext in Table B-1. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET?
Table B-2. CmsHttpContext Member Descriptions
Chapter 17: How do you establish user rights?
CmsHttpContext Description Chapter 22: How do you best deploy CMS according to your organization's needs, size, andProperties resources? Public Chapter 32: How do youGets publish Channel the dynamic Channel data? object representing the current channel.
[ ChannelItem Team LiB ]
Gets the ChannelItem for the current Web page.
CmsQueryString
Gets a formatted QueryString string containing only the CMSspecific name/value pairs from the current QueryString.
Current
Gets the CmsHttpContext for the current HttpRequest.
IsDefaultGuestEnabled
Gets a value indicating whether guest user access is enabled for CMS.
IsLoggedInAsGuest
Gets a value indicating whether the user is logged in as a guest.
IsUsingTemplate
Gets a value indicating whether the current Web page is a Template.
Mode
Gets the current PublishingMode for the current session.
•
Table of Contents
PlaceholderDefinitionTypes Gets2002: the A collection allowed Microsoft Content Management Server Complete of Guide
PlaceholderDefinition types for a
CMS site.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Posting
Gets the Posting for the current Web page.
Publisher: Addison Wesley RollbackOnSessionEnd
Gets or sets a value that indicates whether uncommitted changes are rolled back when the session ends.
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
RootChannel
Gets the Channel at the root of the channel hierarchy.
RootResourceGallery
Gets the ResourceGallery at the root of the resource hierarchy.
Pages: 1136
RootTemplateGallery
Gets the TemplateGallery at the root of the template gallery hierarchy. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Searches Get the Searches object that is used to search the CMS site. —Gary Bushey, SharePoint Server MVP ServerTime Gets the current Coordinated Universal Time (UTC) of the CMS Content Management Server (CMS) is fast becoming a vital content-management tool that database server. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative of productfor information hassession. been missing . . . until SessionSettings Gets thesource SessionSettings the current now. TemporaryUpload Gets the path of the temporary upload folder for Folder the CMS folder. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how the User, which represents the currently logged in user. and toUser enhance their Web servers'Gets scalability, flexibility, and extensibility by using CMS features API to manage content on the Microsoft platform. UserCacheKey Gets a unique string for all users that have the same runtime browsing rights in the system. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. includes CMShas administration and security, UserCanApprove Gets aTopic valuecoverage indicating if the user rights to approve postings the Publishing API, deployment in options, the CMSsite site.configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web siteadevelopment. Inside you'll such and questions UserCanAuthor Gets value indicating if the userfind hasanswers rights toto create as: author postings. UserCanEditResources Gets a value indicating if the user has rights to edit Chapter 6: How do you customize workflow? CmsHttpContext Parentage UserCanEditTemplates a value indicatingContent if the user has rights Server to create and edit Chapter 10: How do youGets develop for Microsoft Management (CMS) 2002 templates in the CMS site. using Visual Studio .NET? UserCanModifySite a value indicating Chapter 17: How do youGets establish user rights? if the user has rights to make changes in the CMS site. Chapter 22: How do you best deploy CMS according to your organization's needs, size, Public andMethods resources? AcceptBinaryFile Loads a file from the file system and loads it into the database Chapter 32: How do you publish dynamic data? as an internal resource and returns a new URL for the resource.
[ ChannelItemIsVisible Team LiB ]
•
Indicates whether the ChannelItem item is visible to the current user.
CommitAll
Commits changes to all CMS Publishing API objects that have been modified during the most recent session transaction.
Dispose
Releases all file handles and all unmanaged memory resources held by the CmsContext and objects retrieved directly or indirectly from CmsContext.
Equals
Determines whether two Object instances are equal.
GetHashCode
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType
Gets the Type of the current instance.
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide PropagateParameter Adds a name/value pair to
CMS-generated URLs for the
remainder of the session. ByBill English, Olga Londer, Shawn Shell , Todd Bleeker , Stephen Cawood ResolveUrl Publisher: Addison Wesley Pub Date: October 31, 2003 RollbackAll ISBN: 0-321-19444-6 Pages: 1136
ToString
Makes URLs that are not generated by CMS compatible with the CMS Site Stager. Rolls back changes made to any CMS Publishing API objects that have been modified in the current session transaction. Returns a String that represents the current object type.
UserHasRight ToBrowse
Indicates if the user has permissions to browse the current ChannelItem. "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." [ Team LiB ] —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
CmsApplicationContext Parentage Table B-3 shows the complete parentage of the CmsApplicationContext class. As in the CmsHttpContext table, the properties and methods listed in italics are defined by the class in the column header and then inherited by the derived class(es) to the left.
Table B-3. CmsApplicationContext Parentage •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
CmsApplicationContext
CmsContext
System.Object
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Public Constructors CmsApplicationContext Publisher: Addison Wesley Pub Date: October 31, 2003 Public Properties ISBN: 0-321-19444-6
IsLoggedInAsGuest Pages: 1136
IsLoggedInAsGuest
Mode
Mode
PlaceholderDefinitionTypes PlaceholderDefinitionTypes "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that youRollbackOnSessionEnd missed before." RollbackOnSessionEnd —Gary Bushey, SharePoint Server MVP RootChannel RootChannel Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their RootResourceGallery RootResourceGallery Web sites. However, an authoritative source of product information has been missing . . . until RootTemplateGallery RootTemplateGallery now. SearchesContent Management Server Searches Microsoft 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how ServerTime toServerTime enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. SessionSettings SessionSettings This thorough reference explains the product architecture, then shows you how to create and TemporaryUploadFolder TemporaryUploadFolder edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A User User running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions UserCanApprove UserCanApprove as: UserCanAuthor
UserCanAuthor
Chapter 6: How do you customize workflow? UserCanEditResources UserCanEditResources Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 UserCanEditTemplates UserCanEditTemplates using Visual Studio .NET?
UserCanModifySite UserCanModifySite Chapter 17: How do you establish user rights? Public Methods Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? AcceptBinaryFile AcceptBinaryFile Chapter 32: How do you publish dynamic data? AuthenticateAsCurrentUser
[ AuthenticateAsGuest Team LiB ]
AuthenticateAsUser AuthenticateUsingUserHandle CommitAll
CommitAll
Dispose
Dispose
Equals
Equals
Equals
GetHashCode
GetHashCode
GetHashCode
GetType
GetType
GetType
• PropagateParameter Table of Contents
PropagateParameter
Microsoft Content Management Server 2002: A Complete Guide
RollbackAll By Bill English, Olga Londer, Shawn Shell, Todd RollbackAll Bleeker, Stephen Cawood ToString Publisher: Addison Wesley
UserHasRightToBrowse
ToString
ToString
UserHasRightToBrowse
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
The CmsApplicationContext class inherits all its properties directly from the CmsContext class Pages: 1136 without alteration and without the CmsAsp Context class that CmsHttpContext uses. The following properties are not available as they were in the CmsHttpContext class: Channel, ChannelItem, CmsQueryString, Current, IsUsingTemplate, Posting, and UserCacheKey. The following methods are also not available: Channel ItemIsVisible and ResolveUrl. This makes "This one of those rare books thatinyou read to about theso product and keep senseisbecause this Context is used the will absence of learn a Posting URL, there isn't a current rereading to find those tidbits thattoyou missed before." Posting, Channel, or QueryString reference. —Gary Bushey, SharePoint Server MVP Table B-4 defines all the unique members listed for the Cms ApplicationContext class in Table Content Management Server (CMS) is fast becoming a vital content-management tool that B-3. helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Server 2002: A Complete GuideMember is the firstDescriptions book that explains Table B-4. Management CmsApplicationContext Unique how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and Description APICmsApplicationContext to manage content on the Microsoft platform.
Public Constructor This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, CmsApplicationContext Creates a new instance of the CmsApplicationContext class. the Publishing API, deployment options, site configuration, and template development. A running Public example Methodsis used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: AuthenticateAsCurrentUser Attempts to log in to CMS as the current user. AuthenticateAsGuest Attempts to log in as the default guest user for CMS. Chapter 6: How do you customize workflow? AuthenticateAsUser Attempts to log in as the specified user. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 AuthenticateUsingUserHandle using Visual Studio .NET? Authenticates the user using the Windows user handle. Chapter [ Team LiB ] 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Channel Parentage Table B-5 shows the complete parentage of a CMS Channel class. The properties and methods listed in italics in the table are defined by the class in the column header and then inherited by the derived class(es) to the left. So, for instance, only GetHashCode is coded in the CmsObject class, whereas Equals, GetType, and ToString are coded in the System. Object class and then inherited by the CmsObject class. All these members are inherited by the HierarchyItem class, the ChannelItem class, and finally the Channel class. AllChildren, for example, is coded in the Channel class and is not inherited by any other class. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Table B-5. Channel Parentage
Publisher: Addison Wesley Pub Date: October 31, 2003 Channel
Channel Item
Hierarchy Item
Cms Object
System. Object
ISBN: 0-321-19444-6
Public Properties Pages: 1136
AllChildren ApplyOuter ScriptToPostings "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." CanCreateChannels —Gary Bushey, SharePoint Server MVP CanCreatePostings Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their CanDelete CanDelete CanDelete Web sites. However, an authoritative source of product information has been missing . . . until now. CanSet Properties CanSet Properties CanSet Properties Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how ChangeDate ChangeDate to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Channels This thorough reference explains the product architecture, then shows you how to create and CreatedBy CreatedBy CreatedBy edit content and use the workflow. Topic coverage includes CMS administration and security, CreatedDate CreatedDate CreatedDate the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are Custom Properties Custom implemented in real-world Web siteProperties development. Inside you'll find answers to such questions as: DefaultPostingName
DefaultResource Gallery Chapter 6: How do you customize workflow? DefaultTemplate Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Gallery using Visual Studio .NET? Description Description Chapter 17: How do you establish user rights? Description DisplayName DisplayName Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? DisplayPath DisplayPath Chapter 32: How do you publish dynamic data? ExpiryDate ExpiryDate
[ Guid Team LiB ]
Guid
Guid
IsDeleted
IsDeleted
IsDeleted
IsHidden Mode Published
IsHidden Mode Published
IsImportant
IsImportant
IsRobot Followable
IsRobot Followable
IsRobot Indexable
IsRobot Indexable
IsRoot •
IsWorkingRevision
IsWorking Revision
Table of Contents
IsWorking Revision
Microsoft Content Management Server 2002: A Complete Guide
By Bill English, Olga Londer, Shawn Shell , Todd Bleeker, Stephen Last Cawood LastModifiedBy Last ModifiedBy ModifiedBy
LastModifiedDate
LastModified Date
LastModified Date
Name
Name
OwnedBy
OwnedBy
Publisher: Addison Wesley Pub Date: October 31, 2003
Name
ISBN: 0-321-19444-6
Pages: 1136 OuterScriptFile
OwnedBy
Parent Parent "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Path Path Path —Gary Bushey, SharePoint Server MVP Postings Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their QueryString QueryString Web sites. However, an authoritative source of product information has been missing . . . until now. QueryString Mode QueryString Mode Unpublished Unpublished Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how QueryString QueryString toModeUpdate enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and ModeUpdate API to manage content on the Microsoft platform. RevisionDate RevisionDate RevisionDate This thorough reference explains the product architecture, then shows you how to create and SortOrdinal SortOrdinal edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A StartDate StartDate the book to illustrate how important CMS features are running example is used throughout implemented in real-world Web site development. Inside you'll find answers to such questions Url Url as: UrlInner UrlInner Chapter 6: How do you customize workflow? UrlInnerPlain UrlInnerPlain Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 UrlModePublished UrlModePublished using Visual Studio .NET? UrlModeUnpublished UrlModeUnpublished Chapter 17: How do you establish user rights? UrlModeUpdate UrlModeUpdate Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Public Methods Chapter 32: How do you publish dynamic data? CreateChannel
[ CreateConnected Team LiB ]
Posting CreatePosting
•
Delete
Delete
Delete
Equals
Equals
Equals
Equals
GetByRelativePath
GetBy RelativePath
GetHashCode
GetHash Code
GetHash Code
GetHash Code
GetType
GetType
GetType
GetType
GetType
ToString
ToString
Table of Contents
Equals
Microsoft Content Management IsDescendant Server 2002: A Complete Guide IsDescendantOf Of IsDescendant ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Of Cawood
ToString
ToString
ToString
Publisher: Addison Wesley
Channels inherit much of their functionality from ChannelItem and HierarchyItem. Pub Date: October 31, 2003 ISBN: 0-321-19444-6
Table B-6 defines all the members listed for the Channel class in Table B-5. Pages: 1136
"This is one of thoseTable rare books that you will read to learn Descriptions about the product and keep B-6. Channel Member rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Channel Classification Description Content Management Server (CMS) is fast becoming a vital content-management tool that Public Properties and developers handle the ever-increasing amount of content on their helps administrators Web sites. However, an authoritative source of product information has been missing . . . until AllChildren Child object Gets all the Channels and Postings within this Channel. now. ApplyOuter Read/write Gets or sets a value indicating whether the outer script Microsoft 2002: AbeComplete is the objects. first book that explains ScriptTo Content PostingsManagement Server should executedGuide for Posting how to effectively unlock the power of CMS. Administrators and developers alike will learn how toCanCreate enhance their WebUser servers' flexibility, extensibility bythe using CMS and right scalability, Gets a value and indicating whether user hasfeatures the API to manage content on the Microsoft platform. Channels necessary rights to create new Channel objects within this Channel. This thorough reference explains the product architecture, then shows you how to create and CanCreate right Gets a valueincludes indicating whether the user and has security, the edit content and use User the workflow. Topic coverage CMS administration Postings rights to create new Postings within this the Publishing API, deployment options,necessary site configuration, and template development. A Channel. running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions CanDelete User right Gets a value indicating whether the current user has as: sufficient rights to delete this class instance.
CanSet right a value indicating whether the current user has Chapter 6: HowUser do you customizeGets workflow? Properties sufficient rights to modify the properties of this class Chapter 10: How do you develop instance. for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? ChangeDate Read-only Gets the Coordinated Universal Time (UTC) when Chapter 17: How do you establishChannelItem user rights? was last changed. Channels Child object Gets the Channel objects within this Channel. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Read-only CreatedBy Gets the User that created this class instance. Chapter 32: How do you publish dynamic CreatedDate Read-only Gets the data? UTC when the HierarchyItem was created.
[ Custom Team LiB ] Properties
Child object
Gets the CustomPropertyCollection for this ChannelItem object.
Default PostingName
Read/write
Gets or sets the name of the default Posting for this Channel.
Default Resource Gallery
Read/write
Gets or sets the default ResourceGallery for this Channel.
Default Template Gallery
Read/write
Gets or sets the default Template Gallery for this Channel.
Description
Read/write
Gets or sets descriptive text for this class instance.
DisplayName
Read-only
Gets and sets the display name for this Channel Item object.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide DisplayPath Read-only Gets the fully qualified
path of a ChannelItem.
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
ExpiryDate
Read/write
Publisher: Addison Wesley Pub Date: October 31,Read-only 2003 Guid ISBN: 0-321-19444-6 Pages: 1136
IsDeleted
Read-only
Gets and sets the UTC at which this Channel Item expires and ceases to be a visible part of the published Web site. Gets a string representation of the globally unique identifier (GUID) for this object. Gets a value indicating whether this class instance has been deleted, regardless of whether the deletion has been committed.
"This is oneMode of those Read/write rare books that you willand read to learn the product IsHidden Gets sets a flagabout indicating whetherand thiskeep rereading missed before." Publishedto find those tidbits that you ChannelItem is hidden in the navigation hier archy of —Gary Bushey, SharePoint Server MVPthe live (published) CMS Web site. Content ManagementRead/write Server (CMS) is fast vitalindicating content-management tool that IsImportant Getsbecoming or sets a a value whether a ChannelItem helps administrators and developers handle the ever-increasing amount of content on their is important. Web sites. However, an authoritative source of product information has been missing . . . until IsRobot Read/write Gets and sets a value indicating whether Web robots now. Followable should follow any hyperlinks found in the Web page to this ChannelItem Microsoft Content Management Server corresponding 2002: A Complete Guide is the firstobject. book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Gets and setsand a value indicating Web robots and toIsRobot enhance their WebRead/write servers' scalability, flexibility, extensibility bywhether using CMS features Indexable index the Web page corresponding to this API to manage content on the Microsoftshould platform. ChannelItem object. This thorough reference explains the product architecture, then shows you how to create and IsRoot Read-only Gets a value indicating whether this Channel is the root edit content and use the workflow. Topic coverage includes CMS administration and security, Channel in the channel hierarchy. the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate howwhether important features areis a IsWorking Read-only Gets a value indicating theCMS Hierarchy Item implemented in real-world Web site development. Inside you'll find answers to such questions Revision working revision. as: Last ModifiedBy Read-only Gets the User that last modified the Hierarchy Item. do you customizeGets workflow? Last Chapter 6: HowRead-only the UTC when this HierarchyItem was last ModifiedDate modified. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Name Read/write Gets or sets the name of this HierarchyItem. using Visual Studio .NET?
OuterScript Read/write sets the outer script file for this Channel. Chapter 17: How do you establishGets useror rights? FileOwnedBy Read-only GetsCMS the according User who currently owns the class instance. Chapter 22: How do you best deploy to your organization's needs, size, and resources? Parent Child object Gets the Channel that contains this Channel Item object. Chapter 32: How do you publish dynamic data?
[ Path Team LiB ]
Read-only
Gets the fully qualified path of the Hierarchy Item.
Postings
Child object
Gets the Postings within this Channel.
QueryString
Read-only
Gets the URL QueryString parameters for this ChannelItem.
QueryString Mode Unpublished
Read-only
Gets the URL QueryString parameters used to view this ChannelItem when in Unpublished mode.
QueryString ModeUpdate
Read-only
Gets the URL QueryString parameters used by this ChannelItem when in Update mode.
RevisionDate
Read-only
Gets a System.DateTime that gets the UTC when this historical revision of this Hierarchy Item was created.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide SortOrdinal Read/write Gets and sets the
relative position of this ChannelItem Channel Item objects.
with respect toCawood its sibling ByBill English, Olga Londer, Shawn Shell, Todd Bleeker , Stephen StartDate
Read/write
Publisher: Addison Wesley 2003 UrlPub Date: October 31,Read-only
Gets and sets the UTC at which this Channel Item becomes visible in the published Web site. Gets the URL for this ChannelItem object.
ISBN: 0-321-19444-6
UrlInner Pages: 1136
Read-only
UrlInnerPlain
Read-only
Gets a URL that references the ChannelItem, bypassing the outer script file.
Gets a URL that references the ChannelItem, bypassing the outer script file and not propagating any "This is one of those rare books that you will read toparameters learn aboutfrom the product andrequest. keep QueryString the current rereading to find those tidbits that you missed before." UrlMode Read-only —Gary Bushey, SharePoint Server MVPGets the URL for this ChannelItem in Published mode. Published Content Management Server (CMS) is fast becoming a vital content-management tool that UrlMode Gets the for this ChannelItem Unpublished helps administrators Read-only and developers handle the URL ever-increasing amount ofincontent on their Unpublished mode.of product information has been missing . . . until Web sites. However, an authoritative source now. UrlMode Update Read-only Gets the URL for this ChannelItem in Update mode. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Public Methods how to effectively unlock the power of CMS. Administrators and developers alike will learn how toCreate enhance their WebCreating servers'and scalability, flexibility, and extensibility CMS features and Channel Creates a new Channel within by theusing current Channel. API to manage content on the Microsoft platform. deleting This thorough reference explains architecture, then you how toiscreate and Create Creating andthe product Creates a new Posting in shows this Channel that connected edit content and use deleting the workflow. Topic includes CMS administration and security, Connected to coverage the specified Posting. the Publishing API, deployment options, site configuration, and template development. A Posting running example is used throughout the book to illustrate how important CMS features are Create Posting Creating and Creates a new Posting thisanswers Channel.to such questions implemented in real-world Web site development. Inside you'llinfind deleting as:
Delete Creating and Deletes the HierarchyItem. Chapter 6: Howdeleting do you customize workflow? Equals System Object instances equal. Chapter 10: How do you develop Determines for Microsoftwhether Contenttwo Management Server are (CMS) 2002 using Visual Studio .NET? GetBy Child object Locates a ChannelItem in the channel hierarchy RelativePath according to its position relative to this Channel Item. Chapter 17: How do you establish user rights? GetHash Code Read-only Gets the hash code for the object. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Read-only GetType Gets the Type of the current instance. Chapter 32: How do you publish dynamic data?
[ IsDescendant Team LiB ] Of
ToString
Read-only
Determines whether this object is a descendant of the specified object.
System
Returns a String that represents the current object type.
We have included a classification column in Table B-6. This is not a CMS classification. It was included to make it easier to locate the discussion about each member in Chapter 25. [ Team LiB ]
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Posting Parentage Table B-7 shows the complete parentage of a CMS Posting class. The properties and methods listed in italics in the table are defined by the class in the column header and then inherited by the derived class(es) to the left. So, for instance, only GetHashCode is coded in the CmsObject class, whereas Equals, GetType, and ToString are coded in the System. Object class and then inherited by the CmsObject class. All these members are inherited by the HierarchyItem class, the ChannelItem class, and finally the Posting class. CanApprove, for example, is coded in the Posting class and is not inherited by any other class. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Table B-7. Posting Parentage
Publisher: Addison Wesley Pub Date: October 31, 2003 Posting
Channel Item
Hierarchy Item
Cms Object
System. Object
ISBN: 0-321-19444-6
Public Properties Pages: 1136
CanApprove CanDelete CanDelete CanDelete "This is one of those rare books that you will read to learn about the product and keep CanMoveto find those tidbits that you missed before." rereading —Gary Bushey, SharePoint Server MVP CanSet Properties CanSet Properties CanSet Content Management Server (CMS) is fast becomingProperties a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their CanSubmit Web sites. However, an authoritative source of product information has been missing . . . until now. ChangeDate ChangeDate Microsoft Content Management Server 2002: A Complete Guide is the first book that explains ChangeToken how to effectively unlock the power of CMS. Administrators and developers alike will learn how toConnectedPostings enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. ConnectedTemplates This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, CreatedBy CreatedBy CreatedBy the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are CreatedDate CreatedDate CreatedDate implemented in real-world Web site development. Inside you'll find answers to such questions Custom Properties Custom Properties as:
Description Description Description Chapter 6: How do you customize workflow? DisplayName DisplayName Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 DisplayPath using Visual Studio .NET?DisplayPath ExpiryDate Chapter 17: How do you ExpiryDate establish user rights? GuidChapter 22: How do you Guid Guid to your organization's needs, size, best deploy CMS according and resources? HasInaccessible ConnectedPostings Chapter 32: How do you publish dynamic data?
[ IsConnected Team LiB ]
•
IsDeleted
IsDeleted
IsHiddenMode Published
IsHiddenMode Published
IsImportant
IsImportant
IsRobot Followable
IsRobot Followable
IsRobot Indexable
IsRobot Indexable
IsWorking Revision
IsWorking Revision
IsDeleted
IsWorking Revision
Table of Contents
LastApproved DeclinedBy
Microsoft Content Management Server 2002: A Complete Guide By Bill English, Olga , Todd Bleeker Cawood LastModified ByLonder,Shawn Shell LastModified By,StephenLastModified
LastModified Date
LastModified Date
LastModified Date
Name
Name
Name
Pages: 1136 OwnedBy
OwnedBy
OwnedBy
Parent
Parent
Publisher: Addison Wesley Pub Date: October 31, 2003 ISBN: 0-321-19444-6
By
Path is one of those rare books Path "This that you will read to Path learn about the product and keep rereading to find those tidbits that you missed before." Placeholders —Gary Bushey, SharePoint Server MVP QueryString QueryString Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their QueryString Mode QueryString Mode Web sites. However, an authoritative source of product information has been missing . . . until Unpublished Unpublished now. QueryString ModeUpdate QueryString Microsoft Content ManagementModeUpdate Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how toRevisionCause enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. RevisionDate RevisionDate RevisionDate This thorough reference explains the product architecture, then shows you how to create and SortOrdinal SortOrdinal edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A StartDate StartDate running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions State as: StateApprovedVersion Chapter 6: How do you customize workflow? StateUnapproved Version Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 Template using Visual Studio .NET? Url Chapter 17: How do you Url establish user rights? UrlInner Chapter 22: How do you UrlInner best deploy CMS according to your organization's needs, size, and resources? UrlInnerPlain UrlInnerPlain Chapter 32: How do you publish dynamic data? UrlMode Published UrlMode Published
[ UrlMode Team LiB ] Unpublished
UrlMode Update
UrlMode Unpublished UrlMode Update
WorkingRevision Public Methods AcquireOwnership Approve Approvers •
CopyTo
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
Decline
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Delete
Delete
Delete
Equals Publisher: Addison Wesley
Equals
Equals
Equals
Pub Date: October 31, 2003
GetBy RelativePath
Equals
GetBy RelativePath
ISBN: 0-321-19444-6 Pages: 1136 GetHash Code
GetHash Code
GetHash Code
GetHash Code
GetType
GetType
GetType
GetType
GetType
"This is one of those rare books that you willOf read to IsDescendant learn about the product and keep IsDescendant Of IsDescendant rereading to find those tidbits that you missed before." Of —Gary Bushey, SharePoint Server MVP MoveTo Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their ReleaseOwnership Web sites. However, an authoritative source of product information has been missing . . . until RevisionForDate now.
RevisionsContent Management Server 2002: A Complete Guide is the first book that explains Microsoft how to effectively unlock the power of CMS. Administrators and developers alike will learn how toSubmit enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. ToString ToString ToString ToString ToString This thorough reference explains the product architecture, then shows you how to create and ValidateChangeToken edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is usedinherit throughout bookfunctionality to illustrate from how important CMSand features are Like Channels, Postings much the of their ChannelItem implemented in real-world Web site development. Inside you'll find answers to such questions HierarchyItem. as: Table B-8 defines all the members listed for the Channel class in Table B-7. Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Table B-8. Posting Member Descriptions Chapter 17: How do you establish user rights? Posting Classification Description Chapter 22: How do you best deploy CMS according to your organization's needs, size, Public andProperties resources? Chapter 32: How do you publish dynamic data?
[ CanApprove Team LiB ]
User right
Gets a value indicating whether the Posting requires approval and whether the current user has sufficient rights to either approve or decline it.
CanDelete
User right
Gets a value indicating whether the current user has sufficient rights to delete this class instance.
CanMove
User right
Gets a value indicating whether the current user has sufficient rights to move the Posting to another Channel.
CanSetProperties
User right
Gets a value indicating whether the current user has sufficient rights to modify the properties of this class instance.
CanSubmit
User right
Gets a value indicating whether the Posting requires submitting and whether the current user Microsoft Content Management Server 2002: A Complete Guide has rights to do so. •
Table of Contents
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
ChangeDate
Read-only
Gets the Coordinated Universal Time (UTC) when ChannelItem was last changed.
Publisher: Addison Wesley
ChangeToken Pub Date: October 31, 2003 Read-only ISBN: 0-321-19444-6 Pages: 1136 ConnectedPostings
Child object
ConnectedTemplates
Child object
Gets a value used to determine whether a modification has occurred in a Posting. Gets the collection of Postings that are connected to the current Posting.
Gets the collection of templates connected to the associated this Posting. "This is one of those rare books that you willtemplate read to learn about with the product and keep rereading to find those tidbits that you missed before." CreatedBy Read-only Gets the User that created this class instance. —Gary Bushey, SharePoint Server MVP CreatedDate Read-only Gets the UTC when the HierarchyItem was Content Management Server (CMS) is fast becoming created. a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative sourceGets of product information has been missing CustomProperties Child object the CustomPropertyCollection for this. . . until now. ChannelItem object. Description Read/write or sets descriptive text forbook this class Microsoft Content Management Server 2002:Gets A Complete Guide is the first that explains how to effectively unlock the power of CMS. instance. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and DisplayName Read-only Gets and sets the display name for this API to manage content on the Microsoft platform. ChannelItem object. This thorough reference explains the product architecture, then shows you how to create and DisplayPath Read-only Gets the fully qualified path of a Channel Item. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, siteGets configuration, andUTC template development. A ExpiryDate Read/write and sets the at which this ChannelItem running example is used throughout the book to illustrate how important CMS features are expires and ceases to be a visible part of the implemented in real-world Web site development. Inside you'll find answers to such questions published Web site. as: Guid Read-only Gets a string representation of the globally unique identifier (GUID) for this object. Chapter 6: How do you customize workflow? HasInaccessible Read-only Gets a value indicating whether the Posting is Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 ConnectedPostings connected to other Postings that the user does not using Visual Studio .NET? have rights to access. Chapter 17: How do you establish userGets rights? IsConnected Read-only a value indicating whether this Posting is connected to other Postings. Chapter 22: How do you best deploy CMS according to your organization's needs, size, IsDeleted Read-only Gets a value indicating whether this class instance and resources? has been deleted, regardless of whether the Chapter 32: How do you publish dynamic data?has been committed. deletion
[ IsHiddenMode Team LiB ] Published Read/write
•
Gets and sets a flag indicating whether this ChannelItem is hidden in the navigation hierarchy of the live (published) CMS Web site.
IsImportant
Read/write
Gets or sets a value indicating whether a ChannelItem is important.
IsRobotFollowable
Read/write
Gets and sets a value indicating whether Web robots should follow any hyperlinks found in the Web page corresponding to this ChannelItem object.
IsRobotIndexable
Read/write
Gets and sets a value indicating whether Web robots should index the Web page corresponding to this ChannelItem object.
Table of Contents
IsWorkingRevision
Read-only
Gets a value indicating whether the HierarchyItem is a working revision.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
LastApproved DeclinedBy
Read/write
Gets a value that identifies the CMS user that last approved or declined the Posting.
Publisher: Addison Wesley
LastModifiedBy Pub Date: October 31, 2003 Read-only ISBN: 0-321-19444-6
Gets the User that last modified the HierarchyItem.
Pages: 1136 LastModifiedDate
Read-only
Gets the UTC when this HierarchyItem was last modified.
Name
Read/write
Gets or sets the name of this Hierarchy Item.
"This is one of those rare books that you will read to learn about the product and keep OwnedBy Read-only Gets the User who currently owns the class rereading to find those tidbits that you missed before." instance. —Gary Bushey, SharePoint Server MVP Parent Child object Gets the Channel that contains this ChannelItem Content Management Server (CMS) is fast becoming object. a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web of product information has of been . . . until Pathsites. However, an authoritative Read-only sourceGets the fully qualified path themissing HierarchyItem. now. Placeholders Child object Gets a collection of named Placeholder objects with this Posting. Microsoft Content Management Server 2002:associated A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Read-only Gets theand URLextensibility QueryStringby parameters this and toQueryString enhance their Web servers' scalability, flexibility, using CMS for features ChannelItem. API to manage content on the Microsoft platform.
QueryStringMode Read-only Gets the URL QueryString parameters used to This thorough reference explains the product architecture, then shows you how to create and Unpublished view this ChannelItem when in Unpublished mode. edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, siteGets configuration, and template development. QueryStringMode Read-only the URL QueryString parameters usedAby this running example is used throughout the book to illustrate how important CMS features are Update ChannelItem when in Update mode. implemented in real-world Web site development. Inside you'll find answers to such questions as: RevisionCause Child object Gets the cause of a revision for historical revisions of this Posting. Chapter 6: How do you customize RevisionDate Child object workflow? Gets a System.DateTime that gets the UTC when this historical revision of this HierarchyItem was Chapter 10: How do you develop for Microsoft created.Content Management Server (CMS) 2002 using Visual Studio .NET? SortOrdinal Read/write Gets and sets the relative position of this Chapter 17: How do you establish userChannelItem rights? with respect to its sibling ChannelItem objects. Chapter 22: How do you best deploy CMS according to your organization's needs, size, StartDate Read/write Gets and sets the UTC at which this ChannelItem and resources? becomes visible in the published Web site. Chapter 32: How do you publish dynamic data?
[ State Team LiB ]
•
Read-only
Gets the state of the current version of this Posting.
StateApproved Version
Read-only
Gets the state of the Approved version of this Posting, regardless of whether it is the current version.
StateUnapproved Version
Read-only
Gets the state of the Unapproved version of this Posting, regardless of whether it is the current version.
Template
Child object
Gets the template used to create this Posting.
Url
Read-only
Gets the URL for this ChannelItem object.
Read-only
Gets a URL that references the Channel Item, bypassing the outer script file.
UrlInner
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
UrlInnerPlain Read-only Gets a URL that By Bill English, Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood
references the ChannelItem, bypassing the outer script file and not propagating any QueryString parameters from the current request.
Publisher: Addison Wesley Pub Date: October 31, 2003
UrlModePublished
Read-only
Gets the URL for this ChannelItem in Published mode.
Read-only
Gets the URL for this ChannelItem in Unpublished mode.
ISBN: 0-321-19444-6 Pages: 1136
UrlMode Unpublished
UrlModeUpdate Read-only Gets the URL for this ChannelItem in Update "This is one of those rare books that you will read to learn about the product and keep mode. rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Child Server MVP WorkingRevision object Gets the working revision of this Posting. Content Management Server (CMS) is fast becoming a vital content-management tool that Public Methods helps administrators and developers handle the ever-increasing amount of content on their AcquireOwnership Managing sourceTakes ownership of the Posting, Web sites. However, an authoritative of product information has beenthereby missingrestricting . . . until editing by others. now.
Approve Content Management Managing a Posting for approval. Microsoft Server 2002:Marks A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how Approvers Child object Checks which CMS users have rights to approve to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and the Posting in its current state. API to manage content on the Microsoft platform. CopyTo Managing Copies the current Posting to the specified This thorough reference explains the productChannel. architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, siteMarks configuration, template development. A Decline Managing a Postingand as declined. running example is used throughout the book to illustrate how important CMS features are Delete Managing DeletesInside the HierarchyItem. implemented in real-world Web site development. you'll find answers to such questions as: Equals System Determines whether two Object instances are equal. Chapter 6: How do you customize workflow? GetByRelativePath Child object Locates a ChannelItem in the channel hierarchy according to its position relative to this Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 ChannelItem. using Visual Studio .NET? GetHashCode Read-only Gets the hash code for the object. Chapter 17: How do you establish user rights? GetType Read-only Gets the Type of the current instance. Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? IsDescendantOf Read-only Determines whether this object is a descendant of the specified object. Chapter 32: How do you publish dynamic data?
[ MoveTo Team LiB ]
Managing
Moves this Posting to the specified Channel.
ReleaseOwnership
Managing
Releases the ownership of a Posting previously acquired using AcquireOwnership.
RevisionForDate
Child object
Returns the historical revision of a Posting for a specified date and time (GMT).
Revisions
Child object
Returns a collection of historical revisions of a Posting.
Submit
Managing
Marks a Posting as submitted.
ToString
System
Returns a String that represents the current object type.
• ValidateChangeToken Table of ContentsManaging
Confirms that the Posting has not been altered time it was read and that it is in the expected state for the next edit operation. ByBill English, Olga Londer, Shawn Shell, Todd Bleeker , Stephen Cawood Microsoft Content Management Server 2002: A Complete since Guide the last
We have included a classification column in the Table B-8. This is not a CMS classification. It Wesley wasPublisher: includedAddison to make it easier to locate the discussion about each member in Chapter 26. Pub Date: October 31, 2003
[ TeamISBN: LiB ]0-321-19444-6 Pages: 1136
"This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." —Gary Bushey, SharePoint Server MVP Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Web sites. However, an authoritative source of product information has been missing . . . until now. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. This thorough reference explains the product architecture, then shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions as: Chapter 6: How do you customize workflow? Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
Placeholder Parentage Table B-9 shows the complete parentage of the CMS Placeholder class. The properties and methods listed in italics in the table are defined by the class in the column header and then inherited by the derived class(es) to the left. So, for instance, only GetHashCode is coded in the CmsObject class, whereas Equals, GetType, and ToString are coded in the System.Object class and then inherited by the CmsObject class. All these members are inherited by the Placeholder class. Datasource, for example, is coded in the Placeholder class and is not inherited by any other class. •
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Table B-9. Placeholder Parentage
Publisher: Addison Wesley Placeholder
CmsObject
System.Object
Pub Date: October 31, 2003
Public Properties ISBN: 0-321-19444-6 Pages: 1136 Datasource
Datasource.RawContent Definition "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Name Bushey, SharePoint Server MVP —Gary Posting Management Server (CMS) is fast becoming a vital content-management tool that Content helps administrators and developers handle the ever-increasing amount of content on their Public Methods Web sites. However, an authoritative source of product information has been missing . . . until now. Equals Equals Equals Microsoft Content Management Server 2002: A Complete Guide is the first book that explains GetHashCode GetHashCode how to effectively unlock the power of CMS. Administrators and developers alike will learn how toGetType enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and GetType GetType API to manage content on the Microsoft platform. ToString ToString ToString This thorough reference explains the product architecture, then shows you how to create and Protected edit content Constructors and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Placeholder Constructor running example is used throughout the book to illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions Protected Methods as: BeginWrite Chapter 6: How do you customize workflow? EndWrite Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 RetrieveContent using Visual Studio .NET? SaveContent Chapter 17: How do you establish user rights?
TableChapter B-10 defines all the members listed for the Placeholder classorganization's in Table B-9. needs, size, 22: How do you best deploy CMS according to your and resources? We have included a classification column in Table B-10. This is not a CMS classification. It was included to make easier to locate thedynamic discussion about each member in Chapter 27. Chapter 32: itHow do you publish data?
[ Team LiB ]
Table B-10. Placeholder Member Descriptions Placeholder
Classification
Description
Public Properties Datasource
Read/write
Gets and sets a data source for this Placeholder, allowing it to detour where it saves and loads its data from.
Datasource. RawContent
Read/write
Gets or sets the raw data to be saved and returned.
• Definition
Table of Contents Child object
Gets the PlaceholderDefinition that governs this Placeholder.
Microsoft Content Management Server 2002: A Complete Guide
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Name
Read-only
Gets the name of this Placeholder.
Posting
Child object
Gets the Posting to which this Placeholder belongs.
Publisher: Addison Wesley
Pub Date: October 31, 2003 Public Methods ISBN: 0-321-19444-6
Equals Pages: 1136
System
Determines whether two Object instances are equal.
GetHashCode
Read-only
Gets the hash code for the object.
GetType Read-only Gets the Type of the current instance. "This is one of those rare books that you will read to learn about the product and keep ToString to find thoseSystem a String that represents the current object rereading tidbits that you Returns missed before." —Gary Bushey, SharePoint Server MVPtype. Protected Constructors Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle theaever-increasing of content on their Placeholder Other Creates new instance ofamount the Placeholder class. Web sites. However, an authoritative source of product information has been missing . . . until Constructor now. Protected Methods Microsoft Content Management Server 2002: A Complete Guide is the first book that explains BeginWrite Other RaisesAdministrators the PlaceholderPropertyChanging to how how to effectively unlock the power of CMS. and developers alikeevent will learn prepare for updating a Placeholder property. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. EndWrite Other Raises the PlaceholderPropertyChanged event to end the Placeholder property process. This thorough reference explains the product architecture, then update shows you how to create and edit content and use the workflow. Topic coverage includes CMS administration and security, RetrieveContent Other Retrieves the raw content from the CMS Content the Publishing API, deployment options, site configuration, and template development. A Repository. running example is used throughout the book to illustrate how important CMS features are implemented Inside you'll find to such SaveContentin real-world OtherWeb site development. Saves Placeholder content asanswers it is ready to bequestions stored in as: the CMS Content Repository. [ Team LiB ] 6: How do you customize workflow? Chapter Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 using Visual Studio .NET? Chapter 17: How do you establish user rights? Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?
[ Team LiB ]
PlaceholderDefinition Parentage One of the key properties in the Placeholder structure is the Definition object. So important and unique is this object that we provide the parentage of the PlaceholderDefinition in the following tables. The CanCache, InjectTypeProperty, and ReflectAsReadOnly properties inherited from CustomReflectableObject are protected and must be overridden to use them, so we left them out of the tables. Likewise, the protected properties GetEditor and GetPropertyOwner are not intended to be used directly from code and are also left out of the tables. Table B-11 shows the complete parentage of the CMS Placeholder Definition class, using the same rules as theofPlaceholder table. • Table Contents Microsoft Content Management Server 2002: A Complete Guide ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
Table B-11. PlaceholderDefinition Parentage
Publisher: Addison Wesley
Pub Date: October 31, 2003
Placeholder ISBN: 0-321-19444-6
CustomReflectableObject System.Object
Pages: 1136
Public Properties Description IsReadOnly "This is one of those rare books that you will read to learn about the product and keep rereading to find those tidbits that you missed before." Name Bushey, SharePoint Server MVP —Gary Public Methods Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Clone Web sites. However, an authoritative source of product information has been missing . . . until now. CreatePlaceholder Microsoft Delete Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Administrators and developers alike will learn how toDeserializeObject enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Equals Equals Equals This thorough reference explains the product architecture, then shows you how to create and GetAttributes GetAttributes edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A GetClassName running example is used throughout the book to GetClassName illustrate how important CMS features are implemented in real-world Web site development. Inside you'll find answers to such questions GetComponentName GetComponentName as:
GetConverter GetConverter Chapter 6: How do you customize workflow? GetDefaultEvent GetDefaultEvent Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 GetDefaultProperty GetDefaultProperty using Visual Studio .NET? GetEvents GetEvents Chapter 17: How do you establish user rights? GetHashCode GetHashCode GetHashCode Chapter 22: How do you best deploy CMS according to your organization's needs, size, and resources? GetProperties GetProperties Chapter 32: How do you publish dynamic data? GetType GetType
GetType
[ Serialize Team LiB ]
ToString
ToString
ToString
Public Events PropertyChanged Public Constructors PlaceholderDefinition Constructor Protected Methods BeginRead • BeginWrite Table of Contents Microsoft Content Management Server 2002: A Complete Guide
EndWrite
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker, Stephen Cawood
OnCloned Publisher: Addison Wesley
Table all2003 the members listed for the Placeholder Definition class in Table B-11. PubB-12 Date: defines October 31, ISBN: 0-321-19444-6
Again, the classification column in Table B-12 is not a CMS classification. It was included to Pages: 1136 make it easier to locate the discussion about each member in Chapter 27.
"This is one of those rare books that you will read to learn about the product and keep rereading Table to find those tidbits that you missed before." Member Descriptions B-12. PlaceholderDefinition —Gary Bushey, SharePoint Server MVP
Placeholder Classification Description Content Management Server (CMS) is fast becoming a vital content-management tool that helps administrators and developers handle the ever-increasing amount of content on their Public Properties Web sites. However, an authoritative source of product information has been missing . . . until now. Description Read/write Gets or sets a description for the PlaceholderDefinition. Microsoft Content Management Server 2002: A Complete Guide is the first book that explains how to effectively unlock the power of CMS. Indicates Administrators andthe developers alike will learn IsReadOnly Read-only whether Placeholder Definition is how to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and read-only. API to manage content on the Microsoft platform. Name Read/write Gets or sets the name of a PlaceholderDefinition. This thorough reference explains the product architecture, then shows you how to create and Public Methods edit content and use the workflow. Topic coverage includes CMS administration and security, the Publishing API, deployment options, site configuration, and template development. A Clone example is used throughout Creating and Creates a new how Placeholder Definition object are that is running the book to illustrate important CMS features a copyInside of the you'll current PlaceholderDefinition. implemented in real-worlddeleting Web site development. find answers to such questions as: CreatePlaceholder Creating and Creates a new Placeholder based on this deleting PlaceholderDefinition. Chapter 6: How do you customize workflow? Delete Creating and Marks a PlaceholderDefinition as deleted and removesContent it from the Template Server to which it belongs. Chapter 10: How do deleting you develop for Microsoft Management (CMS) 2002 using Visual Studio .NET? DeserializeObject Creating and Deserializes the Placeholder Definition contained in deleting a System.Xml.XmlNode. Chapter 17: How do you establish user rights?
Equals System Determines whether two Object instances are Chapter 22: How do you best deploy CMS according to your organization's needs, size, equal. and resources? GetAttributes Read-only Gets the collection of attributes for the Chapter 32: How do you publish dynamic data? PlaceholderDefinition.
[ GetClassName Team LiB ]
Read-only
Gets the name of the class for the PlaceholderDefinition.
GetComponentName
Read-only
Gets the name of the component for the PlaceholderDefinition.
GetConverter
Read-only
Gets a .NET converter for use with the PlaceholderDefinition. Converters are primarily used for string-to-value conversions, and they themselves have a multitude of members.
GetDefaultEvent
Read-only
Gets the default event for a PlaceholderDefinition, if any.
GetDefaultProperty
Read-only
Gets the default property for a PlaceholderDefinition, if any.
•
Table of Contents
Microsoft Content Management Server 2002: A Complete Guide
GetEvents
Read-only
Gets the events that are declared or inherited by
ByBill English, Olga Londer, Shawn Shell, Todd Bleeker , Stephen CawoodDefinition. the Placeholder
GetHashCode
Read-only
Gets the hash code for the object.
Read-only
Gets the collection of properties for the PlaceholderDefinition.
GetType Pages: 1136
Read-only
Gets the Type of the current instance.
Serialize
Creating and deleting
Serializes the Placeholder Definition to an XML string using an optional System.Xml.XmlWriter.
Publisher: Addison Wesley
GetProperties
Pub Date: October 31, 2003 ISBN: 0-321-19444-6
"This is one of those rare books that you willReturns read toalearn about product the andcurrent keep ToString System String that the represents rereading to find those tidbits that you missed before." object type. —Gary Bushey, SharePoint Server MVP Public Events Content Management Server (CMS) is fast becoming a vital content-management tool that PropertyChanged Creating and after any property of of a content on their helps administrators and developers handle Occurs the ever-increasing amount deleting hashas changed. Web sites. However, an authoritative sourcePlaceholderDefinition of product information been missing . . . until now. Public Constructors Microsoft Content Management Server 2002: A Complete Guide is the first book that explains Placeholder Definition Creating and Is the constructor for the PlaceholderDefinition how to effectively unlock the power of CMS. Administrators and developers alike will learn how Constructor deleting class. to enhance their Web servers' scalability, flexibility, and extensibility by using CMS features and API to manage content on the Microsoft platform. Protected Methods This thorough reference explains architecture, then shows you how to create and BeginRead Other the productChecks that neither the current edit content and use the workflow. Topic coverage includes CMS administration andto security, PlaceholderDefinition nor the Template which the Publishing API, deployment options, sitethe configuration, template development. Placeholderand Definition belongs has beenA running example is used throughout the book to illustrate how important CMS features are deleted and committed. implemented in real-world Web site development. Inside you'll find answers to such questions BeginWrite Other Checks that the current user has sufficient rights as: to edit the PlaceholderDefinition.
EndWrite Other Saves the most recent change made to a Chapter 6: How do you customize workflow? PlaceholderDefinition to the CMS server. Chapter 10: How do you develop for Microsoft Content Management Server (CMS) 2002 OnCloned Other Allows a custom placeholder definition (derived using Visual Studio .NET? from Placeholder Definition) to perform custom Chapter 17: How do you establish useractions rights?when an instance is cloned. Chapter [ Team LiB ] 22: How do you best deploy CMS according to your organization's needs, size, and resources? Chapter 32: How do you publish dynamic data?