Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Getting error while serializing using JavaScriptSerializer in c#

$
0
0

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.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>