Sitecore · Sitecore 9 · Upgrade

Inheritance security rules violated by type: ‘System.Net.Http.WebRequestHandler’

This will be a quick post! J

While working on a Sitecore + uCommerce project, I ran into this error for a variety of the feature modules we were implementing – starting with Federated Authentication implementation.

Exception: System.TypeLoadException

Message: Inheritance security rules violated by type: ‘System.Net.Http.WebRequestHandler’. Derived types must either match the security accessibility of the base type or be less accessible.

Turned out it was an issue with the version of System.Net.Http reference in our solution/projects.

There is a compatibility bug/issue in System.Net.Http for the versions 4.1.0-4.3.0 with .NET 4.6.1. :

Since we are developing on .NET 4.6.2, I figured that’s likely to be the same issue with our solution.

Hence, I upgraded all references to System.Net.Http in our solution from 4.3.0 to 4.3.1….and voila!!! All the exceptions are now gone.


Sitecore · uCommerce

Sitecore 9 + uCommerce + DependencyInjection

It had been while since I worked on a Sitecore + uCommerce project. Recently I have been working on one. There was an issue with Sitecore 9 Forms throwing an error in the dependency resolver of the uCommerce Demo Store. The exception looked like this –

Exception: System.InvalidOperationException

Message: Unable to resolve service for type ‘Sitecore.ExperienceForms.Mvc.IFormRenderingContext’ while attempting to activate ‘Sitecore.ExperienceForms.Mvc.Controllers.FormBuilderController’.

I could replicate this exception in my uCommerce + Sitecore Demo Store installation. I needed to implement sort of fallback mechanism from my uCommerce Demo Store DI resolver to Sitecore’s default DI resolver – when my uCommerce Demo Store DI resolver could not resolve the service/type.

And that got me working. Looking for the error in the Sitecore Community site, I stumbled upon a similar question and an excellent answer to it, posted by Kamruz Jaman.

Form Reports not working due to a controller creation exception

The answer took me to an excellent post by Sean Holmesby : Safe Dependency Injection for MVC and WebApi within Sitecore

After implementing a similar fallback in my solution, I still ran into an issue of null exception in my Demo Store ServiceProviderDependencyResolver class.

So, I modified the GetService method like below –


Here is what I changed in the AvenueClothingHttpModule class. Notice the commented-out line and the line added right below.


And finally, below is the fallback class that I got from Sean’s post. That did it. J

Now all is happy and functional.



Sitecore · Sitecore 9 · Upgrade

Upgrading to Sitecore 9 from Sitecore 8.2 (Update 2)

In recent years I have had the FUN of working on multiple Sitecore upgrade projects. With each of this upgrade projects, based on the combination of current version and the version that I would be upgrading to, few things have changed but few have remained not so changed.

Have there been technical challenges from the platform’s perspective? Absolutely. But at times it also has been simply the lack of planning and reviewing all aspects of just not the upgrade but what we are exactly upgrading.

All in all, with each upgrade projects I have learned a lot that helped me into the next one!

So, here we go…

UNDERSTAND the scope of your upgrade.

Here are some of the questions you want to ask before you dive into an upgrade project that would guide you to understand and estimate the scope of the upgrade.

  • Am I upgrading just base Sitecore site or there are other integrations involved? i.e. my experience has mainly involved external commerce systems like Insite Commerce, uCommerce and even good old Microsoft Commerce Server (which is now the new cool Sitecore Experience Commerce platform); search platform like Coveo.
  • Are there any Sitecore Modules that also would need to be upgraded?
  • Are there any Shared Sitecore Modules that might need to be upgraded? Do I have or would I need access to source code for those?
  • Do I need to upgrade the infrastructure or software components? i.e. Server, Visual Studio, SQL Server, Solr platform, .NET Framework etc. You can get this information from Sitecore Compatibility Table here –
  • What tools are available to me for some of the upgrade operations – i.e. My most favorite Sitecore Express Migration Tool. – which especially provides efficient and reliable framework to upgrade Sitecore databases.


There are excellent Sitecore KB articles providing exactly this information on the Sitecore Compatibility Guide – Unless absolutely necessary(???) try to stick with Sitecore’s recommendations on compatibility.

Once you have identified and acquired the tools you need you plan the steps for your upgrade. This could vary based on your set up but few thing remain unchanged.

In today’s example I am upgrading a base Sitecore 8.2 site to Sitecore XP 9 Update 1. So, going back to my list up there, here is what my example upgrade project looks like –

What am I upgrading?


  • Back up Sitecore 8.2 update 2 databases and website.
  • Assuming you are using some sort of source control, create a separate branch for upgrade for your solution.


  • Follow section 2.1 of the Upgrade guide and download files you need.
  • Download and extract all these zip files.

  • Sitecore 9.0.0 rev. 171002.update
  • Sitecore Update Installation Wizard 3.0.0 rev.
  • Sitecore 9.0.0 rev. 171002 (config files).zip

    This file contains:

    • Database Upgrade

    This file contains the following database upgrade scripts:

    • SXP90_BeforeInstall.sql
    • CMS9.0_BeforeInstall.sql
    • CMS90_db_core_BeforeInstall.sql
    • Disable

    This file contains the following:

    • Disable.xDB.config

    This file contains:

    • RestoreDeletedMarketingTaxonomies.aspx
    • RestoreDeletedMarketingDefinitions.aspx
    • DefinitionItemsNameValidator.aspx
  • Sitecore 9.0.0 rev.

    In the \Databases folder, this file contains:

    • Sitecore.Experienceforms.dacpac
    • Sitecore.Processing.tasks.dacpac

I did not download xDB Data Migration Tool as I do not have any xDB data to migrate.


  • Follow section 3.1.1, 3.1.2 & 3.1.3 of upgrade guide for appropriate actions for content tests and if you are using any xDB functionality.
  • To ensure that the upgrade process is not interrupted, you must disable –
    • The Sitecore Experience Database (xDB) functionality
    • Web Forms for Marketers (if installed)
    • Email Experience Manager ((if installed)
    • Any other modules that are running on the Sitecore instance
  • Disabling Sitecore xDB
    • From the extracted files go to the extracted Sitecore 9.0.0 rev. 171002 (config files) folder and extract Disable

    • In the \App_Config\Include folder, create a new \Z.Custom folder and copy the Disable.xDB.config file to the \App_Config\Include\Z.Custom folder.
  • Disabled following config files, if you have those, by adding .disabled to the file extension.
    • All configurations files under-
      • \App_Config\Include\EmailExperience
      • \App_Config\Include\Z.EmailExperience
    • \App_Config\Include\ExperienceProfile\ExperienceProfile\Sitecore.ExperienceProfile.Reporting.Sitecore.EmailExperience.ExperienceProfile.config
  • In the \bin folder of your website, disable all the files that begin with Sitecore.EmailCampaign, Sitecore.EDS, or Sitecore.ExM by moving them outside the \bin folder.
  • Disable the following Web Forms for Marketers configuration files by adding .disabled to the file extension.
    • \App_Config\Include\Sitecore.WFFM.Speak.config
    • \App_Config\Include\Sitecore.WFFM.Services.config
    • \App_Config\Include\Sitecore.WFFM.Dependencies.config
    • \App_Config\Include\Sitecore.WFFM.Analytics.config
    • \App_Config\Include\Sitecore.Forms.config
    • \App_Config\Include\Sitecore.MvcForms.config


  • Go to the extracted files/Sitecore 9.0.0 rev. 171002 (config files)/Database Upgrade Script folder and execute following scripts.
    • Execute the CMS9.0_BeforeInstall.sql script for the Core, Master, and Web databases.
    • Execute the CMS90_db_core_BeforeInstall.sql script for the Core database only.
    • If you are using the xDB functionality, you must execute the SXP90_BeforeInstall.sql script for the Reporting database.


  • Run the following SQL Query to enable Contained Database Authentication. We need this as xConnect requires the ability to login using a sql login.

    sp_configure ‘contained database authentication’, 1;




  • Based on the SQL server version you have installed, navigate to the folder where you have the SqlPackage.exe. In my case it was C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin for SQL server 2017. You can find yours here-
  • Open command prompt as administrator and change directory to your SQLPackage.exe destination as above.

    i.e. cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin

  • To use the Forms component:
    • Deploy the Sitecore.Experienceforms.dacpac to SQL Server.

    In the command prompt window –

    SqlPackage.exe /Action:Publish /SourceFile:”C:\Users\Hetal.Dave\Downloads\Upgrade from 8.2 to 9.0\Extracted files\Sitecore 9.0.0 rev. 171002\Databases\Sitecore.Experienceforms.dacpac” /TargetDatabaseName:Sc90_New_ExperienceForms /TargetServerName:”<Your SQL SERVER NAME>”

    • In the \App_Config folder, in the ConnectionStrings.config file, add the connection string for the Sitecore.ExperienceForms database.

    For example: <add name=”ExperienceForms” connectionString=”user id=user;password=password;Data Source=(server);Database=Sitecore.ExperienceForms” />

  • To use the Sitecore Experience database functionality:
    • Deploy the Sitecore.Processing.tasks.dacpac to SQL Server.

    In the command prompt window –

    SqlPackage.exe /Action:Publish /SourceFile:”C:\Users\Hetal.Dave\Downloads\Upgrade from 8.2 to 9.0\Extracted files\Sitecore 9.0.0 rev. 171002\Databases\Sitecore.Processing.tasks.dacpac” /TargetDatabaseName:Sc90_New_ProcessingTasks /TargetServerName:”<Your SQL SERVER NAME>”

    • In the \App_Config folder, in the ConnectionStrings.config file, add the connection string for the Xdb.processing.tasks database.

    For example: <add name=”xdb.processing.tasks” connectionString=”user id=user;password=password;Data Source=(server);Database=Sitecore.Processing.Tasks” />


  • Install the Update Installation Wizard. Go to the downloaded files folder and verify you have the sitecore package for update installation wizard downloaded.

  • In a browser browse to you site’s sitecore admin and install the Sitecore Update Installation Wizard 3.0.0 package. When prompted select to overwrite all files and items.
  • Using the Update Installation Wizard or by going to http://<hostname>/sitecore/admin/UpdateInstallationWizard.aspx, install the Sitecore 9 update file – Sitecore 9.0 rev. 171002.update.

    I got the issue below and to resolve it I deleted the /Sitecore/system/Marketing Control Panel/Experience Explorer/Presets item, as my Sitecore instance was the clean Sitecore 8.2 Update 2 instance. I had nothing to lose. 🙂

    However, I have opened a Sitecore support ticket with this issue and will post it here once I hear from Sitecore Support team.

    I ran the analysis again and got this –

    Now, sit tight…have a coffee…this will take a few minutes. J

  • As I mentioned above, I have a ticket out to Sitecore team and will update the post once I hear from them.


  • Refer to the section 5.1 of the upgrade guide. Since mine was a clean Sitecore 8.2 Update 2 instance, I did not see any patch files created post upgrade.
  • Refer to section 5.2 of the upgrade guide to specify the server role. Mine was a local standalone instance, so I verified that it was set to : “Standalone” – in the \Website\web.config file,

<AppSettings> <add key=”role:define” value=”Standalone”/> </AppSettings>

I did not have to change it, as “StandAlone” is the default value.

  • Define the Search Provider

    To define the search provider: In the \Website\Web.config file, set the search provider as follows:

    <add key=”search:define” value=”Solr” />

    The following values are supported:

    • Lucene
    • Solr
    • Azure
  • Remove Deprecated Indexes – follow the instructions in section 5.4 of the upgrade guide.
  • Update or set up Solr for your Sitecore site. Since, mine was a clean 8.2 Update 2 instance, and I already had a Solr 6.6.2 instance running all I had to do was to set up the cores and update the core names in Sitecore Solr search files.
  • If you do not have a Solr 6.6.2 instance, you can follow this post to set up yours –
  • On the Sitecore Launchpad, click Control Panel, and in the Indexing section, click Populate Solr Managed Schema.



  • If you have any modules installed follow the instructions from the Chapter-6 of the upgrade guide.


  • Set up xConnect for your upgraded Sitecore 9 site. Follow instructions from section 7.3 of the upgrade guide. – This step is not mandatory. I skipped it for now. I will discuss this in another post.
    • Once you do set up xConnect, in the \App_Config\Include\Z.Custom folder, remove the Disable.xDB.config file. (Leave it as is if you haven’t set up xConnect yet.)
  • Clear browser cache.
  • Perform a complete republish of your site. Perform a republish of your site. You must publish the entire site, including system items, templates, and so on, to every publishing target.
  • Rebuild indexes.
  • Rebuild Link databases.


  • This might be the right time to upgrade the .NET framework for your solution to .NET Framework 4.7, if other components of your solution permit.
  • Update all Sitecore references in your solution to Sitecore 9 references.
  • Make any necessary updates to your deployment scripts.
  • Deploy your solution.

So far, we upgraded a Sitecore 8.2 Update 2 instance to a Sitecore 9 site. Based on your set up there will be additional steps. But this is a start. J

I will keep adding posts as I move forward in this journey! J


Commerce · Insite Commerce · Sitecore · Upgrade

Quick Checklist for Sitecore + Insite Commerce Product Sync

Recently I worked on a Sitecore + InsiteCommerce eCommerce project and over a few trials learned the right way to sync products from Insite Commerce into Sitecore product repository.

In a post I wrote a while ago, I discussed setting up InsiteCommerce and Sitecore site. Few things might have changed since that last post in terms of setting up a InsiteCommerce + Sitecore site, but most of it is still same.

Both that post, and this post assume the following –

Sitecore version 8.2.1 or higher up to 8.2 Update 6.

Sitecore Commerce Connect 8.2.1.

Insite Commerce: up to the latest Insite Commerce Version (Version 4.3.1 at the time of this post)

Insite Plus Sitecore commerce connector up to Version 2.0.

And here is the checklist/steps I established as my troubleshooting reference if for some reason I ran into issues or errors while syncing products beteen the two systems –

Step 1. Insite Admin Website

Make sure that the website name and the url for the website are identical in all places as per the screen shots below –

Step 2. InsitePlusSitecore.Core.WebsiteExtension.config

This configuration file is located in your Sitecore Website/App_Config/Include/InsitePlusSitecore/ folder. Match the InsiteCommerce site name and InsiteCommerce site url as you defined in Insite admin above.

Make sure the value of Insite.ConnectorModuleName is set to “InsitePlusSitecore”.

The value for Insite.RunFullProductSync: Set to true if you want to sync all products. Set to false otherwise. Typically, if you are syncing the products for the first time, makes sense to set it to true.

Step 3. When you make a change in a product in Insite

Make changes you need to for products in Insite. Clear cache. Clear Local storage. Rebuild all indexes. Clearing the cache may or may not be necessary. I just do it as a safeguard.J

Step 4 Product Sync in Sitecore

Login to Sitecore admin. Trigger product sync. This may take a while based on no of products in Insite.

Once the sync is complete, check if there are products under Products in the Product Repository. Just click on the search button without adding any search term and you should see products listed in the search results.

Step 5. Sync artifacts if you need.

Step 6. Smart publish your Sitecore site.

Step 7.
Rebuild product indexes of your site. Mine looked like this.

Step 8. Recycle app_pool of your Sitecore website. Browse products on your Sitecore site.

Step 9. Some additional troubleshooting tips –

Commerce · Sitecore · Sitecore 9 · Sitecore Commerce · Uncategorized · Upgrade

Sitecore Commerce FUN: Installing XC 9

Right after I came back from the Symposium 2017, I listed all the reasons to be excited about Sitecore XC9 on my company blog post –

Well, the much awaited Sitecore XC 9 finally released in January 2018, and I finally got to install my very first Sitecore XC9 instance. In this post I am sharing what FUN it has been!J

First, you need Sitecore installed. Follow my blogposts below to get that out of the way! J

My Sitecore Commerce XC9 installation has Sitecore 9 Update 1, but I followed the posts for Sitecore 9 installation just fine.

  1. Getting ready –
  2. Setting up Solr –
  3. Installing Sitecore XP 9 Site –

Sitecore Commerce Installation

Before you begin your Sitecore XC9 installation and setup, create the folder C:/Deploy/Assets.

Download Sitecore PowerShell Tools to C:\Deploy\Assets folder. –

Download Sitecore Experience Accelerator to C:\Deploy\Assets folder –

MS Build Microsoft Visual Studio Web targets Nuget:

Extract the downloaded Nuget package and then in the extracted folder navigate to C:\SitecoreInstaller\XC9\\tools\VSToolsPath\Web.

Copy the file Microsoft.Web.XmlTransform.dll to the C:\Deploy\Assets folder.

Sitecore Commerce Release Package:

  • Download the package to any folder you like. I downloaded it to C:\SitecoreInstaller\XC9.
  • Extract the package to C:\SitecoreInstaller\XC9\Sitecore.Commerce.2018.01-2.0.254.

Copy all extracted files from C:\SitecoreInstaller\XC9\Sitecore.Commerce.2018.01-2.0.254 to C:\Deploy.

Now, in the Deploy folder, extract following files in their own folders. I use 7-Zip that makes things easy for me.



You can then delete the ones in red boxes. Green box is the extracted folders for these files.

Copy the file C:\Deploy\Sitecore.Commerce.Engine.SDK.2.0.1922\Sitecore.Commerce.Engine.DB.dacpac to C:\Deploy\Assets.

Install the SSL certificate. Open a PowerShell Window as admin and run the following command.

New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname “Sc_Xc9.CommerceEngineConnect”

Copy the Thumbprint value somewhere. You will need it for the next step.

Export the certificate to a file by running the following cmdlet:

Export-Certificate -Cert cert:\localMachine\my\BF055C200F0142B2EF72E3592B06C1666E2C55C5 -FilePath “C:\Deploy\Assets\Sc_Xc9.CommerceEngineConnect.cert”

This is how the completed set up would look like – with all the necessary files and packages.

Stop the xConnect Service of your Sitecore installation.

Navigate to C:\Deploy\SIF.Sitecore.Commerce.1.0.1748 and create a copy of the file – Deploy-Sitecore-Commerce.ps1. I renamed my copy as My-Deploy-Sitecore-Commerce.ps1

If you want to process some test payments, you should also set up a Braintree Sandbox account. It is easy. I documented the process of creating a Braintree Sandbox account in one of my previous posts setting up Sitecore Commerce 8.2. –

Once you set up the account, you can use that information to populate Braintree parameters in the installation script.

Now, you need to make some changes to this file – some to match your own names and paths and some are corrections to some typos in the original script to match the names of the Sitecore package names correctly. Below are the parameters that you would need to verify.

I have attached the script here. Sitecore XC9 Install Script

Greens are the parts-n-pieces I modified to match my name and path changes and to match to the correct package names in the originally downloaded Sitecore packages. I got it right after few tries. Hope this will help others.J

Remember –

  • The value of the $SiteName parameter should be same as your Sitecore Install site.
  • The value of $SqlDbPrefix should be same as the prefix you had when you installed your Sitecore site.

You may get time out error in the Index rebuild step. Don’t worry. You can manually rebuild the indexes from the Sitecore Control Panel Indexing Manager. That is what I did too.

Start the xConnect service that you stopped in step 13. Follow the steps from the Sitecore Installation guide.

Sitecore creates Commerce specific roles. You can create users with these roles as necessary. I did not configure any new user accounts with these roles, as this was just a demo site installation.

  • Commerce Administrator
  • Commerce Business User
  • Customer Service Representative
  • Customer Service Representative Administrator
  • Pricer
  • Pricer Manager
  • Promotioner
  • Promotioner Manager

The complete installation will have the following components –

  • Sites

  • Databases

  • Windows Services
    • Solr Service (i.e. the name of my Solr Service is : Solr662AsService)

    • Sitecore Marketing Automation Engine Service
    • Sitecore Xconnect Search Indexer Service



This post helped me with few issues while installing.

Feel free to message me here or on Sitecore Slack, or Twitter or LinkedIn if you have questions.

Sitecore · Sitecore 9 · Upgrade

Sitecore 9 FUN!!!: 3 – Installing Sitecore XP 9 Site


As I begin my journey into the new Sitecore 9 world and make headways, I will share what might help other Sitecorians or the ones who are just getting to know Sitecore!J

Also, I am a major fan of pictures. So, you will see a lot of screen shots.J

I chose to install as a OnPremise XP0 topology install. The on-premises installation of the platform takes place in the context of the Sitecore Installation Framework. The framework deploys Web Deploy Packages (WDP) by passing parameters to configuration files through a Microsoft® PowerShell module.

In my previous two posts I shared information about prerequisite software components for Sitecore 9 installation and Setting up Solr with SSL. Here are links to those posts –

This Post

In part 3, I will share my notes (and pictures) installing a Sitecore 9 instance. Finally!!! J

I installed my first Sitecore XP 9 instance with XPo topology. Below is a quick reference to Sitecore XP Topologies –


Downloads for XPo Topology

Download and extract the install package Sitecore 9.0.0 rev. 171002 (WDP XP0 packages).zip from here –


Extracting the install package will give the files below –

  1. Web Deploy packages for XPo
    • sitecore 9.0.0 rev. 171002 (OnPrem)
    • sitecore 9.0.0 rev. 171002 (OnPrem)
  2. Environment Configuration Files
    • sitecore-solr.json
    • xconnect-solr.json
    • xconnect-createcert.json (for developer environments)
    • sitecore-XP0.json
    • xconnect-xp0.json

Install Sitecore Installation Framework (SIF) Modules

  1. Open a PowerShell command window as admin and then run following commands.
    • Register the Sitecore repository.
      Register-PSRepository -Name SitecoreGallery -SourceLocation 
    • Install SitecoreInstallFramework module.
      Install-Module SitecoreInstallFramework 
    • Install SitecoreFundamentals module.
      Install-Module SitecoreFundamentals 

Install Sitecore XPo Instance

  1. Jump to page 35 (Section 5.2.1) of the installation guide. You will see a PowerShell script. This script will basically take care of all Sitecore install steps instead of running each step separately.
  2. Create a PowerShell file named SC9_Install.ps1 and copy the script in this file, or copy it from below –

    #define parameters
    $prefix = "xp0"
    $PSScriptRoot = “C:\resourcefiles” 
    $XConnectCollectionService = "$prefix.xconnect" 
    $sitecoreSiteName = "$" 
    $SolrUrl = "https://localhost:8989/solr" 
    $SolrRoot = "C:\Solr-6.6.1" 
    $SolrService = "Solr-6.6.1" 
    $SqlServer = ".\SQL 2016" 
    $SqlAdminUser = "sa" 
    #install client certificate for xconnect
    $certParams = @{ 
    Path = "$PSScriptRoot\xconnect-createcert.json" 
    CertificateName = "$prefix.xconnect_client" 
    Install-SitecoreConfiguration @certParams -Verbose
    #install solr cores for xdb
    $solrParams = @{
    Path = "$PSScriptRoot\xconnect-solr.json" 
    SolrUrl = $SolrUrl 
    SolrRoot = $SolrRoot 
    SolrService = $SolrService 
    CorePrefix = $prefix 
    Install-SitecoreConfiguration @solrParams
    #deploy xconnect instance
    $xconnectParams = @{ 
    Path = "$PSScriptRoot\xconnect-xp0.json" 
    Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002 (OnPrem)" 
    LicenseFile = "$PSScriptRoot\license.xml" 
    Sitename = $XConnectCollectionService 
    XConnectCert = $certParams.CertificateName 
    SqlDbPrefix = $prefix 
    SqlServer = $SqlServer 
    SqlAdminUser = $SqlAdminUser 
    SqlAdminPassword = $SqlAdminPassword 
    SolrCorePrefix = $prefix 
    SolrURL = $SolrUrl 
    Install-SitecoreConfiguration @xconnectParams
    #install solr cores for sitecore
    $solrParams = @{ 
    Path = "$PSScriptRoot\sitecore-solr.json" 
    SolrUrl = $SolrUrl 
    SolrRoot = $SolrRoot 
    SolrService = $SolrService 
    CorePrefix = $prefix 
    Install-SitecoreConfiguration @solrParams
    #install sitecore instance
    $xconnectHostName = "$prefix.xconnect" 
    $sitecoreParams = @{ 
    Path = "$PSScriptRoot\sitecore-XP0.json" 
    Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002 (OnPrem)"
    LicenseFile = "$PSScriptRoot\license.xml" 
    SqlDbPrefix = $prefix 
    SqlServer = $SqlServer 
    SqlAdminUser = $SqlAdminUser 
    SqlAdminPassword = $SqlAdminPassword 
    SolrCorePrefix = $prefix 
    SolrUrl = $SolrUrl 
    XConnectCert = $certParams.CertificateName 
    Sitename = $sitecoreSiteName 
    XConnectCollectionService = "https://$XConnectCollectionService" 
    Install-SitecoreConfiguration @sitecoreParams
  3. Now, create a directory named “resourceFiles” under your C:\ root, and copy all files and save the install script to that directory. If you read through this script, you will notice references to install configuration json files and web deploy packages.
  4. Copy following Sitecore installation files to C:\resourceFiles directory.
    • SC9_Install.ps1
    • All Sitecore XPo configuration files
    • Sitecore XPo web deploy packages
    • Your Sitecore license file


  5. Open PowerShell ISE as admin.

    PowerShell ISE

  6. In the command window under the powershell editor window change the directory to C:/resourcefiles and import SIF modules. Run following commands.
    cd C:\resourcefiles
    Import-Module SitecoreInstallFramework
    Import-Module SitecoreFundamentals 


  7. Open the SC9_Install.ps1 file in the PowerShell editor and update the script based on what you need to change. You can keep all default values if you want. However, you may need to change the following parameters as I did.

    #define parameters

    $prefix = “<Prefix of your Sitecore 9 installtion>”  This prefix will apply to everything – your Sitecore Site, your xConnect site, your Sitecore databases etc.

    $PSScriptRoot = “C:\resourcefiles”

    $XConnectCollectionService = “$prefix.xconnect”

    $sitecoreSiteName = “$”

    $SolrUrl = “<URL of your Solr instance with the port you are running Solr on>”  i.e. https://localhost:8984/solr

    $SolrRoot = “<Location of your Solr instance>” i.e. C:\Solr-6.6.2

    $SolrService = “<Name of your Windows Service for Solr>” i.e. Solr662AsService

    $SqlServer = “<Name of your SQL Server Instance>”

    $SqlAdminUser = “<You can keep the user sa or create a new user if you like.>”  i.e. SitecoreUser

    $SqlAdminPassword=”<Password of the SqlAdminUser account you will be using.>” i.e. My SqlAdminUser name is SitecoreUser and password is password.


  8. Save and run the script. It could take about 5-7 minutes. It felt like forever!!!J



Review Installation

Once the installation completes, following components will be installed as your Sitecore 9 XPo setup.

  1. Sitecore XP Website & Sitecore xConnect Website (IIS)


  2. Databases


  3. Windows Services


  4. Solr cores for Sitecore XP 9 – browse to your Solr admin site > Cores. You will see the Solr Cores for your Sitecore 9 instance.


  5. Browse the xConnect site. You may get prompted to select a SSL certificate. Select the one that is applicable and click OK. I selected the localhost cert.


    You will get this result – meaning your xConnect component is installed correctly.

    P.S. – The time stamp will vary! J


  6. Browse to your new Sitecore 9 site! Well, nothing much is changed here. J


Post Installation Steps (almost there!)

Follow the post installation steps as per the installation guide Chapter – 6…or continue below! J

  1. Open SQL Server Management Studio, click on new query and set Query mode to SQLCMD.

  2. Rebuild the Search Indexes and the Link Databases. – you know the drill! J OR follow the instructions in the Installation Guide – Section 6.2 (page 40).
  3. Deploy Marketing Definitions – instruction in the Installation Guide – section 6.3 (page 41)


  4. Copy the following script and make sure to verify and update highlighted value as per your installation.
  • I only needed to change the DatabasePrefix based on the prefix I had configured in my SC9_Install.ps1 script.
  • You can verify the UserName and Password variables in the connectionstrings.config file of your xConnect website. i.e. C:\inetpub\wwwroot\xp090.xconnect\App_Config\ConnectionStrings.config
  • Run the script.
:SETVAR DatabasePrefix xp090 
:SETVAR UserName collectionuser 
:SETVAR Password Test12345 
:SETVAR ShardMapManagerDatabaseNameSuffix _Xdb.Collection.ShardMapManager 
:SETVAR Shard0DatabaseNameSuffix _Xdb.Collection.Shard0 
:SETVAR Shard1DatabaseNameSuffix _Xdb.Collection.Shard1 

IF(SUSER_ID('$(UserName)') IS NULL) 
    CREATE LOGIN [$(UserName)] WITH PASSWORD = '$(Password)'; 

USE [$(DatabasePrefix)$(ShardMapManagerDatabaseNameSuffix)] 
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)') 

    CREATE USER [$(UserName)] FOR LOGIN [$(UserName)] 
    GRANT SELECT ON SCHEMA :: __ShardManagement TO [$(UserName)] 
    GRANT EXECUTE ON SCHEMA :: __ShardManagement TO [$(UserName)] 

USE [$(DatabasePrefix)$(Shard0DatabaseNameSuffix)] 
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)') 
     CREATE USER [$(UserName)] FOR LOGIN [$(UserName)] 
     EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(UserName)' 

USE [$(DatabasePrefix)$(Shard1DatabaseNameSuffix)] 
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'$(UserName)') 
    CREATE USER [$(UserName)] FOR LOGIN [$(UserName)] 
    EXEC [xdb_collection].[GrantLeastPrivilege] @UserName = '$(UserName)' 


5. Rebuild the Search Indexes and the Link Databases. – you know the drill! J OR follow the instructions in the Installation Guide – Section 6.2 (page 40).

6. Deploy Marketing Definitions – instruction in the Installation Guide – section 6.3 (page 41)


Sitecore · Upgrade

Sitecore 8.1 Package Installation Error with the packageinstalled:ended event

Recently I was working on an upgrade from Sitecore 8.1 Update 2 to Sitecore 8.2 Update2.

I was trying to install the Update Installation Wizard

And I ran into this exception – One or more exceptions occurred while processing the subscribers to the ‘packageinstall:ended’ event.

Ugh…I turned to Google and found a few posts/responses, listed below. I sifted through all of them to no avail.

The site I was upgrading had it all!!! You name it –

  • Sitecore (Of course)
  • Insite Commerce
  • WFFM
  • Commerce Connect
  • Coveo
  • PowerShell Tools

I finally gave up and was about to open a Sitecore ticket. But before I did that I looked into the logs (which I should have done FIRST!) J

The logs were filled with exceptions from Coveo. So, I decided to give it a one last try before I open a ticket with Sitecore. Here is what I did –

  1. Logged into Sitecore > Control Panel > Coveo Search section > Configuration.
  2. Few steps to clear any config issues with Coveo. Most likely it was related to the not matching API/Secret key.

  3. And then ran the Coveo diagnostic page and made sure all was green.

And, I tried installing the package again!!! ALL WELL!!!

…and then…I an into the link below from Coveo Support, and…OH WELL!!!