When I am serializing using JavaScriptSerializer in wcf service it gives me below error for defined code.
Code:
DataCollection<Entity> detailqueryentityCollection = _serviceProxy.RetrieveMultiple(detailquery).Entities;
if (detailqueryentityCollection.Count > 0)
{
listdata = new JavaScriptSerializer().Serialize(detailqueryentityCollection);
}
Error:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
I also add below code in web.config but it doesn't work.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="500000000"/>
</webServices>
</scripting>
</system.web.extensions>
Please help me for solution.
*This post is locked for comments
I have the same question (0)