Error during serialization or deserialization using the JSON JavaScriptSerializer

Hello,

With certain files I get that error:

Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Parameter name: input

given that in my web.config I have the following:

it doesn't even go inside the controller in the backend.
Kindly note that I use vue.js for the frontend.

Thanks,

1 Reply 1 reply marked as answer

DM Dhivyabharathi Mohan Syncfusion Team February 8, 2021 01:17 PM UTC

Hi Omar, 
 
Thanks for contacting Syncfusion support.  
 
Our PDF Viewer control is client-server based. So we send the data as JSON object between client and server. We suspect that the reported issue occurs due to the serialization of the large-sized JSON object.  
 
We need to increase the maximum length for serializing the large-sized JSON object.  
 
We have created a sample for the same, where a class is added (LargeJsonValueProviderFactory). Also, the code is modified to increase the length for serialization in the file LargeJsonValueProviderFactory.cs.  
 
Kindly download the sample from the following link. 
  
 
 
Regards, 
Dhivya. 


Marked as answer
Loader.
Up arrow icon