title: maxJsonLength when consuming WCF service using Jquery
body: <p>I am working on Google Map Marker V3.User can add Map Marker and additional info and this information is stored in sql Sever database. when the map page is loaded first time I retrieved all the markers stored in DB and display them on map. for Ajax call I am using WCF and Jquery. Every thing was working fine but one day I got an error</p>
  <p>&quot;Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property&quot;.</p>
  <p>For this I increase the size of maxJsonLength as following:</p>
  <pre><code>&lt;system.web.extensions&gt;
      &lt;scripting&gt;
        &lt;webServices&gt;
          &lt;jsonSerialization maxJsonLength=&quot;5000000&quot;/&gt;
        &lt;/webServices&gt;
      &lt;/scripting&gt;
    &lt;/system.web.extensions&gt;
  </code></pre>
  <p>So for Now my application again working fine. My question is that is there any other way So that I can Increase this maxJsonLength at run time because I have to deliver this project to my client and if in future this same problem occurred this feature will stop working.
  I also found some other example on stackoverflow
  <a href="https://stackoverflow.com/questions/1151987/unlimited-for-maxjsonlength">Can I set an unlimited length for maxJsonLength in web.config?</a></p>
  <p><a href="http://codeasp.net/blogs/raghav_khunger/microsoft-net/752/exception-message-error-during-serialization-or-deserialization-using-the-json-javascriptserializer-the-length-of-the-string-exceeds-the-value-set-on-the-maxjsonlength-property" rel="nofollow noreferrer">maxjsonlength-property</a></p>
  <p>Thanks</p>