I use the Microsoft ASP.Net AJAX framework for an autocompletion thingy on a text field (AutoCompleteExtender).
I'm getting an error :
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
Several weird things about this error :
- the error is thrown even when every single webservice in my solution return nothing (I altered them to return empty arrays) ;
- in the web.config, jsonSerialization maxJsonLength is set to the maximum value of 2147483644, and the webservices in this page are supposed to return a few results ;
- it says the source of the error is in a javascript function, but the function is never run, so the webservice is never actually called :
- when I delete every AutoCompleteExtender and every call to any webservice from the page, it starts to throw me errors on "end if" inside the aspx. When I remove every "If" in the aspx, it crashes without telling me why. Fun !
<script type="text/javascript">
var tbEntrIdFonctionItemSelected = function(sender, e) {
$get('<%=Me.FormViewContact.FindControl("hdn_AgenceIdFonctionSearch").ClientID%>').value = e.get_value(); // source of the error
}
</script>
What do you think could be the cause of the problem ?
Thanks