About the Profiles Feature for Solution Sites

A profile is a set of characteristics that define a business-related entity. The Solution Sites use UserObject, Organization, and Address profiles. The UserObject profile contains personal information about the user, logon credentials, and catalog set information. For the Retail Solution Site, profiles are stored in a SQL Server database. For the Supplier Solution Site, an Active Directory store is also used. The storage locations are collectively referred to as the Profiles store.

The Solution Sites have a feature called Customer Services that allows registered users to view and modify their own profile. The Solution Sites can also expose a feature called Partner Services that allows delegated administrators of an organization to manage the profiles of members of their organization.

In the Retail site, all registered users have a profile. Whether anonymous users have profiles is optional; however, this feature is enabled by default. To disable anonymous user profiling, set the Site privacy options (i_SitePrivacyOptions) property to 2 (TRACK_GUEST_VISITS) in the App Default Config Site resource in Commerce Server Manager. This property is checked before creating any new anonymous profiles (GetNewGuestUserProfile).

The Supplier site only allows registered users, so each user and organization must have a profile. Typically, the site administrator creates the Organization profile and a UserObject profile for a delegated administrator through Commerce Server Business Desk. The delegated administrator then creates the profiles for members of the organization.

Web farm issues

In a Web farm scenario, each server provides a local profile cache. The value of the user's profile (UserObject profile) in a particular cache can become outdated if the profile was changed on a different server. In order for the server to recognize that the user's profile has changed, a last updated timestamp is set in both the user's profile (in the Profiles store) and in a cookie for the user, when the profile is created and updated (UpdateUserProfile).

When a user visits a server in the Web farm, the timestamp in the profile in the local cache is checked against the timestamp in the cookie (GetCurrentUserProfile). If they are not equal, the profile is retrieved from the Profiles store (using the GetInfo method of the IADs interface), bypassing the local cache. If cookies are not enabled, the cache is always bypassed, because there is no reliable way of tracking the last updated time due to Back button, page refresh, and other issues.

The lookup of Address profiles is cached. Organization profile lookups, however, bypass the cache on an as-needed basis depending on the likeliness of the data in the profile changing.

Even with the timestamp solution, there are potential cache coherency issues with the profiles. For instance, if a user's profile, which is currently cached, is changed from the Business or Partner Desk on a different computer by a different user, the sites will not know that the cache is out of date. To mitigate this, the Solution Sites call the GetInfo method upon login. If this level of accuracy is not acceptable, the Solution Sites include the m_iGlobalProfileLookUpOption variable, declared in the file include\setupenv.asp, which when set always forces a GetInfo method call to retrieve the profile from the Profiles store.

Initialization

Initialization for the profiling feature occurs in the following files:

include\global_data_lib.asp

The BusinessDataAdmin object is created, connected to the Profiles store, and returned by the oGetBizDataObject function defined in this file.

include\global_profile_lib.asp

The ProfileService object is created, initialized, and returned by the InitProfileService function in this file. To increase performance, all the properties of all the profile types are put into a global Dictionary object by the dictGetProfileSchemaForAllProfileTypes function. The properties are obtained by parsing the XML Data Reduced (XDR) schema for the profiles.

include\global_siteconfig_lib.asp

The IsActiveDirectoryPresent and sGetActiveDirectoryDefaultNamingContext functions in this file parse the XML Data Reduced (XDR) schema for the UserObject profile. The IsActiveDirectoryPresent function checks whether the ParentDN property is set on the profile to determine if Active Directory is used to store part of the profile. The Profiling System allows other means to signify that Active Directory is used. If using one of these alternatives, the Solution Sites need to be correspondingly modified. For more information, see "Managing Pre-existing Accounts in Active Directory Stores" in the Commerce Server Resource Kit. If Active Directory is used, the sGetActiveDirectoryDefaultNamingContext function retrieves the Active Directory domain name.

include\global_main_lib.asp

Whether the Profiling System uses Active Directory is given Application scope as a Boolean variable named MSCSProfileServiceUsesActiveDirectory. If the IsActiveDirectoryPresent function returns True, the Active Directory domain name is set to Application scope as MSCSActiveDirectoryDomain.

The Dictionary object containing all the profile properties is given Application scope as MSCSProfileProperties.

The InitProfileService function is called and the returned ProfileService object is given Application scope as MSCSProfileService.

include\std_profile_lib.asp

This file supplies routines to create a new profile, retrieve and update a current profile, check whether the user has a profile, and whether profiling is enabled on the site. This file also provides the Web farm support.

services\include\check_profile.asp

services\include\delete_profiles.asp

services\include\get_profiles.asp

services\include\profiles_common.asp

services\include\save_all_profiles.asp

services\include\save_one_profile.asp

These files provide common routines for use in Customer and Partner Services.

Browse Time

Users have direct interaction with the Profiling System through the following files:

addrbook.asp

This file allows users, depending on the user type and site options, to view and edit their address book (Address profiles).

newaddr.asp

This file allows users, depending on the user type and site options, to add a new address to their address book.

login\_guest.asp

This file allows a user to enter the site as an anonymous user and creates an associated anonymous profile.

login\newuser.asp

This file allows the user to register with the site. If the user has an anonymous profile, it is changed to a registered profile. If the user does not have an anonymous profile, a new registered profile is created.

services\customer\account.asp

This file allows registered users to view and change their own profile through Customer Services.

services\partner\account.asp

Using the Partner Services feature, this file allows users who are delegated administrators for their organization to view and modify the profile of their organization.

services\partner\users.asp

Using the Partner Services feature, this file provides a list of users who are members of an organization. Delegated administrators can select profiles to view, modify, or delete from this list, or create new member profiles.

services\partner\edit_user.asp

Using the Partner Services feature in the Supplier site, this file allows users who are delegated administrators for their organization to manage the profiles of members of their organization.

See Also

About the Address Management Feature for Solution Sites

Page-Level Access Control for Solution Sites

About the Login Feature for Solution Sites

About the User Tracking Feature for Solution Sites

About the Customer Service Feature for Solution Sites

About the Partner Service Feature for the Supplier Solution Site

Profiling System Objects

Copyright © 2005 Microsoft Corporation.
All rights reserved.