Post Migration Tasks for Migrated ASP.NET Commerce Sites

This topic contains the procedures that you perform on your ASP.NET site after migration. In a farm deployment, you must manually edit the configuration files on all servers that are part of the server farm.

This topic contains the following procedures:

  • Moving Configuration Sections from the Web.config File to the ChannelConfiguration.config File

  • Setting up Authorization Stores

  • Set the Timeout attribute for a Registered User

Moving Configuration Sections from the Web.config File to the ChannelConfiguration.config File

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

  1. Open Windows Explorer and navigate to the virtual directory of your ASP.NET Web site.

  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 previously copied in the <Site> section.

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

    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>.

    Hh567797.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 of the ASP.NET site with the following snippet

    <encryption keyIndex="1" 
    publicKey="registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CommerceServer\9.0 Keys\YourCSSiteNameHere,PublicKey"
    privateKey1="registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CommerceServer\9.0 Keys\YourCSSiteNameHere,PrivateKey"
    privateKey2="" />
    

Setting up the Authorization Stores

Perform this procedure to copy the authorization stores provided by Commerce Server 2009 R2 to into the appropriate location for each zone.

  1. Navigate to C:\Program Files (x86)\Microsoft Commerce Server 9.0\Extensibility Kits\Foundation\Authorization Policies.

  2. Locate the following files authorization store files and then copy and paste them to C:\inetpub\wwwroot\<YourSiteName>:

    • CommerceEntityAuthorizationStore.xml

    • CatalogAuthorizationStore.xml

    • OrdersAuthorizationStore.xml

    • ProfilesAuthorizationStore.xml

  3. 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.

  4. Close Authorization Manager.

Note

Perform this procedure on both zones.

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.