Sorry, there was an error - Sitecore 10.4 Update installation
Sitecore recently launched the Sitecore 10.4 update 1 with important updates to 3rd party dependencies, and a roll-up of functional and security vulnerability fixes that includes SOLR upgrade to version 9.8.1, Sitecore Identity server on .NET 8, Security fixes and enhancements and resolved issue with Content Editor, Experience Editor, Publishing and Headless rendering, Language fallback, Performance and NuGet packaging.
To explore these features and improvements, I planned to install Sitecore 10.4 update 1 on a local developer machine. After successfully installing, when I log in to the Sitecore Identity server, instead of redirecting to the Sitecore instance, I encounter the following error: "Sorry, there was an error."
I have checked the log files and have not found any logs related to it. After that, I have checked the Quick Install Guide for XP Developer Workstation, which is a Guide describing how to install the Sitecore XP Single (XP0) topology on a workstation for development and testing purposes.
And in Section 2.8, Encrypted communication with SQL Server mentioned the following:
New versions of related applications might require encrypted communication with SQL Server, for example Sitecore Identity Server module version 8.0 and later, and Sitecore Publishing Service version 8.0 and later. This change is due to the adoption of a newer version of Microsoft.Data.SqlClient that enforces increased security, as described in Microsoft’s Breaking changes in EF Core 7.0 article. To configure encrypted communication with SQL Server:
- Configure an encryption certificate on SQL Server. A valid encryption certificate must be installed and configured on SQL Server to support encrypted communication. For more information refer to Microsoft’s Configure SQL Server Database Engine for encrypting connections article.
- Ensure the certificate is trusted on the server hosting the Sitecore application.
-
(Optional) Enforce the Sitecore application to use an encrypted connection
to SQL Server. Update the connection string of the Sitecore databases to add
the following parameters:
Encrypt=true;TrustServerCertificate=false;
For example:<ConnectionString>Data Source=.;Initial Catalog=Sitecore.Core;User ID=coreuser;Password=Test12345;Encrypt=true;TrustServerCertificate=false;</ ConnectionString>
This configuration ensures encrypted communication with SQL Server while enforcing strict certificate validation.
Alternate configuration: SQL Server-generated self-signed certificates
To simplify the installation process for a non-production deployment, you can skip configuring an encryption certificate for SQL Server. If the certificate is not explicitly configured, SQL Server automatically generates a self-signed certificate (fallback certificate) at startup and uses it for encryption. This approach is not recommended for production environments.
To accommodate this configuration in a Sitecore application, select one of the following approaches:
-
Disable encryption: Update the connection strings of the Sitecore databases
to include:
Encrypt=false;
-
Enable encryption but disable certificate trust validation: Update the
connection strings of the Sitecore databases to include:
Encrypt=true;TrustServerCertificate=true;
- For Identity Server 8 and above, you can specify values for the Encrypt and TrustServerCertificate parameters at the moment of the installation using the EncryptSecurityDbConnection and TrustServerCertificateSecurityDbConnection parameters defined in the IdentityServer.json file.
To conclude it, go to the {root-directory}\project-identityserver.local\Config\production and open Sitecore.IdentityServer.Host.xml file and add the following to the connection string in your local environment:
Encrypt=false;TrustServerCertificate=false;
Now the updated connection string will be
<ConnectionString>Data Source=******;Initial Catalog=xp1041_Core;User ID=securityuser;Password=**********;Encrypt=false;TrustServerCertificate=false;</ConnectionString>
After updating the connection string, restart the IIS and try again to log in, and welcome to the Sitecore local instance 10.4 Update 1.
Happy Sitecoreing 😊
Comments
Post a Comment