Finally, I found some time to install Sitecore Commerce. I am excited because, I can play with it and see why everyone in Sitecore Community is talking about it. First of all, installing Sitecore Commerce is quite a complex task, at least for now. It is going to get better that’s what I heard.
First challenge was, where to start. Sitecore has provided Sitecore Commerce 8.2.1 Deployment Guide. It’s pretty comprehensive but, I took a easier path. It’s easier to learn from someone who has done it already and especially, if he has made a video of that. Along with this video Sen Gupta put together a blog article too.
The video and the document was immensely helpful. But, I did face some issues, mostly, due the configuration of my machine. I am going to describe those issues in this blog and also, talk about how the configure the storefront source code, so that, we can debug the code and learn how Sitecore Commerce architecture works.
Here are the issues I faced.
Cannot start IISAdmin
I got this problem because ‘Internet Information Services\Web Management Tools\IIS 6 Management Compatibility’ Windows Feature was not turned on.
Commerce Server was unable to create a Registration Marker in Active Directory
I got this error but, it seemed to me that it is normal because my computer is not a domain controller or connected to any active directory. I ignored this message.
Adding the identity ‘domain\myaccount’ to the AzMan role ‘Administrator’…
New-CSWebService : The server could not be contacted
I Got this error but, I was not sure why powershell script is trying to add my login account in Authorization Manager. My login account was not used to run any services. I ignored this. I did manually add the ‘Administrators’ group and ‘CSFndRuntimeUser’ in the Role Assignments in CatalogAdministrator. It can be done by opening up the AzMan.msc console.
Issues with not having SQL instance as the default instance
I had many issues because my SQL Server 2014 is not a default SQL instance. I had to change in the following places
Installing DACPACK: I had to change /TargetServerName:SQLServer\InstanceName Connection string: In the following json files I had to change “Server”: “.” with “Server”: “SQLServer\InstanceName”. Without this change Commerce Authoring bootstrap was throwing error, ‘HTTP Error 502.3 – Bad Gateway The specified CGI application encountered an error and the server terminated the process.’ I had to make that change in the following files
PlugIn.AdventureWorks.CommerceAuthoring-1.0.0.json PlugIn.AdventureWorks.CommerceMinions-1.0.0.json PlugIn.AdventureWorks.CommerceShops-1.0.0.json
Service Url issue
All above json files had “ServiceUrl”: “http://localhost:1004. I had to change that to “ServiceUrl”: “http://csservices:1004, because “ServiceUrl”: “http://localhost:1004 was not accessible. Other way to fix this is to add a iis binding for CommerceAuthoring site with empty host name.
Storefront Solution Setup
I setup the reference storefront solution, so that, I can debug code and understand the architecture. The source code is available here. Download Reference-Storefront-10.0.853.
Storefront\CF\CSF contains the Sitecore Commerce storefront source code
Storefront\CS\CSF contains Commerce Server storefront
Following Changes are needed to compile and deploy the code successfully.
- Change project properties of TDSCommerceEngine_Master to point to the storefront website
- Change project properties of TDSCommon_Master to point to the storefront website
- In Commerce.Storefront project change the hostName for the storefront in the site node
- Copy all sitecore dlls from Storefront website bin folder to Storefront\Lib\Sitecore in your solution including the following dlls.
ComponentArt.Web.UI.dll (remove and add reference in the project)
System.Web.Http.dll (remove and add reference in the project)
System.Web.WebPages.Deployment.dll (remove and add reference in the project)
System.Web.WebPages.dll (remove and add reference in the project)
- Some references from Nuget packages were not picked up. I had uninstall and install those Nuget Packages.
- Copy GlobalSuppressions.cs from Common project to Commerce.Storefront project
Build and deploy the project and start learning 🙂