jquery - asp mvc 2 return json result -


trying return dictionary jsonresult, number of elements in dictionary > 3.6k; code:

$('#go').click(function () {       $("#content").empty().html('<img src="content/loading.gif" style="top:100px;left:100px;"/>');       $.ajax({           type: 'post',           url: '<%= url.action("loadcontent","home") %>',           async: true,           data: {               block: $('input[name=block]:checked').attr('value'),               type: $('input[name=type]:checked').attr('value'),               begin: $('#begindate').attr('value') + " " + $('#begintime').attr('value'),               end: $('#enddate').attr('value') + " " + $('#endtime').attr('value')           },           datatype: 'json',           success: function (response) {               alert(response);               $.plot($("#content"), repsonse);           }       });   }); 

and server side:

public jsonresult loadcontent(string block,string type,string begin,string end) {         list<finalresult> result = core.letthepartybegin(datetime.parse(begin), datetime.parse(end), block);         dictionary<datetime, double> returnvalue = new dictionary<datetime, double>();         result.foreach(p =>             p.result.foreach(q => returnvalue.add(p.datetime + new timespan(0, 0, q.number), q.w)));         return json(returnvalue);     } 

so, json(returnvalue) contains 3600 values, , i'm getting error 500 internal server error; if set json(returnvalue.take(100)) works. there constraint on size of jsonresult?

there max size ajax response. (i'm not sure think it's 4m)

maybe intended response might larger maximum. explain why works when return subset smaller max size.

check detailed error message


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -