Unable to cast object of type 'System.String' to type 'Sitecore.Analytics.Reporting.ReportDataProvider'
The error occurs because Sitecore is trying to connect to the master Db and is getting a failure because it is not accessible. I suspect that SQL is returning a string error message instead of the expected object.
If you open up the SwitchMasterToWeb.config and comment out the following block it will resolve the issue:
<reporting> <dataprovider> <datasources> <add key="collection"> <filtersfactory> <param desc="definitionDatabaseName" />web </filtersfactory> </add> <add key="reporting"> <filtersfactory> <param desc="definitionDatabaseName" />web </filtersfactory> </add> </datasources> </dataprovider> </reporting>
In our project we have commented out this reporting section on a cd server, but still we are getting the exception as
ReplyDeleteException: System.InvalidCastException
Message: Unable to cast object of type 'System.String' to type 'Sitecore.Analytics.Reporting.ReportDataProviderBase'.
Source: Sitecore.Forms.Core
at Sitecore.Forms.Core.Dependencies.DefaultImplFactoryObjectsProvider.CreateObject[T](String configPath, Boolean assert)
at Sitecore.WFFM.Analytics.Dependencies.ReportDataProviderWrapper.GetReportDataProviderBase(Boolean assert)
at Sitecore.WFFM.Analytics.Providers.AnalyticsFormsDataProvider..ctor(ReportDataProviderWrapper reportDataProviderWrapper, ILogger logger, IAnalyticsTracker analyticsTracker, ISettings settings)
Hi Jeyanth, what version of Sitecore are you using?
Delete