actually i create a one webservice who get all data from the table. approximately in a table there are more than 200000 record is there. i already set my maxjasonlength property to 500000000. still i am getting that error please help me.
It could be that all the values in every column together with column names and other JSON related things are over the maximum limit of 500 million. When you generate Json inside the web service using Length property of string and/or StringBuilder objects
to get the size of the string can help you figure out whether you are sending more then it is set by maximum. One thing that I wanted to ask was why do you send 200,000 records back to the client? This is such a burden. Why not implement paging with LINQ and
let the user send page size and current page to your web service and send only what is necessary. Imaging 100 users making a request to this service. It's a burden.
I think it would be easier if you build a table dynamically. You can then style the table using jQuery to apply certain color to odd and even rows, etc. As for the scrollbar, if I understood you correctly, you need to have a parent DIV tag that has certain
fixed width and height. When you add table that is larger than the DIV size it will enable scrollbars.
I think it would be easier if you build a table dynamically. You can then style the table using jQuery to apply certain color to odd and even rows, etc. As for the scrollbar, if I understood you correctly, you need to have a parent DIV tag that has certain
fixed width and height. When you add table that is larger than the DIV size it will enable scrollbars.
sameernbhatt
Member
10 Points
14 Posts
error is getting maxjasonlength
Aug 17, 2011 07:25 AM|LINK
hi,
actually i create a one webservice who get all data from the table. approximately in a table there are more than 200000 record is there. i already set my maxjasonlength property to 500000000. still i am getting that error please help me.
Thanks sameer.
Huske
Contributor
4060 Points
756 Posts
Re: error is getting maxjasonlength
Aug 17, 2011 07:35 AM|LINK
It could be that all the values in every column together with column names and other JSON related things are over the maximum limit of 500 million. When you generate Json inside the web service using Length property of string and/or StringBuilder objects to get the size of the string can help you figure out whether you are sending more then it is set by maximum. One thing that I wanted to ask was why do you send 200,000 records back to the client? This is such a burden. Why not implement paging with LINQ and let the user send page size and current page to your web service and send only what is necessary. Imaging 100 users making a request to this service. It's a burden.
Regards,
Huske
sameernbhatt
Member
10 Points
14 Posts
Re: error is getting maxjasonlength
Aug 17, 2011 07:43 AM|LINK
Hi Huske,
Thanks for the reply, but actually i am dynamically generated div tag and put all the data in div tag.like this
function ShowResult(data) {
var jsonObj = (new Function("return( " + data.d + " );"))();
var _html = '';
i = 0;
$.each(jsonObj, function (i, tweet) {
_html += '<div class="row">';
_html += '<div class="citem1" id="ciditem1" style="width:89px;">';
_html += jsonObj[i][0];
_html += '</div>';
_html += '<div class="citem2" id="ciditem2" style="width:42px;">';
_html += jsonObj[i][1];
_html += '</div>';
_html += '<div class="citem3" id="ciditem3" style="width:64px;">';
_html += jsonObj[i][2];
_html += '</div>';
_html += '<div class="citem4" id="ciditem4" style="width:30px;">';
_html += jsonObj[i][3];
_html += '</div>';
_html += '<div class="citem5" id="ciditem5" style="width:52px;">';
_html += jsonObj[i][4];
_html += '</div>';
_html += '<div class="citem6" id="ciditem6" style="width:59px;">';
_html += jsonObj[i][5];
_html += '</div>';
_html += '<div class="citem7" id="ciditem7" style="width:47px;">';
_html += jsonObj[i][6];
_html += '</div>';
_html += '<div class="citem8" id="ciditem8" style="width:63px;">';
_html += jsonObj[i][7];
_html += '</div>';
_html += '<div class="citem9" id="ciditem9" style="width:75px;">';
_html += jsonObj[i][8];
_html += '</div>';
_html += '<div class="citem10" id="ciditem10" style="width:59px;">';
_html += jsonObj[i][9];
_html += '</div>';
_html += '<div class="citem11" id="ciditem11" style="width:91px;">';
_html += jsonObj[i][10];
_html += '</div>';
_html += '<div class="citem12" id="ciditem12" style="width:49px;">';
_html += jsonObj[i][11];
_html += '</div>';
_html += '<div class="citem13" id="ciditem13" style="width:112px;">';
_html += jsonObj[i][12];
_html += '</div>';
_html += '<div class="citem14" id="ciditem14" style="width:43px;">';
_html += jsonObj[i][13];
_html += '</div>';
_html += '<div class="citem15" id="ciditem15" style="width:59px;">';
_html += jsonObj[i][14];
_html += '</div>';
_html += '<div class="citem16" id="ciditem16" style="width:32px;">';
_html += jsonObj[i][15];
_html += '</div>';
_html += '<div class="citem17" id="ciditem17" style="width:47px;">';
_html += jsonObj[i][16];
_html += '</div>';
_html += '<div class="citem18" id="ciditem18" style="width:77px;">';
_html += jsonObj[i][17];
_html += '</div>';
_html += '<div class="citem19" id="ciditem19" style="width:auto;">';
_html += jsonObj[i][18];
_html += '</div>';
_html += '</div>';
i = i + 1;
});
document.getElementById('divTable').innerHTML = _html;
$("#divLoading").hide();
}
Huske
Contributor
4060 Points
756 Posts
Re: error is getting maxjasonlength
Aug 17, 2011 03:12 PM|LINK
I think it would be easier if you build a table dynamically. You can then style the table using jQuery to apply certain color to odd and even rows, etc. As for the scrollbar, if I understood you correctly, you need to have a parent DIV tag that has certain fixed width and height. When you add table that is larger than the DIV size it will enable scrollbars.
Huske
Contributor
4060 Points
756 Posts
Re: error is getting maxjasonlength
Aug 17, 2011 03:12 PM|LINK
I think it would be easier if you build a table dynamically. You can then style the table using jQuery to apply certain color to odd and even rows, etc. As for the scrollbar, if I understood you correctly, you need to have a parent DIV tag that has certain fixed width and height. When you add table that is larger than the DIV size it will enable scrollbars.
bruce (sqlwo...
All-Star
36894 Points
5452 Posts
Re: error is getting maxjasonlength
Aug 17, 2011 05:35 PM|LINK
this is such a bad idea. hopefully your users have lots of patience. it could takes minutes to load, and the browser may have troubles displaying.
if you don't want paging, then you need a virtual grid.
sameernbhatt
Member
10 Points
14 Posts
Re: error is getting maxjasonlength
Aug 18, 2011 04:50 AM|LINK
how can i create a virtual grid?
Please help me to develop this thing.