I am building an asp.net C# application which uses buttons to retrieve and display RDLC reports within a View. The reports load without issue on localhost but when placed on Windows Server 2012 R2 Standard 64-bit and served through IIS version 8.5 the error:
[A]Microsoft.Reporting.WebForms.ReportHierarchy cannot be cast to [B]Microsoft.Reporting.WebForms.ReportHierarchy. Type A originates from 'Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\12.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll'. Type B originates from 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll'.
Is given when the report loads. This is preventing the embedded jpg image from loading in the report.
I am using Microsoft.ReportViewer.WebForms, Version=12.0.0.0 with no reference to version 11 in the web.config, .csproj or in the default.aspx. I have trolled msdn.microsoft.com, stackoverflow, google and youtube... to no avail.
What could be causing this error and is there a fix for it?