Ana Sayfa / Programlama / Asp.Net / Can I set an unlimited length for maxJsonLength in web.config?

Can I set an unlimited length for maxJsonLength in web.config?

Exception information:
Exception type: InvalidOperationException 
Exception message: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

Solution

<configuration> 
   <system.web.extensions>
       <scripting>
           <webServices>
               <jsonSerialization maxJsonLength="50000000"/>
           </webServices>
       </scripting>
   </system.web.extensions>
</configuration>