Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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


$.ajax({
           type: "POST",
           url: "/account/UploadServiceFilesAttachment",
           data: JSON.stringify({ OfferObj: $data }),
           contentType: "application/json; charset=utf-8",
           datatype: "json",
           success: function (result) {
               $service.AddServiceAttachment(result.Fullpath);
               dfd.resolve(result);
               return dfd.promise();
           },
           error: function (er) {

               var _er = er;
               return dfd.promise();
           }
       });


not able to send large image file to the controller through json.

What I have tried:

i have changed in web config 
<pre>   <jsonSerialization maxJsonLength="1073741824" />

but its not woking for me .
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900