How to increase JSON response length in ASP.Net

 JSON     sbo     Updated on Nov 03, 2014     VIKRAM     205   

Introduction:

In this article i will explain how to increase JSON response length in ASP.Net.

Description:

In previous articles i explained the basics of JSON. Now i will explain how to  increase JSON response length in ASP.Net.

Open web.config

Add the following lines in <configuration> block

<configuration>
    .
    .
    .
    <system.web.extensions>
        <scripting>
            <webServices>
                <jsonSerialization maxJsonLength="20971520"/>
                <!-- 20971520 = 20MB-->
            </webServices>
        </scripting>
    </system.web.extensions>
</configuration>

Here it will return upto 20MB of data.

  Related Articles
ASP.Net: ListView Basics - ItemEditing, ItemUpdating and ItemCanceling events
C#: How to Query for characters in a string using LinQ.
SQL Server: Date Formats
JSON - Basics
  Recent Articles
ASP.Net: ListView Basics - ItemEditing, ItemUpdating and ItemCanceling events
C#: How to Query for characters in a string using LinQ.
SQL Server: Date Formats
JSON - Basics