[英]how to pass large json string to web service using [webinvoke]
I have a problem passing a large JSON string to a web service from the client side with a jQuery function. 我在使用jQuery函数将大型JSON字符串从客户端传递到Web服务时遇到问题。 When the lenth of the string increases to 1000 characters, the web service throw an exception "Unspecified Network Error".
当字符串的长度增加到1000个字符时,Web服务将引发异常“未指定的网络错误”。 Please let me know how to pass a large JSON value to a web service using [webinvoke].
请让我知道如何使用[webinvoke]将较大的JSON值传递到Web服务。
Can we increase the size of url or whatever to fix this problem? 我们可以增加url的大小或解决此问题的方法吗?
You can serialize your Json as object: 您可以将Json序列化为对象:
page.asp page.asp
var data1 = {
IdTest: ('<%= miAspVar %>'),
fono: telefono,
etc, etc
};
var strData = YAHOO.lang.JSON.stringify(data1)
callService(testLlamada, strData, EstadoLlamada, onError2);
function onError2(result) {
alert(result);
}
function EstadoLlamada(result) {
...
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.