This is a migrated thread and some comments may be shown as answers.
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'
3 Answers 162 Views
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 04 Jul 2018, 04:26 PM

Hello, I'm trying to update the version of Telerik reports in my app by following the documentation steps:

https://docs.telerik.com/reporting/installation-upgrading-newer-version#old-projects-manual-upgrade .

.. however, after generating the .trdx file, when I try to render the file in html it shows the error:

    "The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'."

I have not found a solution to this in the documentation yet, could you help me?

 

 


3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 09 Jul 2018, 10:17 AM
Hi Marcel,

The error may be related to the version of Newtonsoft.Json referred in the project.
Note that starting with Telerik Reporting R2 2018 (12.1.18.516), the required version of Newtonsoft.Json is 9.0.1 or later, as compared to 4.5.11.15520 or later before.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nathan
Top achievements
Rank 1
answered on 12 Jul 2018, 07:11 PM

We are having the same issue since the upgrade.  Our report server is erroring out with the message below:

{"Message":"An error has occurred.","ExceptionMessage":"The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.","ExceptionType":"System.InvalidOperationException","StackTrace":null,"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Entry point was not found.","ExceptionType":"System.EntryPointNotFoundException","StackTrace":" at Newtonsoft.Json.Serialization.IContractResolver.ResolveContract(Type type)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe(Object value)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)\r\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)\r\n at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)\r\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\r\n at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\r\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)\r\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.GetResult()\r\n at System.Web.Http.WebHost.HttpControllerHandler.d__22.MoveNext()"}}

0
Todor
Telerik team
answered on 17 Jul 2018, 02:52 PM
Hello Nathan,

The issue should be resolved after updating the Newtonsoft.Json NuGet package to version 9.0.1.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Marcel
Top achievements
Rank 1
Answers by
Todor
Telerik team
Nathan
Top achievements
Rank 1
Share this question
or