“Error requesting http://xp0.sc/sitecore/admin/PopulateManagedSchema.aspx?indexes=all”

Stuck on the very last step on installation! This one was the worst of all. Too many things that could be wrong. I had to look at too many things to resolve this one

[------------------------------------------------------------------------- UpdateSolrSchema : SitecoreUrl ------------------------------------------------------------------------------]
[UpdateSolrSchema]:[Authenticating] xp0.sc/.../PopulateManagedSchema.aspx
Install-SitecoreConfiguration : Error requesting xp0.sc/.../PopulateManagedSchema.aspx The remote server returned an error: (500) Internal Server Error.
At [path to install file]\install.ps1:68 char:1
+ Install-SitecoreConfiguration @sitecoreParams
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:03:11
Transcript stopped, output file is [output file path]
Invoke-SitecoreUrlTask : Error requesting xp0.sc/.../PopulateManagedSchema.aspx The remote server returned an error: (500) Internal Server Error.
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.2.0\Public\Install-SitecoreConfiguration.ps1:253 char:21
+ & $entry.Task.Command @paramSet | Out-Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

Solution

The issue with my installation was that some of the versions of .Net Framework were not installed. As suggested in Sitecore Community, the issue was resolved after I manually installed/enabled ASP, ASP.NET 3.5, ASP .NET 4.7 from Windows Add/Remove Features

Source: Sitecore Community

‘Database ‘sc9_Xdb.Collection.Shard1′ does not exist. Make sure that the name is entered correctly.’

I got this error while the post installation steps were running. So this one was particularly annoying as I was so confident that I did everything right.

I was getting the below error when running post installation sql script - 'Database 'sc9_Xdb.Collection.Shard1' does not exist. Make sure that the name is entered correctly.'

Solution

It turns out I didn't install a pre-requisite of Sitecore 9. Microsoft SQL Server Transact-SQL ScriptDom to be particular

Check out our Sitecore 9 Pre-requisites to download Microsoft SQL Server Transact-SQL ScriptDom: Sitecore 9 Pre-requisites

Source: Sitecore Community

Sitecore 9 Pre-Requisites

The following post will focus on the pre-requisites required for installing Sitecore 9 along with xConnect.

These should be applicable with Sitecore 9 Update 1 and Sitecore 9 Update 2 installation as well

This post is applicable for Windows 10 Environment and we will be generating a few Self Signed Certificates for our installation using Windows 10.

Here are the tools required:

  • Visual Studio 2015 or Higher
  • .Net Framework 4.6.2
  • SQL Version 2016 SP1 (Any version lower will cause issues with xConnect)
  • SOLR 6.6.2 (Sitecore recommended)
  • IIS Enabled
  • Web Platform Installer (WebPi 5.0)
  • Web Deploy 3.6
  • Microsoft SQL Server Data-Tier Application Framework (DACFx)

Let go through the prerequisites one by one.

Visual Studio

If you are installing sitecore for development puposes, you can get the latest version of Visual Studio Community (currently 2017) from Microsoft using a Developer Account.

Visual Studio 2017 Download

.Net Framework 4.6.2

You can download it directly from Microsoft

.Net Framework 4.6.2 Download

SQL Server 2016

Just like Visual Studio, for development purposes, you can get the SQL Server directly from Microsoft using a developer's account.

Microsoft SQL 2016 Download

Note: MS SQL Express has a limitation on the database size you can restore (10 GB). The MS SQL Developer Edition however does not have any such limitation.

SOLR 6.6.2

You can download SOLR 6.6.2 from Apache Archive

SOLR 6.6.2 Download

IIS Enabled

IIS is disabled by default in Windows 10. If you have not enabled IIS before, follow the steps below:

  • In Windows, access the Control Panel and click Add or Remove Programs.
  • In the Add or Remove Programs window, click Add/Remove Windows Components.
  • Select the Internet Information Services (IIS) check box, click Next, then click Finish.

Web Platform Installer (WebPi 5.0)

You can download the Web Platform Installer from Microsoft Website

Web Platform Installer 5.0 Download

Web Deploy 3.6

You can download Web Deploy 3.6 from Microsoft

Web Deploy 3.6 Download

Microsoft SQL Server Data-Tier Application Framework (DACFx)

You can download DACFx from Microsoft

 

Microsoft SQL Server Data-Tier Application Framework Download

“Error: .NET SqlClient Data Provider Msg 12809” You must remove all users with password before setting the containment property to NONE.

This is another issue that I faced initially while installing Sitecore 9.

Details: You must remove all users with password before setting the containment property to NONE.

Solution

In my case, this issue was related to incomplete or corrupt databases with the sitename already being present in SQL. This occurred because there was an error while I was installing Sitecore 9 earlier. So always check for existing databases before installing a new instance of Sitecore 9.

Check out our guide to uninstall Sitecore 9 instance: Uninstalling Sitecore 9

Source: Sitecore Community

Unable to parse [resolvepath(parameter(‘Package’))] – Exception calling “InvokeWithContext” with “2” argument(s)

This is one of the errors that I got while installing Sitecore 9 for the first time. Even after following the Sitecore 9 Installation guide step by step, I was getting the following Error

[---------------------------------------------- InstallWDP : WebDeploy -----------------------------------------------]
Install-SitecoreConfiguration : Unable to parse [resolvepath(parameter('Package'))] - Exception calling
"InvokeWithContext" with "2" argument(s): "The running command stopped because the preference variable
"ErrorActionPreference" or common parameter is set to Stop: Illegal characters in path."
At C:\resourcefiles\install.ps1:43 char:1
+ Install-SitecoreConfiguration @xconnectParams
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration

[TIME] 00:00:06
Transcript stopped, output file is C:\resourcefiles\xconnect-xp0.180628.log
GetConfigFunctionResult : Unable to parse [resolvepath(parameter('Package'))] - Exception calling "InvokeWithContext"
with "2" argument(s): "The running command stopped because the preference variable "ErrorActionPreference" or common
parameter is set to Stop: Illegal characters in path."
At C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.2.1\Private\JsonConfiguration.ps1:182 char:20
+ ... return GetConfigFunctionResult -FunctionText $InputObject -Param ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,GetConfigFunctionResult

Solution

This issue was related to the format of the name of the package defined in the install.ps1 file. In my case, the package name was coming in two lines

Package Name Incorrect

instead of

Fixing this resolved my isssue. Listed below are some other reasons that might cause this:

  • When copying the install.ps1 script from the documentation, there were fancy quotes that had to be replaced with regular quotes
  • When copying the install.ps1 script from the documentation, make sure your "Package" lines for the Sitecore...sxwdp..zip files are on ONE line
  • If you put a special character in your password, use single quotes

Source: Sitecore Community

Setting Up SSL using Self Signed Certificate in Powershell

While installing Sitecore 9, I faced some issues while enabling SSL on the instance. I found few tutorials that explained how it can be done. The process included multiple steps, so I decided to write a powershell script to make it simple.

Just provide the Host Name and Website Name in IIS and the script will take care of:

  1. Creating a new Self Signed Certificate.
  2. Moving Certificate from Personal to Root Store.
  3. Adding 443 binding to the website in IIS.

Sources used:

Copying Certificate from one Store to Another

Setting Up SOLR with SSL in Windows 10

If you are trying to install Sitecore 9, you need to setup SOLR server and all the transfer of data between Sitecore and SOLR has to be secure.

This guide will help you setup SOLR with SSL on Windows 10 Device. We are using Powershell to create a Self Signed Certificate for SSL.

Getting SOLR 6.6.2

SOLR 6.6.2 is Sitecore recommended version of SOLR for Sitecore 9.

You can get it from SOLR Archive

SOLR 6.6.2 Download

Creating Certificates

  • Install latest version of Java Runtime Environment (JRE) on the System.
  • Make sure JAVA_HOME variable is setup in System Variables
  • Run the following command in Powershell as Administrator
  • Search for "Manage Computer Certificates" in start Menu
  • Open the Personal → Certificates node on the left pane, and right click on the newly created certificate.
  • Copy the certificate to Trusted Root Certification Authorities/Certificates
  • On the pop-up menu, select All Tasks → Export...:
    1. On the second wizard screen, select "Yes, export the private key" and click Next.
    2. Make sure only the "Include all certificates in the certification path if possible" option is selected, and click Next.
    3. Check the "Password" checkbox, and enter (and confirm) a password. Take note of this password. For this example we will use "secret". Click Next.
    4. Select a location to create the PFX file, give it a name (for this example, "solr_ssl.pfx") and click Next to finish the wizard.

Installing SOLR

  • Unzip the Solr installation file to get the Solr-xxx Folder. where xxx is Solr version. Note: Sitecore recommends v6.6.2 for Sitecore 9
  • Copy this Solr-xxx folder to some simple directory like C:/
  • We should not have Solr folder setup as C:/Solr-xxx.
  • Copy the solr_ssl.pfx created in the last step to this folder.
  • In a text editor, open the C:\Solr-xxx\bin\solr.in.cmd file and uncomment the following section:
  • Replace this section with the following code
  • Make sure to C:/solr-xxx is replaced with the path of the folder where Solr is installed
  • Test the Solr installation by running the following command in the Command Prompt:
  • Navigate tho https://localhost:8983 in Web browser, no Privacy warning should be thrown
  • Stop Solr in the Command Prompt by pressing Ctrl-C
  • Follow this guide Installing Solr as a service using NSSM to install Solr as a Windows Service

Sitecore 9 Installation

The following guide will focus on a local XP0 development environment (Sitecore with xDB and xConnect).

Pre-requisites

Here are the tools required for Sitecore 9 Installation:

  • Visual Studio 2015 or higher targeting .NET Framework 4.6.2
  • .Net Framework 4.6.2
  • SQL Version 2016 SP1 (Any version lower will cause issues with xConnect)
  • SOLR 6.6.2 (Sitecore recommended)
  • IIS Enabled
  • Web Platform Installer (WebPi 5.0)
  • Web Deploy 3.6
  • Microsoft SQL Server Data-Tier Application Framework (DACFx)

Follow our guide at http://techknowhow.net/sitecore-9-1-whats-new/ to get the pre-requisites.

SQL Setup

We need to setup SQL Server to make it work seamlessly with Sitecore 9

  • Enabling Contained Database Authentication: Run the following query on Master database in SSMS
  • Enable Mixed Mode Authentication:
    • In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
    • On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
    • In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
    • In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.

SOLR Setup

Sitecore 9 also requires SOLR to be setup using SSL certificate before installation.

Please follow our guide at Setting up SOLR with SSL to setup SOLR using SSL Certificate

Certificate Generation

Note: This step is only applicable if you are using IIS 8.5. In case of IIS 10, Sitecore takes care of certificate generation.

We need to generate certificates for our instance for Sitecore to be secured using SSL. This is no longer an optional feature and is a must perform or all Sitecore 9 installations.

Check our guides on how to create Self Signed Certificates using Windows 10 Powershell.

Enable SSL using a Self Signed Certificate

Sitecore Installation Framework

In order to install Sitecore 9 with xConnect and xDB, we need to install Sitecore using Sitecore Installation Framework. This can be done in two ways:

  • You can download the Sitecore Fundamentals and the Sitecore Installation Framework packages from the Sitecore Downloads page – https://dev.sitecore.net.
  • Using Powershell
    • In Windows, launch PowerShell as an administrator.
    • To register the repository, in a PowerShell command line, run the following cmdlet:
      Register-PSRepository -Name SitecoreGallery -SourceLocation
      https://sitecore.myget.org/F/sc-powershell/api/v2
    • Install the PowerShell module by running the following cmdlet:
      Install-Module SitecoreInstallFramework
    • When prompted to install, press Y, and then press ENTER.

Getting Installation Files

  • Login to Sitecore Downloads Page and select the Sitecore version to install (9, 9u1 or 9u2).
  • Under Download Options For On Premises Deployment
  • Download packages for XP Single.
  • Verify that the download package contains the following files
    • [Sitecore Version] (OnPrem)_single.scwdp.zip
    • [Sitecore Version] (OnPrem)_xp0xconnect.scwdp.zip
    • [Sitecore Version](WDP XP0 packages).zip
    • XP0 Configuration files [Sitecore Version].zip

Sitecore Installation

  • Copy All the packages into a common folder (e.g. D:\Dump)
  • Copy valid Sitecore License into Dump Folder.
  • Extract all files from XP0 Configuration files [Sitecore Version].zip into the Dump Folder
  • At this point, the Dump folder should contain the following files:
    • [Sitecore Version] (OnPrem)_xp0xconnect.scwdp.zip
    • [Sitecore Version] (OnPrem)_single.scwdp.zip
    • sitecore-solr.json
    • sitecore-XP0.json
    • xconnect-createcert.json
    • xconnect-solr.json
    • xconnect-xp0.json
  • Verify the files are present.
  • Copy the script below and save to a new text file and save this file as install.ps1
  • Edit the script as per the comments and your environment
  • Open Powershell as Administrator and navigate to Dump folder.
  • Type "./install.ps1" and press Enter
  • Sitecore Installation should begin now

Got any errors during installation? Head over to Sitecore 9 Installation Issues to check some common issues or Leave a comment.

 

Cheers!