How to create Commerce 2009 R2 SubSystems web services

Following are the steps help you to create Commerce subsystems web services like Catalog, Marketing, Order and Profile.

Step 1: Go to and select All Programs -> Commerce Server 2009 -> Tools -> Site Packager.

Step 2: Select option “Unpack from a package file”

Step 3: Browse to *.pup file and select Custom Unpack

Step 4: Select option “Add an application to an existing site”

Step 5: Select existing Commerce site for which you want to create web services

Step 6: Select web services you want to create

Step 7: Configure IIS, web site and virtual path for web services

Step 8: On Next click, web services unpacking will start. It may take a while to complete.

Step 9: Last you will see message Unpacking is Complete!!!

Check gallery for visuals.

Advertisements

Bug in Commerce Server Catalog procedure ctlg_GetFTSQuery

I was facing below issue with Commerce Catalog search and while debugging i found that it’s a bug in ctlg_GetFTSQuery procedure. To fix this issue i modifed

IF @IsVirtualCatalog = 1 or  @SQLClause < 1

to

IF @IsVirtualCatalog = 1 or Len( @SQLClause) < 1

    Inner Exception
    ---------------
    Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Conversion failed when converting the nvarchar value '[DefinitionName] = 'PartNumberProduct' AND ([IsVisible] = 1 )' to data type int.
    Source : .Net SqlClient Data Provider
    Help link : 
    Errors : System.Data.SqlClient.SqlErrorCollection
    Class : 16
    LineNumber : 29
    Number : 245
    Procedure : ctlg_GetFTSQuery
    Server : 
    State : 1

Unspecified error when try to open commerce order web service

While setting up my commerce web services, i ran into this issue when tried to open order web service.

“System.Runtime.InteropServices.COMException (0x80004005): Unspecified error   at Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass.Initialize(String sConfigStore, String sCatalog   at Microsoft.CommerceServer.Runtime.Profiles.ProfileContext..ctor(String profileServiceConnectionString, String providerConnectionString, String bdaoConnectionString, DebugContext debugContext)”

After so much of googling i found that problem is with the connection strings for the profiles resource on the site. I did following steps to fix this issue:

Step 1: Open Commerce Server Manager

Step 2: Expand CommerceServerManager–>Global Resources–>Profiles(Your Site)–>Profile Catalog–>Data Sources

Step 3: Correct the connection string for each data source

Resource file error on accessing SharePoint pages having commerce WebParts

Sometime we get following error when try to access SharePoint pages containing commerce WebParts. This happen due to missing resource file referred by commerce WebPart in SharePoint page. I followed below two steps to fix this issue:

Step 1: Check commerce server feature and commerce server WebPart resources feature are active on web application.

Step 2: Copy the App_GlobalResources file from working commerce application and paste it in your new commerce application.

Server Error in ‘/’ Application.


Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure “Resources.SearchResources.resources” was correctly embedded or linked into assembly “App_GlobalResources.6iidicff” at compile time, or that all the satellite assemblies required are loadable and fully signed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure “Resources.SearchResources.resources” was correctly embedded or linked into assembly “App_GlobalResources.6iidicff” at compile time, or that all the satellite assemblies required are loadable and fully signed.

Source Error:

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

 

[MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Resources.SearchResources.resources" was correctly embedded or linked into assembly "App_GlobalResources.6iidicff" at compile time, or that all the satellite assemblies required are loadable and fully signed.]
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +7680590
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +583
   System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) +583
   System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream) +47
   System.Resources.ResourceManager.GetObject(String name, CultureInfo culture) +11
   System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture) +80
   System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName) +21
   System.Web.Compilation.ResourceExpressionBuilder.GetGlobalResourceObject(String classKey, String resourceKey, Type objType, String propName, CultureInfo culture) +28
   System.Web.HttpContext.GetGlobalResourceObject(String classKey, String resourceKey, CultureInfo culture) +12

CS 2009 issue – An item with the same key has already been added.

I ran into this issue while setting up CS 2009 on my local box. Funny thing is, this issue is fixed just by reactivating Commerce Server feature. I think recreate the channel configuration list and refresh the dictionary which add default channel name.

Event Type:    Error
Event Source:    SharePoint Commerce Services Exceptions
Event Category:    None
Event ID:    0
Date:        7/20/2011
Time:        6:41:36 PM
User:        N/A
Computer:    
Description:
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
07/20/2011 18:41:36
Type : System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : An item with the same key has already been added.
Source : mscorlib
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ThrowArgumentException(System.ExceptionResource)
Stack Trace :    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.Commerce.Application.Common.Configuration.ServiceConfiguration.CreateDictionary(String channelName)
   at Microsoft.Commerce.Application.Common.Configuration.ServiceConfiguration.GetSiteName(String channel)
   at Microsoft.Commerce.Broker.OperationService.InitializeOperationContext(CommerceRequest request)
   at Microsoft.Commerce.Broker.OperationService.ProcessRequest(CommerceRequest request)

Additional Info:

MachineName :
TimeStamp : 7/20/2011 1:11:36 PM
FullName : Microsoft.Commerce.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName :
ThreadIdentity :
WindowsIdentity : ServerName\Administrator

Install and setup IIS 7.0 for Commerce Server

Install IIS 7.0 (Web Server role).a.   Open the Server Manager. Click Start, point to Administrative Tools, and select Server Manager.

b.   Click Roles in the left tree view pane.

c.   On the Roles Summary page, click Add Roles.

d.   On the Select Server Roles page, select Web Server (IIS) and click Next.

e.   On the Select Role Services page, select the following role services and click Next.

In this role service category … Select these services
Common HTTP Features Static ContentDefault DocumentDirectory BrowsingHTTP Errors
Application Development ASP.NET.NET ExtensibilityASPISAPI Extensions

ISAPI Filters

Health and Diagnostics HTTP LoggingRequest Monitor
Security Basic AuthenticationWindows AuthenticationDigest AuthenticationRequest Filtering
Performance Static Content Compression
Management Tools IIS Management ConsoleIIS Management Scripts and ToolsManagement ServiceIIS 6 Management Compatibility

Note

If you do not have the IIS 6 Management Compatibility role enabled, setup fails (with and IIS admin privileges error).

Microsoft Commerce Server 2009 R2 RC Installation Guide

Welcome to Microsoft Commerce Server 2009 R2 RC installation walk through.
System Requirements
RAM – 4GB for developers
– 8GB for production use
Storage – NTFS file system-formatted partition with a minimum of 3 GB of free space
Operating System – Microsoft Windows Server 2008 with Service Pack 2, 64bit
– Microsoft Windows Server 2008 R2, 64-bit (Recommended)
Database – Microsoft SQL Server 2008 with Service Pack 1 and Cumulative Update 2
– Microsoft SQL Server 2008 R2 (Recommended)
SharePoint – Microsoft SharePoint Server 2010
– Microsoft SharePoint Foundation 2010
(*Only required for SharePoint-based commerce deployment)
Business Management Tools (optional) – Microsoft Silverlight 3/4
Application Development (optional) – Microsoft Visual Studio 2008 with Service Pack 1
– Microsoft Visual Studio 2010

Before You Begin

*Uninstall any previous version of commerce server software if installed (i would recommend to go with a fresh VM installation)

* You must have administrative privileges on the computer where you are installing the software.

* Keep all the software ready for installation.

Installing Prerequisite Softwares

1. SQL Server

2. Visual Studio (Optional)

3. SharePoint 2010

4. Microsoft Silverlight

5. Install and Setup IIS 7.0 web server

6. If the setup program detects missing prerequisite software. Download and install via links provided in the dialog box. If you have installed above software then you will be prompted to install 3 more.

Installing Microsoft Commerce Server 2009 R2

Step 1: Run the setup file (if you don’t have setup, click here to download). Make sure you run the setup as local administrator or select “Run as administrator”.

Step 2: Click on Install Microsoft Commerce Server 2009 R2 Enterprise Edition on this computer link.

Step 3: Next screen you will see the list of prerequisites to be installed. Install all the prerequisites one by one. After installing, click Next.

Step 4: Select the components you want to install. For development installation, you can select all and click Next.

Step 5: On summary page, review the components to be installed and click Install.

Step 6: On Install click, Installation progress window will appear. This took 4-5 minutes for me.

Step 7: Once installation is complete, you will see screen like below. Click on Finish button to launch the Commerce Server Configuration Wizard.

Microsoft Commerce Server Configuration

Step 1:  On Commerce Server Configuration Wizard, load the configuration file if you have any and click Next.

Step 2:  Enter the SQL server instance name. Select the authentication type and click on Test button to verify the database connection. On successful test, click Next. (Make sure the account you are using must have DBCreator permissions on SQL server otherwise configuration will fail.)

Step 3:  For single server installation, you can skip the Staging service. Click Next.

Step 4: Enter the SQL server instance name. Select the authentication type and click Test button to verify the database connection. Provide the Direct Mailer Service Account details (I have used the local administrator account) and click Next.

Step 5: Review the components to be configured. Save the configuration file. This will be helpful if we have to do the installation on another server with same configuration or if setup fails on first attempt (Saved configuration file will not store the sensitive information like password. However, you can edit saved XML files and make password information available when the file is used in the future). Click Next.

Step 6: Configuration process will take 3-4 minutes. After successful completion, you will see a screen like below. Click Finish to close the wizard.

Congrats!!! Now you have successfully installed and configured the Commerce Server without any issues.

Microsoft SharePoint Commerce Services Configuration

Step 1: Start Microsoft SharePoint Commerce Services Configuration wizard. To do that, goto Start -> All Programs -> Microsoft Commerce Server 2009 R2 -> Tools  and select SharePoint Commerce Services Configuration Wizard. Verify all the checks must be green and click Next.

Step 2: Select Commerce Server Solution Storefront and Web Parts. Click Next.

Step 3: Click Create web application (you can also use existing web application if you have any).

Step 4: Creating web application (you can skip this step if you are using existing one). Takes 2-3 minutes.

Provide the necessary details for web application to be created and click Next.

Step 5: Select the web application and set administrator account and web site address. Click Next.

Step 6: Select Create commerce site and provide unique name for it. Provide Database server name and click Next.

Step 7: Specify the authentication store settings for commerce server site. For now, you can leave the settings as default. Provide username and passphrase for Profile key encryption and click Next.

Step 8: Review the configuration summary and click Next.

Step 9: SharePoint Commerce Services configuration will start and take 7-8 minutes. On successful completion, you will see a screen like below. Click View Site to open the site in browser and click Finish.

Step 10: Setting up the channel configuration. On website, click on Commerce Actions and open Management tab. Click Channel Configuration. (Note- You must have Silverlight installed to this setting from home page. Otherwise you can goto, Site Settings -> View All Site Content -> Channel Configuration). On first attempt, you may encounter an error page. Don’t worry, click on Go back to site and try again.

Step 11: You will be redirected to Channel Configuration list. Edit the Channel Configuration item and select the catalogs. Click Save.

wow!!! You are done. Now goto home page and you will find the sample products. Click on any product to see the details. Now you can explore more from here….Enjoy 🙂 🙂 🙂

%d bloggers like this: