Enhancing Microsoft Content Management Server with ASP.NET 2.0

1 (1 reviews total)
By Lim Mei Ying , Spencer Harbar , Stefan Goßner
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Installation

About this book

The release of Microsoft Content Management Server (MCMS) Service Pack 2 opens up the world of ASP.NET 2.0 to MCMS developers. Written by the masters of MCMS, this book shows you how to use the new features of ASP.NET 2.0 that everyone is talking about in your MCMS development.

You will first learn how to install and configure MCMS SP2. There are two approaches to setting up a development environment for SP2: an upgrade from a previous SP1a installation or starting from scratch and building a fresh installation including SP2. Of course, both approaches are covered.

You will become familiar with the MCMS Service Pack 2 development environment, and create custom Visual Studio 2005 templates to overcome some of the issues which are present with the templates shipped with MCMS SP2.

After that, its time to look at some of the most exciting features of ASP.NET 2.0, and how you can make use of them in MCMS: master pages, site navigation, themes, and the membership provider model.

One of the coolest features introduced with ASP.NET 2.0 is master pages, which allow developers to enforce common layout and behaviour across pages within an application. You will learn about the benefits of using master pages and see a step-by-step guide for implementing them in your MCMS applications, where they become master templates!

ASP.NET 2.0 introduces a whole new way of implementing site navigation, driven by site maps. By programmatically adding channels and postings to a site map you will see how to smoothly integrate these controls to any MCMS site.

To customize the look of your site, we will see how a common look and feel can be applied efficiently to a MCMS site by using ASP.NET 2.0 themes. An essential customization required for themes to work correctly in an MCMS site is a must-read feature of this chapter.

MCMS has its own role based authorization and user management system which cannot be extended. However, the new ASP.NET 2.0 Membership Provider Model and the shipped controls can be used within MCMS applications to improve the implementation of Forms Authentication and provide a more elegant solution for authenticating against an external store.

A collection of tips and tricks round off the book, including using the Provider Model design pattern to ease migration to Office SharePoint Portal Server

Publication date:
August 2006
Publisher
Packt
Pages
224
ISBN
9781904811527

 

Chapter 1. Installation

In this chapter we walk you through the installation and configuration of MCMS 2002 Service Pack 2 (SP2), along with SQL Server 2005 and Visual Studio 2005 on a single developer workstation. In addition, we will cover the changes to the SP2 development environment and a number of tips for working within it.

This chapter assumes you are already familiar with the steps necessary to install MCMS 2002 SP1a as detailed in depth in the previous book, Building Websites with Microsoft Content Management Server from Packt Publishing, January 2005 (ISBN 1-904811-16-7).

There are two approaches to setting up a development environment for SP2: upgrading from a previous SP1a installation, or starting from scratch and building a fresh installation including SP2. We will cover both approaches in this chapter.

For the examples in this book, we will be using Windows XP Professional SP2 as our development workstation. However, where there are significant differences for a Windows Server 2003 SP1 machine, those will be noted. All examples assume the logged-on user is a local machine administrator.

Overview of MCMS 2002 Service Pack 2

As with other Microsoft Service Packs, one major purpose of SP2 is to provide an integrated installation for a large number of previously released hotfixes. SP2 will now be a prerequisite for any future hotfix releases.

While many customers will view SP2 as a regular Service Pack, it also offers support for the latest development platform and tools from Microsoft, namely SQL Server 2005, .NET Framework 2.0 and ASP.NET 2.0, and Visual Studio 2005:

  • SQL Server 2005: MCMS databases can be hosted by SQL Server 2005, offering numerous advantages in security, deployment, and most significantly, performance.

  • .NET Framework 2.0 and ASP.NET 2.0: MCMS applications can be hosted within the .NET Framework 2.0 runtime, and take advantage of v2.0 language features as well as security and performance improvements. In addition, many of the new features of ASP.NET 2.0 such as master pages, themes, navigation, and Membership Providers can be used. This provides numerous opportunities to both refine and refactor MCMS applications, and is the primary focus of this book.

  • Visual Studio 2005: MCMS applications can be developed using Visual Studio 2005. One of the greatest advantages here is the use of the new HTML-editing and designer features in VS.NET along with improved developer productivity.

If you wish, you can continue to use SQL Server 2000 for your MCMS applications. However, we recommend upgrading to SQL Server 2005 and will use it throughout the examples in this book.

There are numerous versions or Stock Keeping Units (SKUs) of Visual Studio 2005, all of which are supported with SP2. Throughout the examples in this book, we will be using Visual Studio 2005 Professional Edition.

Note

Unfortunately, SP2 is not a cumulative service pack and therefore requires an existing installation of SP1a. Likewise, there is no slipstreamed distribution of SP2. The SP2 distribution is suitable for all editions of MCMS.

Mainly due to the extremely fast preparation and release of SP2 following the Release to Manufacturing (RTM) of .NET 2.0, Visual Studio 2005, and SQL Server 2005, the Microsoft installation information (KB906145) isn't particularly well documented and is somewhat confusing. Rest assured that the guidance in this chapter has been verified and tested for both installation scenarios covered.

 

Overview of MCMS 2002 Service Pack 2


As with other Microsoft Service Packs, one major purpose of SP2 is to provide an integrated installation for a large number of previously released hotfixes. SP2 will now be a prerequisite for any future hotfix releases.

While many customers will view SP2 as a regular Service Pack, it also offers support for the latest development platform and tools from Microsoft, namely SQL Server 2005, .NET Framework 2.0 and ASP.NET 2.0, and Visual Studio 2005:

  • SQL Server 2005: MCMS databases can be hosted by SQL Server 2005, offering numerous advantages in security, deployment, and most significantly, performance.

  • .NET Framework 2.0 and ASP.NET 2.0: MCMS applications can be hosted within the .NET Framework 2.0 runtime, and take advantage of v2.0 language features as well as security and performance improvements. In addition, many of the new features of ASP.NET 2.0 such as master pages, themes, navigation, and Membership Providers can be used. This provides numerous opportunities to both refine and refactor MCMS applications, and is the primary focus of this book.

  • Visual Studio 2005: MCMS applications can be developed using Visual Studio 2005. One of the greatest advantages here is the use of the new HTML-editing and designer features in VS.NET along with improved developer productivity.

If you wish, you can continue to use SQL Server 2000 for your MCMS applications. However, we recommend upgrading to SQL Server 2005 and will use it throughout the examples in this book.

There are numerous versions or Stock Keeping Units (SKUs) of Visual Studio 2005, all of which are supported with SP2. Throughout the examples in this book, we will be using Visual Studio 2005 Professional Edition.

Note

Unfortunately, SP2 is not a cumulative service pack and therefore requires an existing installation of SP1a. Likewise, there is no slipstreamed distribution of SP2. The SP2 distribution is suitable for all editions of MCMS.

Mainly due to the extremely fast preparation and release of SP2 following the Release to Manufacturing (RTM) of .NET 2.0, Visual Studio 2005, and SQL Server 2005, the Microsoft installation information (KB906145) isn't particularly well documented and is somewhat confusing. Rest assured that the guidance in this chapter has been verified and tested for both installation scenarios covered.

 

Installation Approach


We cover both an in-place upgrade to SP2 and a fresh installation in this chapter. Which approach you take is down to your specific requirements and your current, if any, MCMS installation.

If you wish to upgrade, continue with the next section, Upgrading to Microsoft Content Management Server 2002 Service Pack 2 and then skip ahead to Chapter 2,Getting Started with the Development Environment.

If you wish to perform a fresh install, skip ahead to the Fresh Installation of Microsoft Content Management Server 2002 Service Pack 2 section, about 18 to 20 pages into this chapter.

 

Upgrading to Microsoft Content Management Server 2002 Service Pack 2


This section details the steps required to upgrade an existing installation of MCMS SP1a, which includes the Developer Tools for Visual Studio.NET 2003 component. The outline process for an upgrade is as follows:

  1. 1. Install Visual Studio 2005.

  2. 2. Install MCMS 2002 Service Pack 2.

  3. 3. Configure the development environment.

  4. 4. (Optional) Prepare the MCMS database for SQL Server 2005.

  5. 5. (Optional) Upgrade SQL Server.

  6. 6. (Optional) Install SQL Server 2005 Service Pack 1.

We will perform all steps while logged on as a local machine administrator.

Installing Visual Studio 2005

Visual Studio 2005 can be installed side by side with Visual Studio.NET 2003. Once we have completed the upgrade, we can remove Visual Studio.NET 2003 if we wish to only develop MCMS applications using SP2 and ASP.NET 2.0.

  1. 1. Insert the Visual Studio 2005 DVD, and on the splash screen, click Install Visual Studio 2005.

  2. 2. On the Welcome to the Microsoft Visual Studio 2005 installation wizard page, click Next.

  3. 3. On the Start Page, select the I accept the terms of the License Agreement checkbox, enter your Product Key and Name, and click Next.

  4. 4. On the Options Page, select the Custom radio button, enter your desired Product install path, and click Next.

  5. 5. On the second Options page, select the Visual C# and Visual Web Developer checkboxes within the Language Tools section, and the Tools checkbox within the .NET Framework SDK section. Click Install.

    Note

    Feel free to install any additional features you may wish to use. The above selections are all that's required to follow the examples in this book.

  6. 6. Wait (or take a coffee break) while Visual Studio 2005 is installed. When the Finish Page appears, click Finish.

  7. 7. From the Visual Studio 2005 Setup dialog, you can choose to install the Product Documentation (MSDN Library) if desired.

  8. 8. From the Visual Studio 2005 Setup dialog, click Check for Visual Studio Service Releases to install any updates that may be available.

  9. 9. Click Exit.

Installing MCMS 2002 Service Pack 2

Next, we will install MCMS Service Pack 2.

  1. 1. From the Start Menu, click Run…

  2. 2. In the Open textbox, enter IISRESET /STOP and click OK. Wait while the IIS Services are stopped.

  3. 3. Double-click the SP2 installation package.

  4. 4. On the Welcome to Microsoft Content Management Server 2002 SP2 Installation Wizard page, click Next.

  5. 5. Select the I accept the terms of this license agreement radio button, and click Next.

  6. 6. On the ready to begin the installation page, click Next.

    • Wait while Service Pack 2 is installed.

  7. 7. During installation you may be prompted for the MCMS 2002 SP1a CD-ROM.

  8. 8. Once The Installation Wizard has completed page, click Finish.

  9. 9. If prompted, click Yes on the dialog to restart your computer, which will complete the installation.

  10. 10. Otherwise, from the Start Menu, click Run…

  11. 11. In the Open textbox, enter IISRESET /START and click OK to restart the IIS services.

Note

Stopping IIS prior to the installation of SP2 avoids potential problems with replacing locked files during the installation, and can prevent the requirement to reboot.

 

Configuring the Development Environment


Before continuing, a few additional steps are required to configure the development environment. We will:

  • Configure the shortcut that opens Site Manager to bypass the Connect To dialog.

  • Install the MCMS website and item templates in Visual Studio.

Site Manager Shortcut

During the installation of SP2 the Site Manager Start-menu shortcut will be overwritten. To configure Site Manager to bypass the Connect To dialog, take the following steps:

  1. 1. Select Start | All Programs | Microsoft Content Management Server.

  2. 2. Right-click the Site Manager shortcut and click Properties.

  3. 3. In the Target textbox, replace"C:\Program Files\Microsoft Content Management Server\Client\NRClient.exe" http:///NR/System/ClientUI/login.asp with"C:\Program Files\Microsoft Content Management Server\Client\NRClient.exe" http://localhost/NR/System/ClientUI/login.asp.

  4. 4. Click OK.

Note

It is possible to configure many different Site Manager shortcuts pointing to different MCMS entry points. However, for this book we will only use the entry point on localhost, which is the only supported configuration for MCMS development.

Visual Studio Templates

The installation of MCMS Service Pack 2 automatically registers the MCMS developer tools such as MCMS Template Explorer in Visual Studio 2005. However, before we can create MCMS applications with Visual Studio, we need to make the website and item templates available.

  1. 1. Select Start | All Programs | Microsoft Visual Studio 2005 | Visual Studio Tools | Visual Studio 2005 Command Prompt.

  2. 2. Execute the following commands, replacing MCMS_INSTALL_PATH with the install location of MCMS (usually C:\Program Files\Microsoft Content Management Server) and PATH_TO_MY_DOCUMENTS_FOLDER with the location of your My Documents folder:

    xcopy "MCMS_INSTALL_PATH\DevTools\NewProjectWizards80\Visual Web Developer" "PATH_TO_MY_DOCUMENTS_FOLDER\Visual Studio 2005\ Templates\ProjectTemplates\Visual Web Developer"/E
    xcopy "MCMS_INSTALL_PATH\DevTools\NewItemWizards80\Visual Web Developer" "PATH_TO_MY_DOCUMENTS_FOLDER\Visual Studio 2005\ Templates\ItemTemplates\Visual Web Developer"/E
    
    
  3. 3. Execute the following command to register the templates with Visual Studio 2005:

    devenv /setup
    
    
  4. 4. Close the command prompt.

This completes the steps to upgrade to SP2, and our environment is now ready for development! We can test our installation by viewing the version number in the SCA, connecting with Site Manager, or by using the Web Author. Of course, any existing MCMS web applications will at this time still be hosted by.NET Framework v1.1.

Note

It is not necessary at this stage to register ASP.NET as detailed in the Microsoft Installation Instructions (KB 906145). This registration was performed by the Visual Studio 2005 installer.

Note

Additionally it is unnecessary to configure IIS to use ASP.NET 2.0 using the Internet Information Services Snap-In, as Visual Studio 2005 automatically sets this option on each MCMS website application created.

However, if you are installing on Windows Server 2003, you must configure the Virtual Website root and the MCMS Virtual Directory to use ASP.NET 2.0, as it is not possible to use two versions of ASP.NET within the same Application Pool.

Note

The ActiveX controls that are part of HtmlPlaceholderControl are updated with SP2. Therefore you will be prompted to install this control when first switching to edit mode.

If you have pre-installed the controls using regsvr32 or Group Policy as detailed at http://download.microsoft.com/download/4/2/5/4250f79a-c3a1-4003-9272-2404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm#51C0CE4B-FC57-454C-BAAE-12C09421B57B, you might also be prompted, and you will need to update your distribution for the controls.

At this stage you can also choose to upgrade SQL Server or move forward to Chapter 2.

Preparing the MCMS Database for SQL Server 2005

Before upgrading our SQL Server installation to SQL Server 2005, we need to prepare the MCMS database so that it is compatible with SQL Server 2005.

  1. 1. Request the following MCMS hotfix from Microsoft: http://support.microsoft.com/?kbid=913401.

  2. 2. Run the hotfix executable to extract the files to a local folder, e.g. c:\913401.

  3. 3. Copy both of the files (_dca.ini and _sp1aTosp2upgrade.sql) to the MCMS SQL install folder (typically c:\Program Files\Microsoft Content Management Server\Server\Setup Files\SQL Install). Overwrite the existing files.

  4. 4. Delete the temporary folder.

  5. 5. Select Start | Microsoft Content Management Server | Data Configuration Application.

  6. 6. On the splash screen, click Next.

  7. 7. In the Stop Service? dialog, click Yes.

  8. 8. On the Select MCMS Database page, click Next.

  9. 9. In the Upgrade Required dialog, click Yes.

  10. 10. On the Upgrade Database page, click Next.

  11. 11. In the Add an Administrator dialog, click No.

  12. 12. On the Database Configuration Application page, uncheck the Launch the SCA Now checkbox and click Finish.

Upgrading SQL Server 2005

Before proceeding, be sure to have the details of your existing SQL Server Service Account, which you will need during the upgrade process.

  1. 1. Insert the SQL Server 2005 CD-ROM or DVD.

  2. 2. On the splash screen, click the Server components, tools, Books Online, and samples link within the Install section.

  3. 3. On the End User License Agreement dialog, select the I accept the licensing terms and conditions checkbox and click Next.

  4. 4. On the Installing Prerequisites dialog, click Install and wait while the prerequisites are installed.

  5. 5. Once complete, click Next, and wait while the System Configuration Check completes.

  6. 6. On the Welcome to the Microsoft SQL Server Installation Wizard page, click Next.

  7. 7. On the System Configuration Check page, all Actions should report a Status of Success.

  8. 8. Click Next and wait while Setup prepares the installation.

  9. 9. On the Registration Information page, personalize your installation details, enter your product key, and click Next.

  10. 10. On the Components to Install page, select the SQL Server Database Services and Workstation components, Books Online and development tools checkboxes, and click Next.

  11. 11. On the Instance Name page, select the Default instance radio button, and click Next.

  12. 12. On the Existing components page, check the SQL Server Database Services 8.00.2039 checkbox, and click Next.

  13. 13. On the Upgrade Logon Information page, select the Windows Authentication Mode radio button, and click Next.

    Wait while the upgrade is analyzed.

  14. 14. On the Service Account page, select SQL Browser from the Service combo box, enter your SQL Server Service Account details, and click Next.

  15. 15. On the Error and Usage Report Settings page, choose if you would like to submit error and usage reports to Microsoft, and click Next.

  16. 16. On the Ready to Install page, click Install.

  17. 17. Wait while SQL Server is upgraded, and click Next.

  18. 18. On the Completing Microsoft SQL Server 2005 Setup page, click Finish.

Note

To avoid possible ODBC errors while saving in the Web Author following an upgrade to SQL Server 2005, perform an IISRESET on the MCMS server machine. Note that for a production system, we would stop IIS before upgrading the SQL Server instance.

Installing SQL Server 2005 Service Pack 1

We will now install Service Pack 1 for SQL Server 2005, which can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=cb6c71ea-d649-47ff-9176-e7cac58fd4bc.

  1. 1. Double-click the installer file, and wait while the files are extracted.

  2. 2. On the Welcome page, click Next.

  3. 3. On the End User License Agreement page, check the I accept the licensing terms and conditions checkbox, and click Next.

  4. 4. On the Feature Selection page, click Next.

  5. 5. On the Authentication Mode page, click Next.

  6. 6. On the Ready to Install page, click Install, and wait while the Service Pack is installed. During the installation, you may be prompted regarding Pending Reboot Files. If you are, click Yes.

  7. 7. When the Locked Files Found dialog appears, click Continue.

  8. 8. In the Computer Reboot Required dialog, click OK.

  9. 9. Click Next, and on the Installation Complete page. click Finish.

  10. 10. Restart your computer.

Modifying the CreateBackgroundProcessingJob Stored Procedure

Before proceeding, you need to modify one of the MCMS Stored Procedures to ensure its compatibility with SQL Server 2005.

  1. 1. Select Start | All Programs | Microsoft SQL Server 2005 | SQL Server Management Studio.

  2. 2. In the Connect To dialog, click Connect.

  3. 3. In the Object Explorer, expand the Databases folder, right-click the MCMS database, and click New Query.

  4. 4. Open Internet Explorer and navigate to http://support.microsoft.com/default.aspx?id=906145#XSLTH3161121122120121120120.

  5. 5. Copy and paste the SQL Script in the grey textbox to the Query Window in SQL Server Management Studio.

  6. 6. On the SQL Editor toolbar, click the Execute button.

  7. 7. Close SQL Server Management Studio.

This completes the steps to upgrade SQL Server 2005. You can now move ahead to Chapter 2.

Fresh Installation of Microsoft Content Management Server 2002 Service Pack 2

This section details the steps required to perform a fresh installation of SP2 using SQL Server 2005. All components are installed on a single machine and to their default locations. The following installation order provides all necessary prerequisites and is the optimal installation order from a time perspective. We start with a base installation of Windows XP Professional SP2, with all Windows updates installed. The outline process for the installation is as follows:

  • Configure Local Security Policy.

  • Create Service Accounts.

  • Install Internet Information Services.

  • Configure Internet Information Services.

  • Install SQL Server 2005.

  • Install SQL Server 2005 SP1.

  • Configure SQL Server 2005.

  • Bypass installation of Visual Studio.NET 2003.

  • Install MCMS 2002 prerequisites.

  • Install MCMS 2002 SP1a.

  • Remove temporary items.

  • Install Visual Studio 2005.

  • Install MCMS 2002 SP2.

  • Configure MCMS using the Database Configuration Application.

  • Configure the development environment.

We will perform all steps while logged on as a local machine administrator.

Configuring Local Security Policy

In order to authenticate Service Account identities, we need to modify the Windows XP Local Security policy. Note that this section is not required if your machine is a member of a domain.

  1. 1. Select Start | Control Panel.

  2. 2. Double-click Administrative Tools, and double-click Local Security Policy. (If you do not see Administrative Tools, click the Switch to Classic View link.)

  3. 3. Expand the Local Policies node, and click the Security Options node.

  4. 4. In the Policy pane, scroll to locate the Network access: Sharing and security model for local accounts item and then double-click it.

  5. 5. Set the combo box to Classic local users authenticate as themselves and click OK.

  6. 6. Close Local Security Settings and Administrative Tools.

Creating Service Accounts

We will create two Service Accounts, one for use by SQL Server and one for the MCMS System Account.

  1. 1. From the Desktop, right-click My Computer and select Manage.

  2. 2. In Computer Management, expand the Local Users and Groups node.

  3. 3. Right-click on the Users folder and click New User…

  4. 4. In the New User dialog, enter mssql in the User name textbox.

  5. 5. Provide a Full Name and Description.

  6. 6. Provide a Password.

  7. 7. Uncheck the User must change password at next logon checkbox.

  8. 8. Check the User cannot change password and Password never expires checkboxes and click Create.

  9. 9. In the New User dialog, enter mcmssys in the User name textbox.

  10. 10. Provide a Full Name and Description.

  11. 11. Provide a Password.

  12. 12. Uncheck the User must change password at next logon checkbox.

  13. 13. Check the User cannot change password and Password never expires checkboxes and click Create.

  14. 14. Close the New User dialog and close Computer Management.

Installing Internet Information Services

The following steps detail the installation of the minimal required components of Internet Information Services (IIS). Any differences to the procedure when installing on Windows Server 2003 SP1 are noted.

  1. 1. Select Start | Control Panel.

  2. 2. Double-click Add or Remove Programs.

  3. 3. Click Add/Remove Windows Components.

  4. 4. In the Windows Components Wizard, click (note: not check) Internet Information Services (IIS) followed by Details…

  5. 5. In the Internet Information Services (IIS) dialog, click (note: not check) World Wide Web Service followed by Details…

  6. 6. In the World Wide Web Service dialog, check the World Wide Web Service item and click OK.

  7. 7. Ensure that the Common Files, Internet Information Services Snap-In, and World Wide Web Service have been selected. Click OK.

    Note

    It is not necessary to install FrontPage 2000 Server Extensions despite the requirement being stated in the product documentation, and during the installation of Visual Studio.NET 2003 later.

  8. 8. Click Next and wait while IIS is installed; you may be prompted to insert your Windows XP CD-ROM.

  9. 9. Click Finish when the Completing the Windows Component Wizard page appears, and close Add or Remove Programs.

Note

When installing on Windows Server 2003 SP1.

Install the Application Server Role with ASP.NET (but not FrontPage Server Extensions) using the Manage My Server application. Then use Add or Remove Programs... Windows Components to add Active Server Pages and Server Side Includes. IIS Manager cannot be used to enable these; Add or Remove programs must be used or the MCMS installer will not recognize them!

In addition, create a new virtual website to host the Server Configuration Application. This site should be configured to use Windows Authentication and deny access from hosts other than localhost. Preferably this site hosting the SCA should also use Secure Sockets Layer (SSL). If this is not possible, configure the site to use a port other than 80.

Configuring Internet Information Services

We will initially configure IIS to use Windows Authentication. Later in the book we will explore alternative authentication methods.

  1. 1. From the Start Menu, click Run…

  2. 2. In the Open textbox, enter inetmgr and click OK.

  3. 3. Expand the Local Computer node, and the Websites folder.

  4. 4. Right-click Default Website and click Properties.

  5. 5. Click the Directory Security tab, and within the Anonymous access and authentication control frame, click Edit…

  6. 6. Uncheck the Anonymous Access checkbox and select the Integrated Windows Authentication checkbox, and click OK.

  7. 7. Click OK, and close Internet Information Services.

Installing SQL Server 2005

The following steps detail the installation of SQL Server 2005:

  1. 1. Insert the SQL Server 2005 CD-ROM or DVD.

  2. 2. On the splash screen, click the Server components, tools, Books Online, and samples link within the Install section.

  3. 3. In the End User License Agreement dialog, select the I accept the licensing terms and conditions checkbox and click Next.

  4. 4. In the Installing Prerequisites dialog, click Install and wait while the prerequisites are installed.

  5. 5. Once complete, click Next, and wait while the System Configuration Check completes.

  6. 6. On the Welcome to the Microsoft SQL Server Installation Wizard page, click Next.

  7. 7. On the System Configuration Check page, all Actions should report a Status of Success.

  8. 8. Click Next and wait while Setup prepares the installation.

  9. 9. On the Registration Information page, personalize your installation details, enter your Product Key, and click Next.

  10. 10. On the Components to Install page, select the SQL Server Database Services and Workstation components, Books Online and development tools checkboxes, and click Next.

  11. 11. On the Instance Name page, select the Default instance radio button, and click Next.

  12. 12. On the Service Account page, select the Use a domain user account radio button and enter the Service Account details for the mssql account. Check the SQL Server Agent and SQL Browser checkboxes, and click Next.

  13. 13. On the Authentication Mode page, select the Windows Authentication Mode radio button, and click Next.

  14. 14. On the Collation Settings page, click Next.

  15. 15. On the Error and Usage Report Settings page, choose if you would like to submit error and usage reports to Microsoft, and click Next.

  16. 16. On the Ready to Install page, click Install.

  17. 17. Wait while SQL Server is installed, and click Next.

  18. 18. On the Completing Microsoft SQL Server 2005 Setup page, click Finish.

This completes the steps to install SQL Server 2005.

Installing SQL Server 2005 Service Pack 1

We will now install Service Pack 1 for SQL Server 2005, which can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=cb6c71ea-d649-47ff-9176-e7cac58fd4bc.

  1. 1. Double-click the installer file and wait while the files are extracted.

  2. 2. On the Welcome page, click Next.

  3. 3. On the End User License Agreement page, check the I accept the licensing terms and conditions checkbox, and click Next.

  4. 4. On the Feature Selection page, click Next.

  5. 5. On the Authentication Mode page, click Next.

  6. 6. On the Ready to Install page, click Install, and wait while the Service Pack is installed. During the installation, you may be prompted regarding Pending Reboot Files. If you are, click Yes.

  7. 7. When the Locked Files Found dialog appears, click Continue.

  8. 8. In the Computer Reboot Required dialog, click OK.

  9. 9. Click Next, and on the Installation Complete page, click Finish.

  10. 10. Restart your computer.

Configuring SQL Server 2005

We will now configure our installation of SQL Server 2005 and create a database for use by our MCMS applications.

  1. 1. Select Start | Programs | Microsoft SQL Server 2005 | Microsoft SQL Management Studio.

  2. 2. In the Connect to Server dialog, select your server in the Server name combo box, Windows Authentication in the Authentication combo box, and click Connect.

  3. 3. In the Object Explorer, right-click the Database folder, and click New Database...

  4. 4. In the Database name textbox, enter TropicalGreen, click OK, and wait while the database is created.

  5. 5. In the Object Explorer, expand the Security folder.

  6. 6. Right-click the Logins folder, and click New Login...

  7. 7. In the Login name textbox, enter MACHINENAME\mcmssys.

  8. 8. In the Default database combo box, select TropicalGreen.

  9. 9. Click the User Mapping item within the Select a page pane.

  10. 10. In the Users mapped to this login grid, click the Map checkbox for the TropicalGreen database.

  11. 11. In the Database role membership grid, check the db_datareader, db_datawriter, and db_ddladmin checkboxes.

  12. 12. Click OK, and close SQL Management Studio.

Bypass the Installation of Visual Studio.NET 2003

MCMS SP1a requires an installation of a previous version of Visual Studio.NET to enable the Developer Tools component, prior to installing SP2. Installing Visual Studio.NET 2003 is both time consuming and undesirable. It is possible to bypass this requirement using the following procedure, which tricks the SP1a installer into thinking Visual Studio .NET 2003 is installed.

  1. 1. Request the following MCMS hotfix from Microsoft: http://support.microsoft.com/?kbid=915190

  2. 2. Run the hotfix executable to extract the files to a local folder, e.g. c:\kb915190.

  3. 3. Use Windows Explorer to create a folder, e.g. c:\VSTemp.

  4. 4. Select Start | Run…

  5. 5. In the Run dialog, type cmd and click OK.

  6. 6. Execute the following commands:

cd c:\kb915190
cscript VS2003ByPass.vbs c:\VSTemp

Installing MCMS 2002 Prerequisites

Before we can proceed with the installation of MCMS itself, we need to install two prerequisites. Installation of MCMS will be halted if these prerequisites are not met.

  • J# 2.0 redistributable: Elements of MCMS Site Manager require the J# redistributable.

  • Internet Explorer Web Controls for MCMS: Portions of the MCMS Web Author make use of the Internet Explorer Web Controls (IEWC), of which a specific MCMS distribution exists for which compilation is unnecessary. These controls, unlike the standard IEWC, are supported as part of an MCMS installation. As they are a prerequisite for MCMS, IEWC can be utilized within your applications. However, ASP.NET 2.0 offers far richer controls for navigation, as we will see later in this book.

J# 2.0 Redistributable

We need to install the Visual J# 2.0 Redistributable to enable the installation of the MCMS Site Manager.

  1. 1. Download and save the J# 2.0 installer from: http://www.microsoft.com/downloads/details.aspx?familyid=f72c74b3-ed0e-4af8-ae63-2f0e42501be1&displaylang=en

  2. 2. Double-click the installer.

  3. 3. On the Welcome to Microsoft Visual J# 2.0 Redistributable Package Setup page, click Next.

  4. 4. On the End User License Agreement page, check the I accept the terms of the License Agreement checkbox and click Install.

  5. 5. Wait while J# 2.0 installs, and when the Setup Complete page appears, click Finish.

Internet Explorer Web Controls for MCMS

Internet Explorer Web Controls (IEWC) are required by the MCMS Web Author.

  1. 1. Download and save the IEWC installer from: http://www.microsoft.com/downloads/details.aspx?FamilyID=FAC6350C-8AD6-4BCA-8860-8A6AE3F64448&displaylang=en.

  2. 2. Double-click the installer.

  3. 3. On the Welcome to the Microsoft Internet Explorer WebControls Setup Wizard page, click Next.

  4. 4. On the License Agreement page, select the I Agree radio button and click Next.

  5. 5. On the Confirm Installation page, click Next.

  6. 6. Wait while the web controls are installed, and when the Installation Complete page appears, click Close.

Installing MCMS 2002 SP1a

  1. 1. Insert the MCMS 2002 SP1a CD-ROM, and on the splash screen, click Install Components.

  2. 2. On the Customer Information page, enter your User Name and Organization along with your Product Key and click Next.

  3. 3. On the License Agreement page, click Accept.

  4. 4. On the Installation Options page, select the Custom radio button and click Next.

  5. 5. On the Custom Installation page, deselect the Site Stager item, and click Next.

  6. 6. On the Summary page, click Install.

  7. 7. Wait while MCMS 2002 SP1a is installed.

  8. 8. On the Installation Completed page, uncheck the Launch MCMS Database Configuration Application checkbox, and click Finish.

Remove Temporary Items

Now MCMS SP1a is installed, we can tidy up the temporary items we created earlier to trick the installer.

  1. 1. Select Start | Run…

  2. 2. In the Run dialog, type cmd and click OK.

  3. 3. Execute the following commands:

    cd c:\kb915190
    cscript VS2003ByPass.vbs c:\VSTemp remove
    
    
  4. 4. Use Windows Explorer to delete the folders c:\VSTemp and c:\kb915190.

Install Visual Studio 2005

  1. 1. Insert the Visual Studio 2005 DVD, and on the splash screen, click Install Visual Studio 2005.

  2. 2. On the Welcome to the Microsoft Visual Studio 2005 installation wizard page, click Next.

  3. 3. On the Start Page, select the I accept the terms of the License Agreement checkbox, enter your Product Key and Name, and click Next.

  4. 4. On the Options Page, select the Custom radio button, enter your desired Product install path, and click Next.

  5. 5. On the second Options Page, select the Visual C# and Visual Web Developer checkboxes within the Language Tools section, and the Tools checkbox within the .NET Framework SDK section. Ensure that all the other options are not selected and click Install.

    Note

    Feel free to install any additional features you may wish to use. The above selections are all that are required for following the examples in this book.

  6. 6. Wait (or take a coffee break) while Visual Studio 2005 is installed. When the Finish Page appears, click Finish.

  7. 7. From the Visual Studio 2005 Setup dialog, you can install the product documentation (MSDN Library) if desired, otherwise click Exit.

  8. 8. From the Visual Studio 2005 Setup dialog, click Check for Visual Studio Service Releases to install any updates that may be available.

  9. 9. Click Exit.

Install MCMS SP2

  1. 1. From the Start Menu, click Run…

  2. 2. In the Open textbox, enter IISRESET /STOP and click OK.

  3. 3. Wait while the IIS Services are stopped.

  4. 4. Double-click the SP2 installation package.

  5. 5. On the Welcome to Microsoft Content Management Server 2002 SP2 Installation Wizard page, click Next.

  6. 6. Select I accept the terms of this license agreement radio button, and click Next.

  7. 7. On The wizard is ready to begin the installation page, click Next.

  8. 8. Wait while Service Pack 2 is installed.

  9. 9. On The Installation Wizard has completed page, click Finish.

  10. 10. If prompted, click Yes on the dialog to restart your computer, which will complete the installation.

  11. 11. Otherwise, from the Start Menu, click Run…

  12. 12. In the Run textbox, enter IISRESET /START and click OK to restart the IIS services.

Note

Stopping IIS prior to the installation of SP2 avoids potential problems with replacing locked files during the installation, and can prevent the requirement to reboot.

Configuring the Development Environment

Before continuing, we need to look at a small number of additional steps required to configure the development environment.

Site Manager Shortcut

During the installation of SP2, the Site Manager Start-menu shortcut will be overwritten. To configure Site Manager to bypass the Connect To dialog, follow the steps here:

  1. 1. Select Start | All Programs | Microsoft Content Management Server.

  2. 2. Right-click the Site Manager shortcut and click Properties.

  3. 3. In the Target textbox, replace

  4. "C:\Program Files\Microsoft Content Management Server\Client\NRClient.exe" http:///NR/System/ClientUI/login.asp with"C:\Program Files\Microsoft Content Management Server\Client\NRClient.exe" http://localhost/NR/System/ClientUI/login.asp.

  5. 4. Click OK.

Visual Studio Templates

The installation of MCMS Service Pack 2 automatically registers the MCMS developer tools such as MCMS Template Explorer in Visual Studio 2005. However, before we can create MCMS applications with Visual Studio, we need to make the website and item templates available.

  1. 1. Select Start | All Programs | Microsoft Visual Studio 2005 | Visual Studio Tools | Visual Studio 2005 Command Prompt.

  2. 2. Execute the following commands, replacing MCMS_INSTALL_PATH with the installation location of MCMS (usually C:\Program Files\Microsoft Content Management Server) and PATH_TO_MY_DOCUMENTS_FOLDER with the location of your My Documents folder:

    xcopy "MCMS_INSTALL_PATH\DevTools\NewProjectWizards80\Visual Web Developer" "PATH_TO_MY_DOCUMENTS_FOLDER\Visual Studio 2005\ Templates\ProjectTemplates\Visual Web Developer" /E
    xcopy "MCMS_INSTALL_PATH\DevTools\NewItemWizards80\Visual Web Developer" "PATH_TO_MY_DOCUMENTS_FOLDER\Visual Studio 2005\ Templates\ItemTemplates\Visual Web Developer" /E
    
    
  3. 3. Execute the following command to register the templates with Visual Studio 2005:

    devenv /setup
    
    
  4. 4. Close the command prompt.

Note

It is not necessary at this stage to register ASP.NET as detailed in the Microsoft Installation Instructions (KB 906145). This registration was performed by the Visual Studio 2005 installer.

Additionally, it is unnecessary to configure IIS to use ASP.NET 2.0 using the Internet Information Services snap-in, as Visual Studio 2005 automatically sets this option on each MCMS website application created.

However, if you are installing on Windows Server 2003 SP1, you must configure the Virtual Website root and the MCMS Virtual Directory to use ASP.NET 2.0, as it is not possible to use two versions of ASP.NET within the same Application Pool.

Note

The ActiveX Toolbar control that supports the out-of-the-box Placeholder controls is updated with SP2. Therefore, you may be prompted to install this control when switching to edit mode for the first time.

You can pre-install the controls using regsvr32 or Group Policy as detailed at http://download.microsoft.com/download/4/2/5/4250f79a-c3a1-4003-9272-2404e92bb76a/MCMS+2002+-+(complete)+FAQ.htm#51C0CE4B-FC57-454C-BAAE-12C09421B57B.

Run the Database Configuration Application

At this stage, we are ready to configure MCMS.

  1. 1. Select Start | Programs | Microsoft Content Management Server | Database Configuration Application.

  2. 2. On the splash screen, click Next.

  3. 3. On the Choose the MCMS Content Server ASP compatibility mode page, select the ASP.NET Mode radio button and click Next.

  4. 4. On the Please select a virtual site for hosting the Microsoft Content Management Server page, select the Read/Write Site radio button, and click Next.

  5. 5. On the SCA Web Entry Point page, click Next.

  6. 6. When prompted about a security warning, click Yes (as there are no means to further secure the SCA on Windows XP).

    Note

    When Installing on Windows Server 2003 SP1

    Select the additional Virtual Website created earlier in the Installing Internet Information Services section as the SCA Web Entry Point.

  7. 7. On the MCMS System Account page, enter the account details as created in the Creating Service Accounts section earlier and click Next.

  8. 8. On the Grant right? dialog, click Yes.

  9. 9. On the Stop service? dialog, click Yes.

  10. 10. On the Select MCMS Database screen, click the Select Database button.

  11. 11. In the SQL Server Logon dialog, enter a period (.) in the Server textbox, and click Options. In the Database combo box, select TropicalGreen and click OK.

    Note

    A period (.) is the Netbios/RPC alias for the local machine. If the SQL Server Client libraries can determine that SQL Server is on the local machine, applications will use shared memory rather than a network protocol to access SQL Server when it is installed on the same machine as the application. This configuration can also be controlled using the SQL Client configuration utility.

  12. 12. On the Select MCMS Database page, click Next.

  13. 13. On the Empty Database dialog, click Yes.

  14. 14. On the Database Population page, click Next and wait while the MCMS Schema is installed.

  15. 15. On the Select Initial MCMS Administrator page, enter the account details for the currently logged-on user, and click Next.

  16. 16. Wait while the changes are committed, and on the MCMS Site Stager Access Configuration page, click Next.

  17. 17. On the DCA dialog, click Finish to launch the Server Configuration Application, and verify your settings.

  18. 18. Close the SCA.

This completes the configuration of MCMS.

Remove Visual Studio.NET 2003

If you intend to only develop with Visual Studio 2005, you can now remove Visual Studio.NET 2003 (if you installed it previously) as it is no longer required.

 

Known Issues with MCMS SP2 Installation


There are a few known issues related to the installation of MCMS SP2 for which hotfixes have been released.

  • DCA complains about missing privileges when selecting a database when SQL authentication is being used. A hotfix for this has been released and can be requested from Microsoft Support as KB 913400.

  • Developer tools for VS.NET 2003 disappear after installing MCMS 2002 Service Pack 2. A hotfix for this has been released and can be requested from Microsoft Support as KB 914195.

  • Developer Tools for VS.NET 2003 do not work with some regional settings. A hotfix for this has been released and can be requested from Microsoft Support as KB 914195.

In addition if you have performed a fresh installation of MCMS SP2 and wish to move an existing database to your new installation, you need to obtain the KB913401 hotfix and follow the steps detailed in the Prepare the MCMS Database for SQL Server 2005 section under our discussion on upgrading to MCMS 2002 Service Pack 2 towards the beginning of this chapter.

 

Installation Tips


The following section provides two tips for installations on different editions of Windows or across separate machines.

Installing MCMS SP2 on Windows Server 2003 X64 Edition

MCMS Service Pack 2 introduces support for 64-bit versions of Windows Server 2003. However MCMS requires IIS to be configured to run in 32-bit compatibility mode. This means that all IIS applications (not just MCMS ones) cannot take advantage of the additional addressable memory on the X64 platform. In order to install MCMS SP2 on this platform, the following extra steps are necessary:

  • ASP.NET 2.0 must be manually registered with IIS by executing the aspnet_regiis utility.

  • IIS must be configured to run in the 32-bit compatibility mode, using the following command from the c:\Inetpub\adminscripts folder:

cscript adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1

Installing the Required SQL Server 2005 Components

When making use of SQL Server on separate machine from the one running MCMS SP2, there is a prerequisite for SQLDMO, also known as SQL Server Client Tools, on the MCMS machine. This can be installed from your SQL Server 2005 distribution by:

  • Clicking the Advanced button on the Components to Install dialog.

  • Expanding the Client Components item.

  • Selecting the Legacy Components item.

 

Summary


We have completed either an upgrade to SP2 or a new installation. In addition, we have covered the necessary configuration steps to avoid common problems with MCMS installation, seen how to avoid installing Visual Studio.NET 2003, and some additional installation tips. We are now ready to explore the MCMS SP2 development environment.

About the Authors

  • Lim Mei Ying

    Lim Mei Ying has extensive experience in designing, implementing and supporting Blue Prism processes as well as setting up a Robotic Operating Model for the enterprise. She has spent many hours figuring out the dos and don'ts of Blue Prism technologies and thrives on the challenge of finding new ways to solve automation problems. Mei Ying lives on the sunny island of Singapore.

    Browse publications by this author
  • Spencer Harbar

    Spencer, a MCSD for Microsoft .NET, MCSE and MVP for MCMS, has over twelve years commercial experience of architecture, design, development, deployment and operational support of Web based applications and hosting platforms for some of Europe's largest organisations.

    Spencer maintains a MCMS resources portal, and is active in the public newsgroups. His experience of MCMS goes back to the days of NCompass Resolution and he has been involved in many enterprise implementations.

    Currently working as an independent consultant, Spencer delivers enterprise content management and portal systems architecture, design, development and deployment solutions, application security best practices, threat modeling and the implementation of highly available Windows Server System based hosting platforms.

    Product expertise includes MCMS, SharePoint Technologies, IIS, SQL Server, Commerce Server and BizTalk Server, Windows Security, PKI and High Availability.

    Selected clients include Barclays Bank, Scottish Power plc, HBOS, Microsoft, The Royal Bank of Scotland, Scottish Enterprise, Centrica, Clifford Chance, The Automobile Association and BASF

    Browse publications by this author
  • Stefan Goßner

    Stefan Goßner works for Microsoft as an Escalation Engineer in the Developer Support department. He provides customers with technical solutions to problems related to Microsoft Internet Server Products. Stefan has breadth and depth in all areas of MCMS.

    His contributions to the newsgroup have helped many people to implement MCMS solutions in corporations around the globe to the point where it has been said that if you don't know Stefan, then you're probably new to MCMS.

    Stefan maintains a huge MCMS 2002 FAQ on the Microsoft Website and provides MCMS tips and tricks on his personal blog: http://blogs.technet.com/stefan_gossner.

    He lives in Munich, Germany.

    Browse publications by this author

Latest Reviews

(1 reviews total)
That was not what I purchased. I bought a book about UML, not microsoft content server.
Enhancing Microsoft Content Management Server with ASP.NET 2.0
Unlock this book and the full library FREE for 7 days
Start now