Sitecore Connect for Content Hub: Setup and Troubleshooting
Sitecore Content Hub is truly a standalone digital asset management (DAM) platform, with additional functionality such as CMP. The power of this platform can be integrated with Sitecore via “Sitecore Connect”. This article provides the materials and guidance to use and troubleshoot connecting Sitecore and Sitecore Content Hub.
Contents
- 1 Which Connector Version Do I Need?
- 2 Configure the DAM and CMP Modules
- 3 Troubleshooting Sitecore Connect Issues
- 3.1 Could not load file or assembly ‘System.Diagnostics.DiagnosticSource | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
- 3.2 Could not load file or assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory’ | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
- 3.3 Could not load file or assembly ‘Microsoft.Extensions.Caching.Abstractions’ or ‘Microsoft.Extensions.Caching.Memory’ | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
- 3.4 Could not load file or assembly ‘Polly’
- 3.5 Troubleshooting issues in Sitecore PaaS
Which Connector Version Do I Need?
Sitecore has published a version table of the Sitecore Connector… but here is where it gets tricky. There is a Sitecore Connect for Content Hub, Sitecore Connect for Sitecore CMP, and Sitecore Connect for Sitecore DAM. Here is the version table: Support Information – Sitecore Connect™ for Content Hub compatibility table
So given the options, which one do you choose??? Go with the Sitecore Connect for Content Hub as it includes modules for CMP And DAM. While the connectors need to be configured separately, this provides you overall connect engine supporting the modules. Depending on your Content Hub and Sitecore version using the version table from above to download the correct Sitecore Connect for Content Hub here: Sitecore Downloads: Sitecore Connect for Content Hub
In fact, the StyleLabs documentation for Content Hub state “For SC 9.1.1, 9.3, 10.0, and 10.1 you should use the Content Hub connector“
Configure the DAM and CMP Modules
Once you install Sitecore Connect for Content Hub, you need to configure the individual modules depending on if you are using DAM, CMP or both. Each module configuration is an involved process, with CMP being more complex due to the nature of the workflows and functionality of CMP versus the insert focus of DAM.
Per Sitecore, the differences between each module are as follows:
The Sitecore CMP section in SCCH enables you to work with content created in Sitecore Content Hub directly in Sitecore. Content is automatically created and updated when changes are made in Sitecore Content Hub.
The Sitecore DAM section in SCCH enables you to browse, search, and insert digital assets from Sitecore DAM directly from within Sitecore’s Content and Experience editing.
Sitecore Connect for Content Hub
The CMP module architecture is quite involved and leverages Sitecore, Sitecore Content Hub, and Azure Service Bus for its communications.
This is largely due to CMP being:
A Content Marketing Platform allows the planning, authoring, collaboration, curation and distribution of the different content types that drive the execution of a content marketing strategy while allowing campaign management. CMP is a central hub providing an overall view of all content and how it is performing.
Introduction | Sitecore Content Hub Documentation (stylelabs.com)
Comparing that to the DAM module, which is focused to insertion of content from Content Hub, and you can see why there are more configuration steps for the CMP module. As such, it’s imperative to closely follow the steps in the installation guide for each module to ensure it is connecting and functioning as expected.
Troubleshooting Sitecore Connect Issues
Given the amount of configuration for the modules and the composable nature that requires networking allowances (ex. CORS), issues can arise when using Sitecore Connect. The more common ones are as follows:
Could not load file or assembly ‘System.Diagnostics.DiagnosticSource | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
If you get the Could not load file or assembly ‘System.Diagnostics.DiagnosticSource, Version=4.0.2.0’ exception, do the following:
1. In the web.config file, add the following bindingRedirect tag:
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource"
publicKeyToken="cc7b13ffcd2ddd51"
culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1"/>
</dependentAssembly>
2. Run the installation again.
Could not load file or assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory’ | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
If you get the Could not load file or assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory’ exception:
1. In the web.config file, check that the following bindings exist:
<dependentAssembly>
<assemblyIdentity
name="Microsoft.IdentityModel.Clients.ActiveDirectory"
publicKeyToken="31bf3856ad364e35"
culture="neutral"
xmlns="urn:schemas-microsoft-com:asm.v1" />
<bindingRedirect
oldVersion="0.0.0.0-3.19.3.10102"
newVersion="3.17.2.31801"
xmlns="urn:schemas-microsoft-com:asm.v1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity
name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform"
publicKeyToken="31bf3856ad364e35"
culture="neutral"
xmlns="urn:schemas-microsoft-com:asm.v1" />
<bindingRedirect
oldVersion="0.0.0.0-3.19.3.10102"
newVersion="3.17.2.31801"
xmlns="urn:schemas-microsoft-com:asm.v1" />
</dependentAssembly>
2. Add any missing bindings to the web.config file.
3. Run the installation again.
Could not load file or assembly ‘Microsoft.Extensions.Caching.Abstractions’ or ‘Microsoft.Extensions.Caching.Memory’ | Source: https://sitecoredev.azureedge.net/~/media/3662E8C142F4401FB9DD6C986FC0BC02.ashx?date=20220428T160837
If you get the “Could not load file or assembly‘Microsoft.Extensions.Caching.Abstractions’ or ‘Microsoft.Extensions.Caching.Memory’ exception:
1. In the web.config file, verify that the following bindings exist:
<dependentAssembly>
<assemblyIdentity
name="Microsoft.Extensions.Caching.Abstractions"
publicKeyToken="adb9793829ddae60"
culture="neutral"/>
<bindingRedirect
oldVersion="0.0.0.0-3.1.5.0"
newVersion="3.1.5.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity
name="Microsoft.Extensions.Caching.Memory"
publicKeyToken="adb9793829ddae60"
culture="neutral"/>
<bindingRedirect
oldVersion="0.0.0.0-3.1.5.0"
newVersion="3.1.5.0"/>
</dependentAssembly>
2. If any of the bindings are missing, add them to the web.config file, and run the installation again.
3. Check if the bin folder contains the Microsoft.Extensions.Caching.Abstractions.dll file. If it does not, download the correct version of the file from https://www.nuget.org, and paste it into the bin folder.
Could not load file or assembly ‘Polly’
If you get the Could not load file or assembly ‘Polly’ exception, use this KB to resolve the issue as it may be a conflict with other connectors such as Salesforce: Known Issues – “Could not load file or assembly Polly” error after installing CMP connector (sitecore.com)
Troubleshooting issues in Sitecore PaaS
If leveraging Sitecore PaaS, review the following article if issues arise: Troubleshooting issues after the deployment of the Sitecore Connect for Content Hub 5.0.0 in PaaS environment