Troubleshoot
We have a base catalog with products reaching to fifty thousand. For each country we have created a virtual catalog and to achieve better query performance, we have materialized the virtual catalogs. Means base catalog data is replicated to virtual catalog and the data is directly fetched from physical disk. Frequently we are getting data from business (as incremental or FULL). Everything was working fine till we encounter a problem in production. First of all the rebuild process is taking hours to complete and the second thing is that the virtual catalog rebuild hangs after sometime.
These types of issues will come when we have materialized virtual catalogs . Virtual catalog rebuild failure on Production server is due to deadlock in the Catalog database. The deadlocks are caused due to catalog updates (either add/delete/update product ) during the virtual catalogs rebuild processing. The common point in the deadlock is the CatalogGlobal table held by the Virtual Catalog rebuild process while other process need to set virtual catalog dirty Flag and that only happens when a virtual catalog is set to materialized. This can be a reason for such issues coming in materialized virtual catalog rebuild failure but not in normal virtual catalog rebuild.
Resolution:
- The best one of course is to restrict catalog editing on Production, and all changes go through Staging service.
- Whenever we are running rebuild process , make sure we stop catalog web service for the business user to modify the data. This way no interruption in Virtual rebuild process so no deadlock will be. (and also make sure only one import process executes at a given point of time).
- Change the materialized virtual catalogs to normal virtual catalogs.
There is a nice article in MSDN blogs which explains when to use normal virtual catalog and materialized virtual catalogs. My recommendation is go with virtual catalog and if you see any performance hit (query taking more time) then try to make that particular virtual catalog as materialize, instead of blindly making all virtual catalogs to materialized.
If you like this post, please click on our sponsor advertisement.
In SharePoint 2010, some times when you try to install commerce server site using SharePoint Commerce services configuration wizard, you may encounter below exception.
|
An unexpected error has occurred. Error message is: The process cannot access the file ‘C:\Users\ravik\AppData\Local\Temp\Microsoft.Commerce.Portal.Common.dll’ because it is being used by another process. |
This issue we may encounter when the new WSP are in non deployed state , where as the old WSP still exist in SharePoint Solution management. Follow below steps to remove old WSP from SharePoint Solution management.
- Open SharePoint Central Administration website.
- Click on the System Settings from the left pane.
- From the right hand side, click on Manager farm solutions link.

- You will see two old WSP in solution management. Click on the WSP and remove them.

Now your SharePoint Commerce Services utility will get executed without throwing the above exception.
If you like this post, please click on our sponsor advertisement.
Recently we have rolled out our code bits and catalog changes in staging environment and the day came to push them to production. Staging server continuously failing with the below exception.
| Failed to import business data for ‘Catalog’ resource for project ‘StagingProject’ : Microsoft.CommerceServer.Staging.StagingSubsystemException: CatalogImport failed. See log for details.4100:The category Boots defined as a parent category in the catalog Products does not exist in the catalog. You should create the category before using it as a parent category.at Microsoft.CommerceServer.Staging.CatalogHandler.Import(String project, BusinessData businessData, String projectLocation, String destinationSite) at Microsoft.CommerceServer.Staging.BusinessDataStagingEngine.ImportBusinessData(String projectName, String projectLocation)….. |
With the error description, I felt that the import process is not able to create the categories. So, I manually created the categories in production and tried to execute the staging process but still I am getting the same exception (even though I have the category “Boots” exist in production commerce server).
So, after some analysis, I figured out that there is a bug in commerce server which is triggering this error.Consider the following scenario
- In a catalog, you create a new category.
- You add a previously created category as a child category of the new category.
- You export the catalog to an XML file.
- You try to import the virtual catalog in the XML file into a catalog database.
The root cause for this exception is that, when you export a catalog or virtual catalog to an XML file, the sequence of XML nodes is ordered according to the times that the categories were created. Therefore, the earliest categories are displayed at the beginning of the XML file. If there is parent-child association defined in the catalog, the name of the parent category is specified in the ParentCategory element in the definition section of the child category.
This issue occurs because the definition of the child category appears before the definition of the parent category in the XML file. Therefore, the name of the parent category is referred to before the parent category is defined. Because of this, the name of the parent category which causes the import operation to fail.
Microsoft has also confirmed about this defect and released KB 970717. If you face similar issue, please reach out to CS support team and they can provide you the fix. Mostly this will be included in coming service packs.
As per the KB article – “Install the CommerceServer2007SP3-KB970717-ENU.exe file to update the Catalogcreate.sql file for Commerce Server 2009. This makes sure that this issue does not occur for new catalog databases.” This means that the error will not repeat on the new catalog databases but will persist in old catalog databases. To overcome this problem we ran staging with “full replication” option which makes the source and the destination data same. Now if we try to add new categories (as shown below), the same problem will not repeat.
Installation steps:
- Extract the KB 970717 from http://hotfix or can refer to the attachment.
- Execute the SQL Script (KB970717.sql) in Highlander_productcatalog in source server.
- Execute the hotfix (CommerceServer2007SP3-KB970717-ENU.exe) in source server.
- Perform IISReset
- Repeat step 2 – step 4 in all destination servers.
- Right click on staging project, change the catalog replication mode FULL. Kindly execute the projects so that full data moves from staging to production.
- Later change the project setting back to Incremental replication.
If you like this post, please click on our sponsor advertisement.
Last night, I was doing some R&D on commerce server business applications. I was able to debug the code with VS2010. I resumed my work today morning but when I try to debug the code, I am getting two exceptions.
An application configuration error has been detected. Go to “Add or Remove Programs” to reinstall or repair Microsoft Commerce Server Business User Applications.
Your preferences file (C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CustomerAndOrdersManager._Url_ee5krotviage2q2gxoaofroebs0x2hui\6.0.1.0\user.config) appears to have become corrupt. In order to recover, all of your preferences have been reset.
What I have done that made my code behave like this? I try to change the version number but still get the same exception. I navigated to “C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\CustomerAndOrdersManager._Url_ee5krotviage2q2gxoaofroebs0x2hui\6.0.1.0” folder and checked that one file exist (with named – user.config.bad). I restarted my virtual machine to try my luck but no success.
When I recall the change I have performed, only one new configuration element is added to the app.config file of Customer and order manager project. On observing closely, I figured out that the configuration setting is wrong (instead of value attribute, I have used Value attribute). I corrected the configuration mistake (changed the Value attribute to value) and rename the user.config.bad to user.config. Now I am able to debug my code.
If you like this post, please click on our sponsor advertisement.
I am currently working on SharePoint commerce web application (SPS 2007 & CS2009). We are using live (RPS 5.5 passport) authentication. the application is live and working fine without any issues. Last week, security team has scanned our application and provided a high priority recommendation that the application should enforcing a 30 minute session timeout. This should occur on the authenticated portions of the application that are accessible via the Internet or the pages where it collect PII from Customers. I.e. after 30 minutes (or less) period of inactivity, we should force the user to log in again before allowing further user actions such as profile edits, etc.
I binged and goggled simultaneously for the resolution but no results found. Reached out to communities but not response received. I played with PostTiketTimeWindow property value in RPSServer.xml and also tried to manipulate my code to achieve this feature. Finally I am able to achieve this feature with a configuration change. I have used one of the existing OOB policy names listed below and as per your requirement, you can modify timeout values.
Authentication Policy Definitions
| Policy name | TimeWindow | ForceSignIn | AuthMethod | TicketType | Business-impact rating |
| HBI | 5 minutes | True | 10 | Compact | HBI |
| HBI_60SECTEST | 60 seconds | True | 10 | Compact | HBI |
| HBI_KEY | 5 minutes | True | 10 | Compact | HBI |
| HBI_KEY_60SECTEST | 60 seconds | True | 10 | Compact | HBI |
| HBI_MOBILE | 5 minutes | True | 10 | Compact | HBI |
| HBI_STRONGPWD | 5 minutes | True | 140 | Compact | HBI |
| HBI_STRONGPWDEXPIRY | 5 minutes | True | 150 | Compact | HBI |
| LBI | 24 hours | False | 0 | Compact | LBI |
| LBI_60SECTEST | 60 seconds | False | 0 | Compact | LBI |
| LBI_KEY | 24 hours | False | 0 | Compact | LBI |
| LBI_KEY_60SECTEST | 60 seconds | False | 0 | Compact | LBI |
| LBI_MOBILE | 24 hours | False | 0 | Compact | LBI |
| LBI_SSL | 24 hours | False | 10 | Compact | LBI |
| MBI | 8 hours | False | 0 | Compact | MBI |
| MBI_60SECTEST | 60 seconds | False | 0 | Compact | MBI |
| MBI_KEY | 8 hours | False | 0 | Compact | MBI |
| MBI_KEY_60SECTEST | 60 seconds | False | 0 | Compact | MBI |
| MBI_MOBILE | 8 hours | False | 0 | Compact | MBI |
| MBI_SSL | 24 hours | False | 10 | Compact | MBI |
| MBI_FED_SSL | 24 hours | False | 10 | AD FS | MBI |
| SAPI | 20 minutes | True | 10 | Compact | HBI |
| SAPI_LONG | 8 hours | True | 10 | Compact | MBI |
Any help related to RPS can be found in windows live ID server SDK CHM file and you can be downloaded it from below link.
If you like this post, please click on our sponsor advertisement.
