Sitecore 9 update 1 installation with SQL Server on a different server

Sitecore 9 update 1 was just released. So it’s quite fresh from the oven.

I’ve just tried the installation on a web machine that uses SQL Server installed on a different server and made some discoveries related with prerequisites  needed for the installation.

So beside the standard prerequisites mentioned in the installation documentation (must log into before downloading) there are couple requirements that have to be installed on your webserver:

    1. Microsoft SQL Server TransactSQLScriptDom – install both SqlDom.msi for x64 and x86 – install this before DacFx
    2. Microsoft Shared Management Objects for SQL Server 2016  – install both SharedManagementObjects.msi for x64 and x86
    3. Microsoft® SQL Server® 2016 Feature Pack
      1. Microsoft ODBC Drivers for Microsoft SQL Server – install both msodbcsql.msi for x64 and x86
      2. Microsoft Command Line Utilities 13 for SQL Server – install both MsSqlCmdLnUtils.msi for x64 and x86
    4. SQL Server PowerShell Module – by opening PowerShell as administrator and  run this command:
      Install-Module -Name SqlServer -AllowClobber
    5. Extra (so I find it later, even that is in the official documentation): Microsoft Visual C++ 2015 Redistributable – was introduced in this Sitecore 9 update 1 as its needed by ChilkatDotNet46.dll. Download from here.

I guess that’s all.

Happy installing and let me know if you need any assistance.

How to install Sitecore 9 on Windows 8.1

There are a couple of articles about Sitecore 9 on a Windows 8.1 development machine, and since it’s bit out of hand for me to upgrade to Windows 10 I’ve decided to take the bull by the horns and finally do it. Even that I’ve lost a bet with @SitecoreClimber that will manage to install Sitecore 9 to my Windows 8.1 in fist-second week of the launch without any troubles.

Windows 8.1 does not have Powershell 5.1 as its needed by SIF, so you can install it from here, as Windows Management Framework 5.1 includes also Powershell 5.1. An alternative way it to use this command choco install powershell if you are using Chocolatey.

After a restart of the machine it’s time to install Sitecore Install Framework and Sitecore Fundamentals. So in a Windows Powershell opened as Administrator execute this:

Register-PSRepository -Name SitecoreGallery -SourceLocation
Install-Module SitecoreInstallFramework
Update-Module SitecoreInstallFramework

Run the following command in Windows Powershell to validate the modules installed:

Get-Module SitecoreInstallFramework –ListAvailable

After this you can continue with the installation of SOLR. The script that Jeremy Davis made in his blog post it’s not going to work as New-SelfSignedCertificate has different parameters in Windows 8.1, so you could use my adjusted script.

After Solr its installed and up and running make sure than all the other prerequisites are meet:

  1. Sitecore License must have xDB enabled
  2. MS SQL Server 2016 SP1 or later
  3. MS SQL Management Studio
  4. .Net Framework 4.6.2 or later
  5. Web Deploy 3.6
  6. Java Runtime Environment
  7. Packages for XP Single (On Premises deployment)
  8. Microsoft SQL Server Data-Tier Application Framework (DAC Fx) (install both DacFramework.msi for x64 and x86)
  9. Microsoft SQL Server TransactSQLScriptDom (install both SqlDom.msi for x64 and x86)
  10. Extra step (added by me): Microsoft Shared Management Objects for SQL Server 2016 (install both SharedManagementObjects.msi for x64 and x86) since I do not have on my dev machine MS SQL Server 2016 SP1 or later or MS SQL Management Studio

Then make sure that you follow the changes to the scripts that Fabian is presenting here.

In short the changes are:

  1. Create a self-signed certificate in Windows 8.1
  2. Change xconnect-createcert.json
  3. Change the official installation script

Extra notes:

Note 1:

  • Make sure that the script New-SignedCertificateWindows81.ps1 is located in same place as the installation script so that can be picked up
  • Make sure that JRE bin folder does exist in the PATH Environment Variable, otherwise New-SignedCertificateWindows81.ps1 will not work.

In case you already have a SSL certificate in your machine then the changes that Fabian is presenting are not needed as you should use this article for installing your solution Sitecore 9 installation with existing SSL that I’ve wrote last week.

Note 2: The steps #8, #9 and #10 from the prerequisites should be installed in all situations when you install Sitecore 9 and you do not have on your web server MS SQL Server 2016 SP1 or later or MS SQL Management Studio

Note 3: On my way to install Sitecore 9 when I’ve installed only x64 version of add-ons from prerequisites ( steps #8, #9 and #10) and apparently was not enough as I was getting bunch of errors, so I had to install x86 versions too.

How to install Sitecore 9 with existing SSL certificate

You probably installed already Sitecore 9 on your environments following different blogs with necessary clarifications.

But, might happen that you already have a SSL certificate for your environments.

The affected places are:

  1. Installation of SolR
  2. Installation of Sitecore 9 itself

One of the places where SSL it’s needed its on the SolR instance. So by following the instructions from Jeremy Davis on this blog post I’ve adjusted his script in order to use an already existing certificate, where I’ve introduced a new variable

$solrNameSSL = "MySSLFriendlyName"

And then used this new variable $solrNameSSL in all places that have references to SSL instead of $solrName and adjusted the place where the code is searching for the certificate Cert:\Localmachine\My not only Cert:\Localmachine\Root.

The result script is here, but please do not forget to adjust necessary variables :

In the installation script of Sitecore 9 itself, some changes are required in order to use the already installed certificate.
One of the standard steps is to install a client certificate for xconnect, and that one has to be removed or at least commented out. This step usually looks like this:

#install client certificate for xconnect 
$certParams = @{     
	Path = "$PSScriptRoot\xconnect-createcert.json"     
	CertificateName = "$prefix.xconnect_client" 
Install-SitecoreConfiguration @certParams -Verbose 

I recommend to comment out only this line
Install-SitecoreConfiguration @certParams -Verbose
and in the  variable CertificateName that is defined above to put your certificate friendly name or the certificate thumbprint.

This will cover the client authentication certificate and next will be to make necessary changes for the server authentication certificate. The parameter that is called SSLCert has to be added in script part that deploys the xconnect instance, as follows:

#deploy xconnect instance
$xconnectParams = @{
 Path = "$PSScriptRoot\xconnect-xp0.json"
 Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002
 LicenseFile = "$PSScriptRoot\license.xml"
 Sitename = $XConnectCollectionService
 XConnectCert = $certParams.CertificateName
 SSLCert = $certParams.CertificateName
 SqlDbPrefix = $prefix
 SqlServer = $SqlServer
 SqlAdminUser = $SqlAdminUser
 SqlAdminPassword = $SqlAdminPassword
 SolrCorePrefix = $prefix
 SolrURL = $SolrUrl
Install-SitecoreConfiguration @xconnectParams

That is needed because if is not provided a certificate will be generated automatically to be used use for the HTTPS web bindings of the xconnect website.

In the Oficial Installation guide in chapter 4.1 and chapter 8.1.1 there is more information about SSL requirements and where and how it’s used.


grunt build with compass fails on some environments, how I fix it

As I have mentioned in my first post here, I will write also about other things not only Sitecore, as in my daily work I do work with other things too.

So, let’s get into it.

Sometimes I need to build in my local environment the frontend project that my colleagues create in order to make small changes/adjustments or test the backend work much better.

And one some project, true, some old ones I was getting this error when building with grunt the project :

Warning: Running "compass:dist" (compass) task
Warning: not found: compass Use --force to continue.

I have tried many things on my environment to fix this and seems that a combination of things let to fix this problem, so now I can build old frontend projects:

  1. Un-install all versions of Ruby from the working computer
  2. Install latest version of Ruby into the Windows machine with the option “Add Ruby executable to your PATH” selected and then restart the computer
  3. Install Compass and Sass on your computer. Open command prompt and run the following commands:
      1. gem update --system
        gem install compass
        gem install sass
  4. Update compass in your project with this command from inside your project dir
      1. npm install grunt-contrib-compass --save-dev

I hope it works for you.

Good luck.

How I have used Sitecore SignalR

On a existing Sitecore project I had to use SignalR for a page to facilitate real-time update of the information for all the visitors/users that were interacting with that page.

Indeed I turned to Sitecore SignalR module and used as resources other blogs/websites that wrote about the subject:

Everything looked great, I’ve build my page with my entire functionality, getting to the point where I needed the username of the visitor of my page/site. Since my website is protected with ADFS Authentication, I had to protect the SignalR hub and to pass authentication information to clients. Then I’ve used this, from the official documentation, and I’ve changed the code from InitializeSignalR.cs where before the line

args.App.MapSignalR(Settings.SignalR.Path, new HubConfiguration());

I’ve added


And as for the username, I’ve save it into a cookie on the page load of the component that has the SignalR functionality, and then I’m using it into the JS functionality of my SignalR functionality.

Then, since our implementation will be residing on couple of servers that were behind a LoadBalancer, and it was needed that the messages distributed by SignalR to get to all clients so SignalR Scaleout with SQL Server was needed. I’ve used the documentation from here, as follows:

  1. Created a new empty database. The backplane will create the necessary tables in this database.
  2. Added an extra NuGet package to your application:
  3. Added the following code to InitializeSignalR.cs to configure the backplane:
    • var connection = System.Configuration.ConfigurationManager.ConnectionStrings["myConnection"].ConnectionString;
  4. Then Enable Service Broker and give proper permisions to the database for the user used in the connection string as it explains further in the documentation.

I’ve added the entire file InitializeSignalR.cs into a Gist

Recompile your code, and you should be all set.