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
Coveo for Sitecore (October 2016)
Coveo for Sitecore (December 2016)
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.config
file. It’s usually located under<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\Coveo
.While you’re usually discouraged from modifying the
Coveo.SearchProvider.config
file, for this procedure, to reduce the risk of unforeseen upgrade bugs, you’re encouraged to modify theCoveo.SearchProvider.config
file over theCoveo.SearchProvider.Custom.config
file. -
In the
defaultIndexConfiguration
node, 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.