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

2 posts, 0 answers
  1. Swei
    Swei avatar
    1 posts
    Member since:
    Apr 2018

    Posted 19 Apr 2018 Link to this post

    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

  2. John
    John avatar
    6 posts
    Member since:
    Mar 2018

    Posted 14 May 2018 in reply to Swei Link to this post

    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.

Back to Top