Sitecore XC9 Initial Release - Wrong IdentityServer app.config


I'm istalling a Sitecore XC9 IR instance on Win 2016 server. My sql instance is the following: {machinename}\\SQLEXPRESS16. So I took care of define the following variables into the Deploy-Sitecore-Commerce.ps1 script file:

$params = @{
CommerceServicesDbServer = "$($Env:COMPUTERNAME)\SQLEXPRESS16"
CommerceServicesDbName = "SitecoreCommerce9_SharedEnvironments"
CommerceServicesGlobalDbName = "SitecoreCommerce9_Global"
SitecoreDbServer = "$($Env:COMPUTERNAME)\SQLEXPRESS16"
SitecoreCoreDbName = "$($SqlDbPrefix)_Core"
if ($CommerceSearchProvider -eq "SOLR") {
Install-SitecoreConfiguration @params
elseif ($CommerceSearchProvider -eq "AZURE"){
Install-SitecoreConfiguration @params -Skip InstallSolrCores

Despite this, almost at the end of the instance installation I got an error (500 internal server error) during the GetIdServerToken task on te SitecoreIdentityServer. Analyzing the log, it came out that the SQL connection string into the app.config file of the IdentityServer was wrong with the Data Source = localhost instead of the correct one. 

The IdentityServer deploy task from the Master_SingleServer.json config file is defined as follow:

"DeploySitecoreIdentityServer": {
  "Type": "InstallSitecoreConfiguration",
  "Params": {
  "Path": ".\\Configuration\\Commerce\\SitecoreIdentityServer\\SitecoreIdentityServer.json",
  "SitecoreIdentityServerZipPath": "[parameter('SitecoreIdentityServerZipPath')]",
  "SitecoreDbServer": "[parameter('SitecoreDbServer')]",
  "SitecoreCoreDbName": "[parameter('SitecoreCoreDbName')]",
  "UserAccount": "[parameter('UserAccount')]",
  "SitecoreIdentityServerName": "[parameter('SitecoreIdentityServerName')]"

Should I assume that there is a bug on the task or I am missing something?


Thank for your help,



  • Hi Fabio,

    I'm thinking this is a configuration that needs to be changed manually before running the main installation script (However, it would be nice if the tasks took care of this automatically :)). The Sitecore Identity Server and Sitecore Commerce Engine packages are fed configurations via JSON files under their respective wwwroot folder. If you unzip the Sitecore.IdentityServer.*.zip and Sitecore.Commerce.Engine.*zip files, you will notice the JSON files point to localhost (or .). Some examples to check this out:

    - ./wwwroot/AppSettings.json.

    - ./wwwroot/bootstrap/global.json.
    - ./wwwroot/data/environments/Plugin.Content.PolicySet. <-- This file contains Sitecore connection info that will need to be changed, i.e. Sitecore URL, account credentials, etc.
    - ./wwwroot/data/environments/Plugin.Sql.PolicySet.

    At any rate, if you need to change the connection string/sitecore info in these JSON configuration files, try the following:

    1) Unzip the contents
    2) Modify the JSON files' connection string/Sitecore instance info
    3) Re-zip the contents. Make sure you use the same name as the original zip file
    4) Fire the SIF Installation script :)

    Hope this helps!

  • Yes I think it can be considered as a deployment bug. I believe the deployment script does have a mechanism to replace the default parameter values from the ZIP package and replace them on the fly (e.g. the certificate thumbprint). But maybe it does not take into consideration of other scenarios like this one.

    We will look into correct this in later release.