I have create one json method for web service, in which method passed json object, in this object there is one list (which contain list of pdf, images). When call this method and passed pdf more than 1 Mb length, server not able to handle this request and give error with message pasted below:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
To resolved this issue, I have tried one solution like below. I have added below code in web config.
But using this I am not getting successful result. Please help me with this issue.
<httpRuntime targetFramework="4.5" executionTimeout="2400" maxRequestLength="20000"/>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647"/>
</webServices>
</scripting>