Book Image

Building Websites with Microsoft Content Management Server

Book Image

Building Websites with Microsoft Content Management Server

Overview of this book

Microsoft Content Management Server 2002 is a dynamic web publishing system with which you can build websites quickly and cost-efficiently. MCMS provides the administration, authoring, and data management functionality, and you provide the website interface, logic, and workflow. Once your website is up and running, your content contributors can add and edit content on their own, without the need to work with developers or the IT department. First time developers of Microsoft Content Management Server 2002 face a relatively steep learning curve. Not only are they expected to be conversant in the Microsoft .NET Framework, they are also required to be familiar with the concepts of MCMS 2002. Many beginners to MCMS start out by looking at the example site that ships with the product; tweaking it, dissecting it and turning it inside out using the obscure code comments as markers. However, when it comes to starting their own website from scratch, many are baffled ? where do they begin? This book exists to answer that question; teaching the essential concepts of MCMS 2002 in a clear, straightforward and practical manner. Containing answers to some of the most asked questions in developer newsgroups, this book is a treasure trove of tricks and tips for solving the problems faced by MCMS developers. This is a unique resource focused exclusively on the needs of developers using MCMS. It doesn?t waste time and pages on user or administrator level information that is well covered in other documentation. It?s a distillation of practical experience that developers need to get results, fast. The authors carefully structured example project complements and extends the knowledge gained from an initial look at the examples that ship with MCMS.
Table of Contents (28 chapters)
Building Websites with Microsoft Content Management Server
Credits
About the Authors
Introduction

MCMS is a Content Server


MCMS uses Internet Information Services (IIS) to serve MCMS-driven websites. IIS is the engine that receives and processes HTTP requests from clients: MCMS does not get involved with any of that. It does, however, have a part to play in how content is transformed from data in the backend database to HTML pages—called postings in MCMS—for the browser.

To understand this better, let's follow the path of a single HTTP request and see how IIS and MCMS work together to render content.

How MCMS Renders Content

When visitors to your site request a page, they send its URL to the web server. For example, this could be: http://www.TropicalGreen.net/PlantCatalog/hibiscus.htm. The HTTP request is first received by IIS.

MCMS has two ISAPI filters, which are then applied:

  • Resolution HTML Packager (REHTMLPackager.dll) is the first filter to intercept requests. It ensures that client-side scripts are handled correctly when a user wishes to compare two different versions of a single posting. It does this by injecting a JavaScript routine on the fly, modifying the output of the page doing the comparison.

  • MCMS ISAPI Filter (ReAuthFilt.dll) checks the incoming URL against the MCMS repository to see if the request is for an MCMS object. Non-CMS objects are handled by IIS just as they would be without MCMS.

Should the MCMS ISAPI Filter find that the request is for an MCMS object, it proceeds to check to see if the user requesting the object has rights to it. If so, it transforms the incoming URL. The transformed URL contains information that maps to an object in the MCMS database and takes this form (for clarity, this URL has been split onto multiple lines):

http://www.tropicalgreen.net/Templates/Plants.aspx?NRMODE=Published&NRORIGINALURL=%2fTropicalGreen%2fPlantCatalog&NRNODEGUID=%7bA9261BA7-A58B-4760-850D-512CCF77BAC8%7d&NRCACHEHINT=NoModifyGuest

It's not a pretty URL but it conveys a lot of information. The request is then passed to IIS and ASP.NET to process the web form, which in the above case is Plants.aspx. The MCMS HTTP modules (registered in the web application's web.config file) query the database for an object with a key that matches the value in the NRNODEGUID (the unique identifier or GUID), NRMODE, NRORIGINALURL, and NRCACHEHINT parameters and create a so-called CmsHttpContext giving the code in the web form access to the associated repository items. The form will render the content according to these repository items.

With these instructions, control is passed over to IIS. IIS sends the response back to the browser that made the request. All these processes are carried out transparently. The visitor to the website would not be aware that any URL transformation has taken place.

And that is how MCMS delivers pages.

Naturally, MCMS makes use of caching—an important concept that is used to boost its performance by minimizing database queries. For a more detailed explanation on how MCMS processes requests with caching, read Chapter 22.

How to Locate the MCMS ISAPI Filters

The filter is installed globally on your MCMS server. To see it:

  1. 1. Select Start | Administrative Tools | Internet Services Manager (If this does not appear, you may need to turn on this option in your Start Menu options, or you can access the Administrative Tools through the Control Panel.)

  2. 2. Right-click on the node representing your server and select Properties from the pop-up menu.

  3. 3. In the properties dialog, select the ISAPI Filters tab. You should see a dialog similar to the following screenshot.

Note

I can't find the filter in the ISAPI Filter section

You have to install MCMS first (see Chapter 2). The filters are applied on a global level (on your web server). Check that you are looking at the properties of the server (represented by the icon of a computer: ) and not the individual website.

Security Service

Not everyone should be given access to author the website or view confidential information. MCMS provides security checks through the Security service (see Chapter 10 for a detailed discussion of security).

A service named AESecurityService runs on all servers loaded with MCMS. The AESecurityService ensures that authentication is working correctly. When it is stopped, it is not possible to author your website as the web authoring tool will not be displayed. It is also responsible for maintaining the disk cache. If you stop the service, the disk cache is cleared.

You can see the presence of the AESecurityService by selecting Start | Administrative Tools | Services (or by going to the Control Panel). By default, it is configured to start automatically when Windows loads.