Error while encrypting connection strings

  • Encrypting the connection strings from the \App_Config\ConnectionStrings.config file in Sitecore XP 9.3 Initial Release may not work when following the procedure defined for Sitecore XP 9.2 Initial Release.  The following error can appear in the log records:

    Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
    Administration utility to install and uninstall ASP.NET on the local machine.
    Copyright (C) Microsoft Corporation. All rights reserved.
    Encrypting configuration section...
    An error occurred loading a configuration file: Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified. (F:\website\som-dev.rightpoint.com\App_Config\ConnectionStrings.config)

    Could not load file or assembly 'Microsoft.Configuration.ConfigurationBuilders.Environment, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

    Starting from Sitecore XP 9.3.0, the Microsoft configuration builder feature is used out-of-the-box to provide a more flexible configuration (https://docs.microsoft.com/en-us/aspnet/config-builder)The error occurs because the ASPNET_REGIIS tool fails due to missing dll-files. 

  • To resolve the issue, you can copy the Microsoft.Configuration.ConfigurationBuilders.Environment.dll and Microsoft.Configuration.ConfigurationBuilders.Base.dll files from the Sitecore XP \bin folder to the C:\Windows\Microsoft.NET\Framework64\<version> folder.
    If you have related questions, we recommend you contact Microsoft support.

Applies to:

CMS 9.3+

April 13, 2020
April 13, 2020

Reference number:

397064