I have a web service returning some Json stuff to my iPhone application and it works fine as long as the amount of returned data is kind of small but if I increase the amount of data that is returned the application is not able to process it. Is there a way to solve this, can't possibly be a limit of 218KB...?
This is my current code:
[WebService(Namespace = "http://mydomain.com/webservicesfeed")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class feedPerson : System.Web.Services.WebService
{
[WebMethod(BufferResponse = false)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<Person> getData()
{
List<Person> res = new List<Person>();
res = searchPerson("32.8762", "13.1875");
return res;
}
}
If I call the web service throw jQuery it also fails so I guess the problem is at the web service..
This is the jQuery code I used to try it out:
<script type="text/javascript">
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8;",
url: "http://mydomain.com/feedPerson.asmx/getData",
dataType: "json",
success: function (data, textStatus, jqXHR) {
alert(data.d[0]);
},
error: function (jqXHR, textStatus, errorThrown) {
alert("Fail");
}
});
</script>
How could this be solved?