Diagnostic Page Error - Invalid cast from System.String to Coveo.Framework.Configuration.SecurityConfiguration
Diagnostic Page Error - Invalid cast from System.String to Coveo.Framework.Configuration.SecurityConfiguration
Symptoms
On a Sitecore instance where the SwitchMasterToWeb.Coveo.config file is activated, you get the following error in the Coveo for Sitecore security provider information section of the Coveo Diagnostic Page:
This section is disabled because an unexpected error occurred (Invalid cast from 'System.String' to 'Coveo.Framework.Configuration.SecurityConfiguration'.). Resolve this error and hit the Refresh button to re-enable this section.
Cause
This error is due to the securityConfiguration node in the SwitchMasterToWeb.Coveo.config file.
Sitecore expects this node to have a type, but because it doesn’t, the indexing manager fails to load.
Resolution
The issue is fixed by adding a securityConfiguration node of the right type in one of your configuration files.
-
Open the
Coveo.SearchProvider.configfile. It’s usually located under<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\Coveo.While you’re usually discouraged from modifying the
Coveo.SearchProvider.configfile, for this procedure, to reduce the risk of unforeseen upgrade bugs, you’re encouraged to modify theCoveo.SearchProvider.configfile over theCoveo.SearchProvider.Custom.configfile. -
In the
defaultIndexConfigurationnode, after the</adminServiceConfiguration>line, before<!-- Coveo Query configuration -->, add the following:<!-- Coveo security configuration --> <securityConfiguration type="Coveo.Framework.Configuration.SecurityConfiguration, Coveo.Framework" /> -
Save and close the file.