Monday 30 November 2015

IDataSourceFilterFactory error when using SwitchMasterToWeb.config

When configuring your content delivery servers you might well be using the SwitchMasterToWeb.config available from Sitecore.  When using this file you might find your site's analytics data stops gathering and that it generates an error like this with every page request;

Exception: System.InvalidCastException
Message: Invalid cast from 'System.String' to 'Sitecore.Analytics.Reporting.Filters.IDataSourceFilterFactory'.


Edit the SwitchMasterToWeb.config and comment out the section shown below.
    <reporting>
      <dataProvider>
        <datasources>
<!--
          <add key="item">
            <FiltersFactory>
              <param desc="definitionDatabaseName">web</param>
            </FiltersFactory>
          </add>
-->
          <add key="collection">
            <FiltersFactory>
              <param desc="definitionDatabaseName">web</param>
            </FiltersFactory>
          </add>
          <add key="reporting">
            <FiltersFactory>
              <param desc="definitionDatabaseName">web</param>
            </FiltersFactory>
          </add>
        </datasources>
      </dataProvider>
    </reporting>

Hopefully that will resolve the issue.

1 comment:

  1. Thanks very much for sharing this - helped me out a lot!

    ReplyDelete