JSON serialization or desecialization error in Umbraco 7.1.6
Hi
I have the requirement to use the JSON string for data operation but it's every time giving below error
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
I have followed the steps from below link but getting above error.
JSON serialization or desecialization error in Umbraco 7.1.6
Hi
I have the requirement to use the JSON string for data operation but it's every time giving below error
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
I have followed the steps from below link but getting above error.
http://24days.in/umbraco/2013/6-easy-configuration-tweaks/
Can anyone please help as it's really urgent !
Thanks
Rohan
Hi Rohan,
That is the correct way to set the max length for the ASP.NET built in JavaScriptSerializer for web services.
You might need to set it on your own serializer, e.g.
Jeavon
Comment author was deleted
Thanks Jeavon for Reply,
But i got error when calling from Jquery to Controller using ajax Post method.
please see the below example.
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
url: DataURL,
dataType: "html",
data: '{"Image64":"' + Image64 + '"}',
async: false,
success: function (data) {
debugger;
data = data.substring(1, data.length - 1);
loadSecondPart(data);
$('#imgConfirmOrder').css('display', 'none');
//do process.
},
error: function (xhr, ajaxOptions, throwError) {
alert("Please try later!");
return "";
}
});
}
Is there any solution.
Thnaks
Harshil
Hi Harshil,
Is this the same issue as Rohan?
What are you posting to and what is Image64?
Jeavon
is working on a reply...