Post Migration Tasks for Migrated SharePoint Commerce Sites

This topic contains procedures required to perform post-site migration cleanup. In a farm deployment, you must edit configuration files manually on each node that are part of the farm.

This topic contains the following procedures:

  • Move Configuration from the Web.config File to ChannelConfiguration.config File

  • Set up the Authorization Stores

  • Update the Web.config File for the Default Zone

  • Update the ChannelConfiguration.config File

  • Update the Resource Files for the Web Parts

  • Recreate the Channel Configuration List (SharePoint 2010 and Commerce Server Template Pack for SharePoint Server 2010 Only)

  • Recreate the Channel Configuration List (SharePoint 2010 Default Site and Contemporary Site Only)

  • Modify the STS Web.config and Introduce Custom Membership Provider (SharePoint Only)

  • Rename the Sitemap Provider(SharePoint Contemporary Sites Only)

  • Update the Default Site CSS

  • Set the Timeout attribute for a Registered User

Move Configuration Section from the Web.config File to ChannelConfiguration.config File

Perform the following steps to copy a section of the Web.config and paste it into the ChannelConfiguration.config file.

Note

Perform the following procedure on the default zone and the extended zone of your site.

  1. Open Microsoft Windows Explorer and navigate to the virtual directory of the Default zone.

  2. Open the Web.config file and locate the <CommerceServer> section.

  3. Copy the entire <CommerceServer> section from the Web.config file.

  4. Open the ChannelConfiguration.config file and paste the content copied in the previous step, under the <Site> section.

  5. Edit the commented out sections as follows. Highlight the <CommerceServer> section and then find and replace for the following:

    1. Search for the string <!- - and replace with <!--

    2. Search for the string - -> replace with -->

    Note

    The difference is that the original string is being replaced by a string that contains no space.

  6. Remove the <CommerceServer> node and the corresponding end tag </CommerceServer>.

    Hh567731.alert_caution(en-us,CS.95).gifImportant Note:

    Do not remove the children of this node. Only remove the opening and closing tags <CommerceServer> and </CommerceServer>.

  7. Add the following highlighted attribute to <CommerceChannelConfiguration>: <CommerceChannelConfiguration xmlns="urn:schemas-microsoft-commerce-server-multichannel" version="9.0.0.0" useSharedCommerceContexts="false">

  8. Overwrite the Sites/Site/profiles/encryption element using the appropriate code snippet for you site as follows:

    • For the SharePoint Contemporary Site, use the following code snippet:

      <encryption keyIndex="1" 
      publicKey="registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server 2007 Keys\ContemporarySite,PublicKey"
      privateKey1="registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server 2007 Keys\ContemporarySite,PrivateKey"
      privateKey2="" />
      
    • For the SharePoint Default Site, use the following code snippet:

      <encryption keyIndex="1" 
      publicKey="registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server 2007 Keys\DefaultSite,PublicKey"
      privateKey1="registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server 2007 Keys\DefaultSite,PrivateKey"
      privateKey2="" />
      
Hh567731.alert_caution(en-us,CS.95).gifImportant Note:

You must perform this procedure on the internal and the external zone of your site.

Set up the Authorization Stores

Copy the authorization store files to the virtual directory of each zone.

  1. Open Microsoft Windows Explorer and navigate to the CommerceServer feature in the 14 hive. For example, C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\CommerceServer.

  2. Locate and then copy the following authorization store files:

    • CommerceEntityAuthorizationStore.xml

    • CatalogAuthorizationStore.xml

    • OrdersAuthorizationStore.xml

    • ProfilesAuthorizationStore.xml

  3. Paste the authorization store files in the appropriate location as follows:

    • For SharePoint Default zone, copy the files to C:\inetpub\wwwroot\wss\VirtualDirectories\[DefaultZonePort]

    • For SharePoint Internet zone,copy the files to C:\inetpub\wwwroot\wss\VirtualDirectories\[InternetZonePort]

  4. Using Authorization Manager (azman.msc), set the identity to be used as the administrator for each authorization store.

    1. Click Start->Run, type azman.msc, and click OK to open the Windows Authorization Manager (AzMan).

    2. In Authorization Manager, right-click the Authorization Manager element in the left pane, and select the Open Authorization Store option.

    3. Select XML file as the authorization store type.

    4. In the Store name box, specify the authorization store file for the Catalog Web service. Click Browse to navigate to the virtual directory of the business user zone CatalogAuthorizationStore.xml file (for example, C:\inetpub\wwwroot\wss\VirtualDirectories\<port>),then highlight the file and click Open File.

    5. Click OK. The Authorization Manager displays the specified authorization store in the left pane.

    6. In the left pane of the Authorization Manager, expand the CatalogAuthorizationStore.xml component and the CatalogandInventorySystem sub-component.

    7. Under CatalogAndInventorySystem, expand the Role Assignments folder.

    8. Right-click the Administrator role, and select the Assign Users and Groups > From Windows and Active Directory option.

    9. In the Select Users, Computers, or Groups dialog box, type the application user account you have configured to have access, and click OK. For the evaluation scenario, you can use the same account to run all the Commerce Server Web services.

    10. Repeat steps a. to i. for the OrdersAuthorizationStore.xml and the ProfilesAuthorizationStore.xml files, setting user accounts for the OrdersAdministrator and ProfileAdministrator roles respectively.

    11. Repeat steps b. to c. for the CommerceEntityAuthorizationStore.xml file.

    12. In the left pane of the Authorization Manager, expand the CommerceEntityAuthorizationStore.xml component and the CommerceFoundation sub-component.

    13. Under CommerceClaim, expand the Role Assignments folder.

    14. Right-click the CommerceQueryOperation role, and select the Assign Users and Groups > From Windows and Active Directory option.

    15. In the Select Users, Computers, or Groups dialog box, type the SharePoint STS Service identity, and then click OK. For the evaluation scenario, you can specify the account you created to run SharePoint 2010.

  5. Perform steps a. to k. for the equivalent authorization store files for the Internet zone of your site

  6. Close Authorization Manager.

Note

In a SharePoint 2010 deployment, perform an IIS reset after making changes to authorization stores in AzMan. The IIS reset forces user claims to refresh.

Note

Perform this procedure on both zones.

Update the ChannelConfiguration.config file

  1. Set the publicKey and privateKey for the CreditCardEncryptionConfiguration node. Refer to Sites/Site/profiles/encryption” for the information.

  2. Set the full path for OrderPipelineMappings.xml and OrderObjectMappings.xml see the following example:

    <MappingFiles PipelineMappingFilename="C:\inetpub\wwwroot\wss\VirtualDirectories\[Default/Internet Zone]\OrderPipelineMappings.xml" 
    StorageMappingFilename="C:\inetpub\wwwroot\wss\VirtualDirectories\[Default/Internet Zone]\OrderObjectMappings.xml" />
    
  3. Repeat for all zones.

Update the Web.config file for the Default Zone

If your Web application default zone is using a host header, add the following code to the Web.config file.

  1. Open the Web.config file and locate the following section: /configuration/system.ServiceModel/serviceHostingEnvironment

  2. Add the following code snippet:

    <baseAddressPrefixFilters>
       <add prefix="http://hostHeaderName:port/" />
    </baseAddressPrefixFilters>
    

Update the Resource Files for the Web Parts

  1. Restart the SharePoint 2010 Timer service.

  2. Launch Central Admin.

  3. Click Application Management.

  4. Select your web application.

  5. Click Manage Features.

  6. Click Deactivate, then Activate to reactivate the feature Commerce Server WebPart Resources.

Recreate the Channel Configuration List (SharePoint 2010 and Commerce Server Template Pack for SharePoint Server 2010 Only)

  1. Go directly to Settings Page by typing in the following URL http://machinename:port/_layouts/settings.aspx.

  2. Click Site Administration->Site Libraries and Lists.

  3. Click Customize Channel Configuration.

  4. Delete the list by clicking under Permissions and Management-> Delete this list.

  5. Modify site settings. For SharePoint Server 2010, click Site Settings ->Site Actions->Manage Site Features.

  6. Reactivate the feature Commerce Server Channel Configuration.

  7. Navigate back to the Channel Configuration list and set your catalog and channel.

Recreate the Channel Configuration List (SharePoint 2010 Default Site and Contemporary Site Only)

  1. Go to Settings Page , enter http://machinename:<port of default zone>/_layouts/settings.aspx.

  2. View Site Content:

    • For SharePoint Server 2010, click Site Actions > View All Site Content.

    • For SharePoint Foundation 2010, click Site Settings->Site Permissions.

  3. Open the channel configuration list:

    • For SharePoint Server 2010, click Channel Configuration List.

    • For SharePoint Foundation 2010, click Lists->Channel Config.

  4. Click the Settings drop down and select List Settings.

  5. Delete the list by clicking Permissions and Management-> Delete this list.

  6. Modify site settings:

    • For SharePoint Server 2010, click Site Actions -> Site Settings -> Modify All Site Settings, and then click Manage site features under Site Actions.

    • For SharePoint Foundation 2010, click Site Actions->Settings 

  7. Reactivate the feature Commerce Server Channel Configuration.

  8. Navigate back to the Channel Configuration list and set your catalog and channel.

Modify the STS Web.config and Introduce Custom Membership Provider

  1. Open up the web.config of the STS from the following directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\SecurityToken.

  2. Add a new <configSections> under <configuration>. This must be the first child under the configuration node. Make sure to replace all instances of [WebAppGuid] with the yours.

    <configSections>
      <sectionGroup name="microsoft.commerce">
      <sectionGroup name="client">
      <section name="CommerceOperationServices" type="Microsoft.Commerce.Configuration.CommerceOperationServiceConfiguration, Microsoft.Commerce, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </sectionGroup>
      </sectionGroup>
    </configSections>
    
  3. Add the <microsoft.commerce> section under <configuration>

    <microsoft.commerce>
       <client>
         <CommerceOperationServices>
           <CommerceOperationService name="IOperationService_[WebAppGuid]_Default" mode="Service" clientEndpointName="Foundation_[WebAppGuid]_Default" />
           <CommerceOperationService name="IOperationService_[WebAppGuid]_Internet" mode="Service" clientEndpointName="Foundation_[WebAppGuid]_Internet" />
         </CommerceOperationServices>
       </client>
    </microsoft.commerce>
    
  4. Add a new endpoint behavior under configuration/system.serviceModel/behaviors/

    <endpointBehaviors>
              <behavior name="ImpersonationBehavior">
                <clientCredentials>
                  <windows allowedImpersonationLevel="Impersonation" />
                </clientCredentials>
              </behavior>
    </endpointBehaviors>
    
  5. Add the client endpoints under configuration/system.serviceModel.

    Replace [PortOfDefaultZone] and [PortOfInternetZone] with the actual ports of each zone.

    <client>
          <endpoint name="Foundation_[WebAppGuid]_Default" address="https://localhost:[PortOfDefaultZone]/Foundation/foundationservice.svc" binding="wsHttpBinding" 
    bindingConfiguration=”wsHttp”
    contract="Microsoft.Commerce.IOperationService"/>
          <endpoint name="Foundation_[WebAppGuid]_Internet" address="https://localhost:[PortOfInternetZone]/Foundation/foundationservice.svc" binding="wsHttpBinding"
    bindingConfiguration=”wsHttp”
    contract="Microsoft.Commerce.IOperationService" />
    </client>
    
  6. Add membership providers and role manager configurations. Use the appropriate code snippet for your application.

    For Commerce Server 2009 Default and Contemporary Sites, use the following code snippet:

    <system.web>
        <membership>
          <providers>
            <add name="CS_[WebAppGUID]_Default" type="Microsoft.Commerce.Portal.Common.CommerceSharePointMembershipProvider, Microsoft.Commerce.Portal.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" enablePasswordReset="true" requiresQuestionAndAnswer="true" membershipUserModelName="UserProfile" logonNameProperty="Email" operationServiceName="IOperationService_[WebAppGUID]_Default" passwordLockoutPeriod="5" passwordFormat="Hashed" PasswordStrengthRegularExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,50}$" requiresApproval="false" />
            <add name="CS_[WebAppGUID]_Internet" type="Microsoft.Commerce.Portal.Common.CommerceSharePointMembershipProvider, Microsoft.Commerce.Portal.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" enablePasswordReset="true" requiresQuestionAndAnswer="true" membershipUserModelName="UserProfile" logonNameProperty="Email" operationServiceName="IOperationService_[WebAppGUID]_Internet" passwordLockoutPeriod="5" passwordFormat="Hashed" PasswordStrengthRegularExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,50}$" requiresApproval="false" />
          </providers>
        </membership>
        <roleManager>
          <providers>
            <add name="SingleRoleProvider" applicationName="/" type="Microsoft.Commerce.Portal.Common.SingleRoleProvider, Microsoft.Commerce.Portal.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" role="SignedInClient" />
          </providers>
        </roleManager>
    </system.web>
    

    For Commerce Server 2009 Template Pack for SharePoint 2010 sites, use the following code snipped to modify the membership providers under the “configuration" section.

    <system.web>
        <membership>
          <providers>
            <add name="CS_[WebAppGUID]_Default" type="Microsoft.Commerce.Portal.Common.CommerceSharePointMembershipProvider, Microsoft.Commerce.Portal.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" enablePasswordReset="true" requiresQuestionAndAnswer="true" membershipUserModelName="UserProfile" logonNameProperty="Email" operationServiceName="IOperationService_[WebAppGUID]_Default" passwordLockoutPeriod="5" passwordFormat="Hashed" PasswordStrengthRegularExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,50}$" requiresApproval="false" />
            <add name="CS_[WebAppGUID]_Internet" type="Microsoft.Commerce.Portal.Common.CommerceSharePointMembershipProvider, Microsoft.Commerce.Portal.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" enablePasswordReset="true" requiresQuestionAndAnswer="true" membershipUserModelName="UserProfile" logonNameProperty="Email" operationServiceName="IOperationService_[WebAppGUID]_Internet" passwordLockoutPeriod="5" passwordFormat="Hashed" PasswordStrengthRegularExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,50}$" requiresApproval="false" />
          </providers>
        </membership>
    </system.web>
    
  7. Add a new binding configuration under configuration/system.serviceModel/bindings

    <wsHttpBinding>
            <binding closeTimeout="00:20:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxReceivedMessageSize="1048576" name="wsHttp">
              <readerQuotas maxDepth="100" maxBytesPerRead="65535" />
            </binding>
    </wsHttpBinding>
    

Rename the Sitemap Provider (SharePoint Contemporary Sites Only)

  1. Navigate to the virtual directory of the Default zone (eg: C:\inetpub\wwwroot\wss\VirtualDirectories\<Port>)

  2. Contemporary sites, rename the file CommerceMyAccount.sitemap to MyAccountLeftNavigation.sitemap.

  3. Repeat this procedure for all other zones.

Update the Default Site CSS

  1. Navigate to the shoppers site (Business User zone) as site admin.

  2. Click on Site Actions then select Edit in SharePoint Designer

  3. Click on Style Library

  4. Checkout file defaultSite.css

  5. Edit the defaultSite.css file: add the following styles:

#SearchPagingDiv li
{
float: left;
padding: 0 10px 0 0;
line-height: 25px;
height: 25px;
}
#SearchPagingDiv ul
{
list-style: none;
margin: 0 0 0 0;
padding: 0 0 0 0;
}
  1. Save and check in the file.

  2. Publish the file.

Set the Timeout attribute for a Registered User

The default timeout on the FBA zone is set to 15 minutes. To change it, perform the following steps:

  1. Open the Web.config file for the FBA zone:

  2. Navigate to the Microsoft.Commerce/Presentation/CommerceUserRecognition/RegisteredUser element

  3. Add the attribute timeout to the tag, and set it to 15

  4. Save the file.