0

I'm running through the getJSON javascript jquery (1.8.3) command to call a routine MCV C #. The routine in C # returns the data, however I can not obtain them in return getJson. This does not happen if I limit the amount of data returned. Does anyone know if it is problem of limitation of bytes transferred?

Follows the code I'm using:

JQuery

function fnPesquisar(posCli) {      
   $.getJSON('/DiarioOficial/ConferenciaPesquisa()', fnPesquisarCallback);      
   return false;
}


function fnPesquisarCallback(json) {       
   $(json).each(function () {
        //...
   });             
}

C#

public JsonResult ConferenciaPesquisa()
{          
      BWF.DiarioOficial.Publicacao bwf = new BWF.DiarioOficial.Publicacao();
      return Json(bwf.Pesquisar(), JsonRequestBehavior.AllowGet);
}
Marco Araujo
  • 165
  • 1
  • 12
  • Short answer: reduce the amount of data you are transferring. Seriously though, why do you need to transfer so much data in one go? Can you not page through it? – Rory McCrossan Aug 08 '14 at 14:45
  • Is not possible because the client need to see all data for purposes of analysis and comparison between them ... Changing by a paging toranará unfeasible to analyze the User. – Marco Araujo Aug 09 '14 at 19:45

1 Answers1

0

I think this is for your GET request, try to change limitation of your GET requests by changing server setting, maybe this link helps you. Also you can change limitation of Json object by this line in your web.config

<appSettings>
  <add key="aspnet:MaxJsonDeserializerMembers" value="150000" />
</appSettings>

Or simply, change your method to POST.

Community
  • 1
  • 1
Saman Gholami
  • 3,416
  • 7
  • 30
  • 71