This is a migrated thread and some comments may be shown as answers.

Telerik Report Viewer on ASP.NET WEB FORM (aspx page)

1 Answer 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Swei
Top achievements
Rank 1
Swei asked on 19 Apr 2018, 01:18 PM

I'm trying to display a Telerik Report Viewer on ASP.NET WEB FORM (aspx page) and keep getting this error.

My Newtonsoft.Json is the latest version 11.

Please help.

Server Error in '/' Application.

Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] Telerik.ReportViewer.Html5.WebForms.ReportViewer.DeserializeViewerState() +0 Telerik.ReportViewer.Html5.WebForms.ReportViewer.UpdateViewer() +31 Telerik.ReportViewer.Html5.WebForms.ReportViewer.OnInit(EventArgs e) +16 System.Web.UI.Control.InitRecursive(Control namingContainer) +139 System.Web.UI.Control.InitRecursive(Control namingContainer) +312 System.Web.UI.Control.InitRecursive(Control namingContainer) +312 System.Web.UI.Control.InitRecursive(Control namingContainer) +312 System.Web.UI.Control.InitRecursive(Control namingContainer) +312 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2633.0

1 Answer, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 14 May 2018, 01:40 PM

I'm no expert at this but I think you have to change the version number in your web.config file. Mine looks like this.

<dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad5fe6b2a6eeda" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>

You need to change the Version number to whatever version you are using.

Tags
General Discussions
Asked by
Swei
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Share this question
or