Enabling Membership on the Volcano Coffee Sample Site

August 1999

Microsoft Corporation

Introduction

The Volcano Coffee sample site is included in a typical installation of Microsoft® Site Server 3.0 Commerce Edition. The Volcano Coffee sample site represents a fictitious retailer of products for coffee lovers. It demonstrates features of Site Server 3.0 Commerce Edition and can also be used as the basis for a live production site.

The Volcano Coffee sample site is installed in the default Web site, and can be accessed from the following URL (host_name is the name of your server): http://host_name/vc30. For additional information about the Volcano Coffee sample site, see "Commerce Server Sample Sites" in the Site Server 3.0 Commerce Edition documentation. The sample script files are located in the \Reskit\code\membership\VC30 folder of the root Resource Kit directory after you download and install the Site Server 3.0 Commerce Edition Resource Kit.

Enabling Membership on the Volcano Coffee sample site demonstrates the integration with Membership for authentication of customers and also how to work with an unsecured directory service (DS). In a live production environment, you will probably want a secure site.

Before you begin the procedure described in this paper, you should know how to:

This paper describes how to:

Create a Copy of the Volcano Coffee Sample Site

The first procedure is to create a copy of the Volcano Coffee sample site.

To create a new Membership Server using the New Membership Server Wizard

  1. In MMC, select New Membership Server Wizard.

  2. Select Personalization and Membership, and then right-click the computer node to which you want to add the server.

  3. Click New.

  4. Click Membership Server Instance.

  5. Type microsoft as the Membership Directory Name.

  6. Type password for the administrator’s password.

  7. Accept the LDAP port specified by the wizard. In this example, the port number is 1004 and is hard-coded in the site’s \Manager folder. If you select a different port number, make sure that you replace 1004 with that number.

  8. Accept the defaults for other settings.

  9. Rename this Membership Server instance as VC Membership Server.

  10. Create and name a new folder (for example: C:\Whitepaper\Sites). If necessary, substitute the drive letter that contains your Site Server installation for C:\.

To create a new Web site using the MMC New Web Site Wizard

  1. Using MMC, select Internet Information Server, and then right-click the node of the computer to which you want to add the Web site.

  2. Click New.

  3. Click Web Site.

  4. Under Description, type Volcano Coffee (Membership).

  5. Set the HTTP port number to an unused port (for example, 5295).

  6. Set the home directory to the new folder you created earlier (C:\Whitepaper\Sites).

  7. Accept all other defaults.

To start the Web site

  1. Select Internet Information Server, and then open the node of the computer that contains the Web site.

  2. Right-click Volcano Coffee (Membership).

  3. Click Start.

To map this Web site to the VC Membership Server

  1. Select Internet Information Server, and then open the node of the computer that contains the Web site.

  2. Right-click Volcano Coffee (Membership).

  3. Click Task.

  4. Click Membership Server Mapping.

To create a new Commerce Store foundation using the Site Foundation Wizard

  1. Using MMC, select the Site Foundation Wizard.

  2. Select Commerce Host Administration, and then right-click the node of the computer to which you want to add the foundation.

  3. Click New.

  4. Click Commerce Site Foundation.

  5. Select the Volcano Coffee (Membership) Web site on which to create the foundation.

  6. Type administrator as the account name for accessing the Membership Directory.

  7. Type password as the account password.

  8. Type VC30_mem as the Short Name of the site and Volcano Coffee (Membership) as the Display Name.

  9. Select the same Data Source Name (DSN) as the DSN of the original Volcano Coffee sample site.

    Note   Once the foundation is created, do not run the Site Builder Wizard (clicking the link provided on the finish page invokes the SBW management pages).

To create a new group in the Membership directory service

  1. Using MMC, change the properties of the Membership Directory Manager to point to the LDAP port number specified earlier (1004).

  2. Right-click Membership Directory Manager.

  3. Click Properties.

  4. Click Logon Anonymously when prompted for authentication.

To create a new group using the New Group Wizard

  1. Open the New Group Wizard and right click ou=groups.

  2. Click New.

  3. Click group.

  4. Name the new group vcmem.

  5. Accept all other defaults.

To create a site manager member in the Membership Directory

  1. In the Membership Directory Manager, use the New User Wizard to create a new member and name it vcAdmin.

  2. Right-click ou=Members, click New, and then click User.

  3. Add the user password attribute for this member and set the password’s value to password.

  4. On the final page of the New User Wizard, add the user to the VC30_mem_# group (# is the Web site instance number of the Web site on which the VC30_mem site was created).

  5. Copy all files except config\site.csc and manager\config\site.csc, including subdirectories from the location of the original VC sample site under \inetpub\wwwroot\vc30. It is not necessary to copy the contents of the _vti_* directories. Overwrite the existing files named default.asp. Be sure to copy the global.asa file and ensure that the SiteName in global.asa is vc30.

    CAUTION   Do not copy the site.csc files. The new site will not function correctly if you copy the site.csc files.

  6. Change the site name by replacing SiteName = “vc30” with SiteName = “VC30_mem” in file C:\Whitepaper\Sites\VC30_mem\global.asa.

  7. Browse the sample site to ensure that everything works correctly. (http://host_name:5295/VC30_mem/default.asp)

Change the Registration Pages

You should have seven folders, named FolderA through FolderG, in the directory in which you extracted the downloaded file. You need to replace the files in the \VC30_mem folder with those in FolderA.

To replace the files in the \VC30_mem folder with those in FolderA

  1. Copy the xt_shopper_lookup.asp and welcome_new.asp files from FolderA to the \VC30_mem folder.

  2. Click Yes.

Now the sample site will use the Membership Directory as well as the vc30_shopper table to store shopper information. The registration page uses Membership Design-time Controls (DTCs).

Enable Membership Authentication

After you have made the necessary changes to the registration pages, you need to enable membership authentication.

To set Membership Authentication on the VC30_mem directory as HTML Forms Authentication

  1. Using MMC, select Internet Information Server, then open the node of the computer that contains the Web site.

  2. Expand the Volcano Coffee (Membership) Web site node, and then right-click the VC30_mem virtual directory node:
  3. On the following files, set the Membership authentication type to Allow anonymous: default.asp, xt_shopper_lookup.asp, and welcome_new.asp. Clear the HTML Forms Authentication option by selecting Other Password Authentication (with none of its check boxes being selected).

  4. On the \buynow folder, set the Membership Authentication type to Allow Anonymous. Clear the HTML Forms Authentication option by selecting Other Password Authentication (with none of its check boxes being selected).

  5. Rename welcome_lookup.asp to FormsLogin.asp.

  6. In the file FormsLogin.asp, modify the prompt for E-mail to prompt for User Name.

    On line 31 of FormsLogin.asp change this line:

    To start, enter your e-mail and password then click the "continue" button.
    

    To read as follows:

    To start, enter your User Name and password then click the "continue" button.
    

    On line 46 of FormsLogin.asp change this line:

    <TR><TD>E-Mail:</TD>
    

    To read as follows:

    <TR><TD>User Name:</TD>
    
  7. Set Membership Authentication type to Allow Anonymous.

To replace the file in the \VC30_mem folder with the one in FolderB

  1. Copy default.asp from FolderB to the \VC30_mem folder.

  2. Click Yes to replace the existing file.

To replace the file in the \VC30_mem\include folder with the one in FolderC

  1. Copy shop.asp from Folder C into the \VC30_mem\include folder.

  2. Click Yes to replace the existing file.

Membership authentication is now set on the files. The sample site is using the DS as well as the vc30_shopper table to store the shopper information.

Replace Additional Files and Test

The final procedure is to replace the additional files and test the project.

To replace files in the \VC30_mem folder with those in FolderD

  1. Change the name of FolderD_xt_shopper_lookup.asp to xt_shopper_lookup.asp.

  2. Copy xt_shopper_lookup.asp and xt_shopper_purchase.asp from FolderD to the \VC30_mem folder.

  3. Click Yes to replace the existing files.

To replace the file in the \VC30_mem\include folder with the one in FolderE

  1. Copy util.asp from FolderE to the \VC30_mem\include folder.

  2. Click Yes to replace the existing file.

To replace files in the \VC30_mem\manager folder with those in FolderF

  1. Copy shopper_list.asp, shopper_month.asp, shopper_day.asp, and shopper_view.asp from FolderF to the \VC30_mem\manager folder.

  2. Click Yes to replace the existing files.

To replace files in the \VC30_mem\manager\include folder with those in FolderG

  1. Copy List.asp and List_row.asp from FolderG to the \VC30_mem\manager\include folder.

  2. Click Yes to replace the existing files.

To set permissions on files in the VC30_mem directory to restrict access to content to registered users

  1. Using Windows Explorer, select all .asp files in the VC30_mem directory, except: default.asp, welcome_new.asp, FormsLogin.asp, xt_shopper_new.asp, xt_shopper_lookup.asp and global.asa.

  2. Remove permissions for Everyone on these files:
  3. Grant Read permissions for the Site_microsoft_vcmem group on these files:

    The VC copy sample site (VC30_mem) is now Membership-enabled. To test the sample site, browse http://host_name:5295/VC30_mem/default.asp.

Information in this document, including URL and other Internet web site references, is subject to change without notice.  The entire risk of the use or the results of the use of this resource kit remains with the user.  This resource kit is not supported and is provided as is without warranty of any kind, either express or implied.  The example companies, organizations, products, people and events depicted herein are fictitious.  No association with any real company, organization, product, person or event is intended or should be inferred.  Complying with all applicable copyright laws is the responsibility of the user.  Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document.  Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 1999-2000 Microsoft Corporation.  All rights reserved.

Microsoft, Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries/regions.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.