Is there a maximum size of a json response?

Is there a maximum size of a json response?

gWatkinsgWatkins Posts: 11Questions: 5Answers: 0

I am using client side processing with ajax. My ajax url points to an asp page that creates a json response that was created from an sql record set array. The problem I am having is if the recordset is over a certain number of records (7321 to be exact) then I don't get back a json response at all. I thought at first it was a problem with a particular record so I deleted some of the records but still same cut-off limit. I am running on IIS7 and I see the same results with IE11 and Chrome. Chrome debug shows no response data. I have confirmed that the json string is being created on the server by writing it to a log file before it is sent back. I think I am exceeding some type of response limit. The log file that shows the json string is about 8MB in size. Any suggestions would be greatly appreciated.

This question has an accepted answers - jump to answer

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119
    Answer ✓

    IIS does have default size limits, you might need to change that. Research this and see if it helps

      <system.web.extensions>
        <scripting>
          <webServices>
            <jsonSerialization maxJsonLength="1024000" />
          </webServices>
        </scripting>
      </system.web.extensions>
    
  • gWatkinsgWatkins Posts: 11Questions: 5Answers: 0

    I assume that would be in the sites web.config file but I don't see that entry. I will keep looking. Thanks.

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    No, its at a lower level than site. We had to add it.

    We use one web site with multiple web applications within. It is added at that level.

  • gWatkinsgWatkins Posts: 11Questions: 5Answers: 0

    My application is running under the default website. Where is the web.config for the default website?

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    did you look in inetpub of the web server?

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    acutally, you can add a web config and any level. If you put it in the directory where your asmx files are, it will only apply to those files.

  • gWatkinsgWatkins Posts: 11Questions: 5Answers: 0

    I found it. It was hidden. Thanks.

This discussion has been closed.