0

Hello i have a webservice which response a json string to user and have set to max size of serialize the object.

WebClient webClient = new WebClient();
        byte[] buffer = webClient.DownloadData(url);

        PhotoData p1 = new PhotoData();
        p1.data = Convert.ToBase64String(buffer);

        JavaScriptSerializer js = new JavaScriptSerializer();
        js.MaxJsonLength = Int32.MaxValue;
        string strJSON = js.Serialize(p1);

        return strJSON;

I can use the browser to try out the webservice and get the xml response correctly.. When I called using $.ajax i have an error saying about the maximum size of json reach. Do I have to set something on the $.ajax part?

chridam
  • 100,957
  • 23
  • 236
  • 235
LittleFunny
  • 8,155
  • 15
  • 87
  • 198

0 Answers0