Upgrading from CS 2007 Beta 1 to RC 1

In this post I shall attempt to highlight the steps required to get a basic StarterSite Beta running on Beta 1 of Commerce Server 2007 (2006 back then) running on the just released Release Candidate of Commerce Server 2007.

 

I’ll assume that you have a StarterSite Beta unpupped and running on a CS 2007 Beta. I’ll also assume that you have the web services unpacked and added as applications to the StarterSite (to allow you to run the UIs against this site).

 

Then the errors you are likely to hit and the steps to fix these errors are as follows:

  • Uninstall Beta – This would entail doing the following:

  - Uninstall Business UIs

  - Uninstall LOB Adapters for Commerce Server

  - Uninstall Commerce Server

  - Uninstall Client Tools if still present and showing in Add Remove Programs

  • Install Release Candidate
  • Browse to your site. You will likely get the following error message:

“Application is not compatible with '6.0' version of 'Transactions' resource. Expected resource version is '7.0'.”

This is because you need to run the migration tool / upgrade wizard (used interchangeably) to upgrade the site resource versions etc. and migrate the data in the various resource databases (such as Transaction, TransactionConfig, Marketing etc.)

  • Run the migration tool from All Programs à Microsoft Commerce Server 2007 à Tools à Upgrade Wizard, or by directly launching the exe from “%Commerce_Server_Root%\Upgrade\Upgrade\CS2007Upgrade.exe".
  • Upgrade all the site resources and global resources listed by the wizard for your site above.
  • Do an IISReset or recycle the IIS Application Pool (much faster than an IISReset) and browse to your site again.
  • Now you will likely hit the following error:

“Column CreditCardPayments.PaymentMethodName referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema.”

 

The reason for this is changes to the Orders schema between Beta and RC for this property Name precision (along with other changes such as the dropping of certain columns such as CreditCardNumber and Pin from payment related tables) and the migration tool puts out the following warning which you likely ignored (and did not save to a text file for later) and which states what needs to be done:

Transactions

Warning: Please read following information carefully.

            This migration tool does not migrate this version of transaction resource completely.

            After running migration tool Compare the OrderObjectMappings.Xml from the site VROOT and the one installed under %COMMERCE_SERVER_ROOT%\SDK\Samples\SiteCreate\OrderObjectMappings.Xml and merge the changes.

            Then regenerate the PurchaseOrder related stored procedure definitions using the OrderMapping.exe tool with orders configuration section in web.config pointing to updated OrderObjectMappings.xml

            Run the generated sql script file on the transaction database.

 

In the plain vanilla case, if you do not have an extended Order system then you can simply copy over the OrderObjectMappings.xml and OrderPipelineMappings.xml files from the following location into the VDIR of your web app and the OrdersWebService corresponding to your web site: %Commerce_Server_Root%\Sdk\Samples\SiteCreate. This should fix the above error and any other mapping related errors which you are likely to hit.

            Incase you have an extended Order system you will need to follow the more involved steps of regenerating the PurchaseOrder stored procedures (using OrderMapping.exe) and updating their definitions in the database.

  • Do an IISReset or recycle the IIS Application Pool and browse to your site again.
  • Your site should now be up and running without any errors.

So what about the web services etc. and what about the business UIs? Well you will need to update the Orders mapping files above in the Orders web service VDIR as well (in addition to your site VDIR) and then you should be able to bring up any of the UIs as well.

 

Another option you have with the web services is to remove the older web services from the Commerce Site using Commerce Server Manager and then add the newer RC version of the web services by adding applications to the existing Commerce site by pointing it to the CSharp.pup from the RC install. This way you get the newer web services with the updated web.config files (with more secure Authorization sections for the cache refresh – see the online readme for details) and the updated mapping files etc.

 

Most of these steps also apply if you take the StarterSite Beta and unpack it on the RC of CS 2007 since the resources will all be outdates and you will need to run the migration tool as above to get them updated.

 

By the way, one thing to note is that the version of the Commerce .Net assemblies themselves has not changed, so you do not need to update the web.config references etc. at all.